The AB Universal Grid advisor allows you to implement most grid strategies. It's a great tool for those who actively use elements of grid strategies (such as averaging, martingale, and others) in their trading.
Version for MT5 https://www.mql5.com/en/market/product/145321
Version for MT4 https://www.mql5.com/en/market/product/147482
Input parameters.
========== Expert settings
| Watch mag ic number | Select which magic numbers the advisor will see (drop-down list):
|
| ___ Magic number (My) | Magic number |
| ___ Add magic number | Additional magic number for option (3) (see above). Enter the magic number of another advisor here if you're using signals from another advisor. |
| Maximum spread for opening market orders, pips (0=off) | The advisor will not open a market trade if the spread is >= than this value. |
| Info Panel | On/Off Info panel |
========== Trading strategy settings
| Trading strategy | Built-in strategies for opening first positions (drop-down list):
|
| Opening of the first | Select trading direction for the first position (drop-down list):
|
| Lot Mode | First position volume calculation mode (drop-down list):
|
| ___ First Lot | First position lot |
| ___ Part of the free margin | The value of free margin for opening “___ First Lot” |
| Stop Loss, pips (0=off) | Stop loss for the first position. Once set, it is not controlled by the advisor until a second position is opened in the same direction. |
| Take Profit, pips (0=off) | Take profit for the first position. Once set, it is not controlled by the advisor until a second position is opened in the same direction. |
========== Risk Management
| Max Lot EA (0=off) | The maximum lot the advisor will open in one trade |
| Close all at Drawdown | Close all on drawdown (drop-down list):
|
| ___ Drawdown Value | The value for the selected mode. |
| ___ Stop Trading after Drawdown | On/Off. Stop trading after closing all positions due to drawdown. To resume trading, restart the Expert Advisor. |
| Close all at Profit | Close all on profit (drop-down list):
|
| ___ Profit Value | The value for the selected mode. |
| ___ Stop Trading after Profit | On/Off. Stop trading after closing all positions at profit. To restart trading, you must restart the Expert Advisor. |
========== Market Position Management
| ===== Trailing stop (TS) | Режим Трейлинг стопа (выпадающий список)
|
| ___ Distance TS, pips | Distance in points from the current price for trailing stop |
| ___ Start TS, pips | You can add a trailing stop start distance. This way, the trailing stop will not start at the breakeven point, but rather when it moves the specified distance. It's calculated using the following formula: Switching distance TS = Distance TS, pips + Start TS, pips. For the mode"2) Compensatory" works only if there is 1 position in the market. |
| ___ Step TS, pips | Set the step for trailing stop. |
| ===== Breakeven (BE) | On/Off. Setting the breakeven (BE) taking into account swaps and commissions |
| ___ Distance for transfer to BE, pips | Distance in points for installing BE |
| ___ Add pips to BE | Add a few points to your breakeven if you want to take a small profit and avoid minor slippage. |
========== Grid settings
| On/Off the settings block "Grid settings" | Off = The functions in this settings block are ignored. |
| Grid New orders/positions | On/Off. Disable grid generation. New grid positions will not be opened. This setting does not affect the opening of the first position for "Trading Strategy." |
| Grid Ban Max number Orders/Positions (0=off) | Prohibition of opening new grid positions if the specified number of positions in a given direction has been reached. |
| Grid Ban Max volume Orders/Positions (0=off) | Prohibition of opening new grid positions if the specified volume has been reached in a given direction. |
| ===== Grid STEP mode | Grid step calculation mode (drop-down list):
|
| ___ First STEP, pips | Initial grid step |
| ___ Add pips for (2) | Additional pips for grid mode 2. If you enter a negative value, the next step will decrease, and if you enter a positive value, it will increase. |
| ___ Ritio for (3) and (4) | Coefficient for grid modes 3 and 4. For this type of calculation, if you enter a value < 1, the next step will decrease, and if > 1, it will increase. |
| ___ Min Step, pips (0=off) | Minimum allowed grid step for the advisor. |
| ___ Max Step, pips (0=off) | The maximum allowed grid step for the advisor. |
| ===== Grid LOT Mode | Lot calculation mode (drop-down list):
|
| ___ Add Lot for (2) | Additional lot for lot 2 calculation mode. Can be +\- |
| ___ Ratio lot for (3) and (4) | Lot coefficient for lot calculation modes 3 and 4. |
| ===== Order TYPE for opening the grid | Select the order type to open the next position from the drop-down list:
|
| ___ Set distance for "Stop", pips | Select the distance from current prices to place a Stop order. |
| ___ Set trailing distance for "Stop", pips | Select the trailing distance for a Stop order. |
| ===== Grid Stop Loss Mode | Stop Loss calculation mode for the Grid (drop-down list):
|
| ___ Stop Loss, pips | Stop Loss value in pips |
| ===== Grid Take Profit Mode | Take Profit calculation mode for the Grid (drop-down list):
|
| ___ Take Profit, pips | Take profit value in pips. |
| Close Grid the profit, account currency (0=off) | Closing all grid orders in one direction when profit is reached |
========== Accumulative Buffer (AB)
| ===== Accumulative Buffer | On/Off |
| Choosing a direction to close unprofitable positions | Selecting the direction for closing unprofitable positions (drop-down list):
|
| Threshold to activate AB | The activation threshold of the AB when the parameter ===== Accumulative Buffer is set to On. If the threshold is not reached, the AB is disabled. |
| Use AB profit for the of days | Use the specified number of days to calculate AB profit |
| Percent use AB | A percentage of accumulated profits that will be used to close losing positions. This can be reduced if you want to keep a percentage for yourself. |
| Lot calculation mode for closing a losing position | Lot calculation mode for closing a losing position (drop-down list):
|
| ___ Value for Lot calculation mode | Value for Lot calculation mode for closing a losing position |
========== Visualization
| Drawing the Next level Opening | Show the opening levels of the next order on the chart |
| Drawing Breakeven levels | Show breakeven levels on the chart. Buy direction - blue, Sell direction - orange, overall breakeven for both directions (if possible) - pink. |
========== Indicators
| --- ATR --- | Indicator name |
| ATR Time frame | The time frame from which the ATR value is taken |
| ATR Peroid | ATR Peroid |
Download the demo version and explore AB Universal Grid in the tester
Version for MT5 https://www.mql5.com/en/market/product/145321
Version for MT4 https://www.mql5.com/en/market/product/147482


