Description from the author of the idea:
The Expert Advisor was created at the request of one of the forum participants.
A comment by vvx080: The idea is to create a grid of stop orders, e.g. we first set two orders sell and buy; once one of the orders triggers the second one should be deleted. If the trade is unprofitable, after 10 points we open an opposite order with the doubled lot. If it is unprofitable again, after 20 points we open another opposite order twice as large as the previous one. If again the trade is negative, after 30 points we open an opposite order twice as large as the previous one, and so on.
Under such conditions, there should be a lot of coincidence for the deposit to be completely lost. In case of a positive trade movement, we use a good trailing so that we could catch 300 profit points. No stop loss and take profit are used for orders, trades are closed at a common profit. This strategy is not afraid of trends or flat. During trend the total profit is trailed.
Here is the preliminary calculation of lots and deposit:
I think a deposit of 3000 should be enough, but the strategy can hardly reach the 8th or 9th order. I might be wrong somewhere, but the idea is like that. The Expert Advisor will be more accurate.
The EA uses a lot increase, but it cannot be called a pure martingale. Moreover, the EA does get out of flat, while many martingales cannot do.
Please add your comments and ideas to improve the strategy. However, please do not post "martingale is bad" ideas without checking the EA at least on a demo and without understanding its operating principle.
Testing results on EURUSD:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/18800
A channel based on peaks and troughs of AlexSTAL_ZigZagProf.ForceTrend
It is a simple trend indicator with the color indication of active trend direction.