Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Bounce Count Lot Size/Order Count Set for Grid/Martingale Strategy - MetaTrader 4 Expert - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

Bounce Number for Grid/Martinale strategies Lot Sizing/Order Count set - expert for MetaTrader 4

Bounce Number for Grid/Martinale strategies Lot Sizing/Order Count set - expert for MetaTrader 4

Bounce Number for Grid/Martinale strategies Lot Sizing/Order Count set - expert for MetaTrader 4

For strategies like grid and martingale, the lot size and/or the number of trades is very important.

We always ask what happened to the symbol in the range area and historically how many times has the price bounced between two prices in the range area? !

This is what I define as "bounce count". It can be calculated through statistical analysis of the history of any symbol in the market.

To make it clearer, let's look at image number 1.

Bounce Number for Grid/Martinale strategies Lot Sizing/Order Count set - expert for MetaTrader 4

Figure 1: Definition, goals and applications of bounce numbers

This chart illustrates how price movements generate statistics from the Rally Digital Tool. To give the tool a delay, I generated it as an EA to use the sleep function. This feature somehow prevents the chart from crashing due to a higher number of candles set on the instrument input.

Another picture (picture no. 2) shows a very brief graphical structure of the tool and its object meaning.

Bounce Number for Grid/Martinale strategies Lot Sizing/Order Count set - expert for MetaTrader 4

Picture 2: Bounce count statistics.

Consider we set Image No. 2’s bounce channel half-high to 600 points:

- This symbol has 6 different bounce numbers from 1 to 6.

- The rebound number 2 means that the price starts from the middle of the rebound channel (height 2 * 600 = 1200 points), moves up and down, and also touches the red line once and the blue line once before hitting TP=1200 points. So, for the 5th bounce, this means that the price starts from the midpoint of the channel, touches the red line 2 times, the blue line 3 times, or the red line 3 times and the blue line 2 times, and then hits the TP=1200 point. The same can be said for other jump-out numbers.

- We do not have tick number 7, which means that in all the history selected in the tool input, there are not any 7 ticks between the red line and the blue line (distance 1200 points). Please consider that if you select more historical data ( maximum number of lookback candles ), your chances of finding 7 bounces increase. But we see that among the 9020 commodities whose prices reach the target price, there are 22 opportunities for rebound even if there are 6 times.

Tool input content:

- Review the maximum number of candles : As with other scanning tools, pay attention to the number set for this cell. Don't increase it significantly to avoid memory corruption.

- Approximate Time: The time frame of the candle chart used to look for bounces from the channel limits and hitting the target price line. Use a lower time frame for thin channels. If you don't know how to set it better, use M1 time frame.

-Bounce Channel Half Height: This is the distance of the green line from the red and blue lines. It is measured in points.

- Chart background color

- Bar Color 1/Bar Color 2: Make the statistics bar a little fancy

- Count cell colors

- Bounce number cell color

- Load bar color: During the calculation process, this load bar will help the user understand whether it is working properly and how fast the calculation is.

- Added button to start and enter the number of historical candles from the screen.


Attachment download

📎 bouncenumber_v0.mq4 (13.3 KB)

📎 bouncenumber_v1.mq4 (33.69 KB)

Source: MQL5 #47874

Verification code Refresh