bounce number for grid/martingale strategies lot sizing/order count set
Info
The bounce number for grid/martingale strategies lot sizing/order count set is a Expert Advisor for MetaTrader 4 that lot sizing and/or number of trades for strategies like grid and martingale are very important. we always ask about what happened in history of a symbol during range zones and how many timesprice bounced between two price of a range zone.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Experts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use bounce number for grid/martingale strategies lot sizing/order count set
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
lot sizing and/or number of trades for strategies like grid and martingale are very important.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 4. Place the file in the MQL4/Experts folder and restart the terminal.
Description & Settings
Related: trailing stop with magic number - another powerful expert for MetaTrader 4 traders.
lot sizing and/or number of trades for strategies like grid and martingale are very important.
Also recommended: daily target, max daily losses with magic number - similar expert with strong performance on MetaTrader 4.
we always ask about what happened in history of a symbol during range zones andhow many times
price bounced between two price of a range zone?!
this is what i define as bounce number. it can be calculated by a statistical analyses of any symbol history from market.
to be more clear lets have a look to image no. 1.
image no. 1: definition of bounce number, its goal and applications
image illustrates how price movement generates statistics of bounce number tool. to have a delay on tool i generated it as an ea to use sleep function. this function somehow prohibits crash on chart because of higher number of candle set on tool's input.
the other image (image no.2) shows tools very brief graphical structure and its objects meanings.
image no. 2: bounce no. statistics.
tools usage:
form image no. 2 considering we set
bouncing channel half height
to 600 points :
- there are 6 different bounce numbers from 1 to 6 for this symbol.
- bounce number 2 means, price starts from middle of bounce channel (height 2 * 600 = 1200 points) and moves up and down also hits one time red and one time blue lines before hitting tp=1200 points. so for bounce no. 5 this means price starts from channel mid point and hits 2 times red 3 times blue or 3 times red and 2 times blue line then hits tp=1200 points. same can be said for other bounce numbers.
- we do not have bounce number 7, means there is not any 7 times bounce between red and blue lines (with 1200 points distance) over all history selected in tool's input. please consider that if you select more historical data (
max number of lookback candles
), chance to find 7 bounce will increase. but as we see even chance for 6 bounce is 22 in 9020 total items of price hit tps.
what is in input of tool:
- max number of lookback candles
: same as other scanning tools be careful about number you set for this cell. do no increase it dramatically to avoid any crash in memory.
- time-frame:
time-frame of candles e want to use to find bounce from channel limits and also touching of tp lines. use a lower time frame for thin channels. if you do not know what to set better to use m1 time-frame.
-
bouncing channel half height:
this is green line's distance from red and blue lines. it is in points.
-
chart background color
- bar chart color 1/bar chart color 2:
to make statistical bars a little bit fancy
- count cells color
- bounce numbers cell color
-added button to start and entering number of historical candles from screen.
You may also like: cryptocurrency divergence - excellent alternative for expert users on MetaTrader 4.
Source Code
яю//+------------------------------------------------------------------+
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.00"
#property strict
input int maxbar = 10000; // Max number of lookback candles
input ENUM_TIMEFRAMES TF = PERIOD_M1; // Time-Frame
input int BPoints = 300; // Bouncing Channel Half Height (Points)
input int FontSize =10; // Font Size
input color ChartBG = clrBlack; // Chart Background Color
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.