This EA is an Utility for define and execute a grid strategy. Join to the telegram group you can find in my profile page for have access to the different strategies proposed by the SFE community.
BACKTEST AND LIVE
The EA must be used on a M5 timeframe chart.
The current version works only in the Long side, and with symbols like BTC, ETH, GOLD, Stock Indices, STOCKS.
Do not work on Forex symbols.
This is a deliberate restriction, because the idea behind is use the strategy under 'reasonable safe' conditions.
In symbols where the long run is always an uptrend, like stocks, gold, btc, take advantage of beare market like the current, for trade the volatility movements at the bottom range. As a price can't go under 0 or we can use a more reasonable but realistic bottom price, we can calculate depending on the grid levels and the size of the trades, which amount of balance is necessary for keep the account safe.
Then the EA will make the trades based on the grid parameters along the time without compromise the account. And, as the symbols trades has an uptrend in the long term, as soon the top prices are recovered, all the profit generated by the grid trades are net gains.
For be safe, the limit safety price, the bottom price, must be enough low to have big odds that can't be reached. This means the balance necessary can be big or the size of the trade must be little, or the grid distance must be high. This reduces the profit in terms of % related with the mobilized balance, but the trader must be very strict in have a good safe distance, otherwise the account can be lost easy.
The EA can be managed defining very few parameters which describes later.
Example Signal: https://www.mql5.com/en/signals/1769410
Position Lot size. Size of each position
Upper and Lower Limit price. Define the upper and lower limit price zone for use to put the entry points of the grid. Above or below these limits no trades are opened.
Safety Limit. This is a bottom price used in the backtest for calculate and give the necessary balance the account must have for be safe. The EA gives the calculation if all the grid points have a long position opened and the price is in the safety limit, which is the loss. So the balance must cover this amount, and also a bit more for cover the margin requierments which depends on the leveralge. The calculated value is the worst case, because sometimes maybe not all the grid point have long positons because some upper prices has not been reached, and also do not compute the generated profits of the grid trades meanwhile.
Step of the Grid Levels. Distance of the grid levels.
Distance to TP. In general will be the same value as the 'step', but can be other.
Base Magic. 3 digits number which are the first 3 digits of the generated magic number. The magic number is different for each leel, and the last digits are the level price.