Hi, I am following this thread and I see that you have exhausted several ideas, I would like to try a few just to see if the behavior of EA changes in relation to risk. I understand that something that kills our account in a hedging system is a market in range. And in a martingale system is a trending market. Now the market is "30% in trend and 70% in range". May be is necessary use martingala and hedge system together, just is necessary to detect the range market. My language is not English sorry if I make mistakes or do not make myself understood.
I have the same idea, which can save the hedge position. I made an ea which was basically taken from Bipolar
Goblin by BlutoFX.
I add the rules for hedging with conditions after X trade positions will open hedging positions.
The hedging position will take the N level from the last trading position for the lotsize value and for stop losses will be taken takeprofit
value from the last trading position.
When X + 1 trading positions occur, the second position of the hedging will be opened, with the same rules, lotsize of N + 1 and stop loss from
takeprofit value X + 1, for the first hedging position the stop loss will be modified to the value of takeprofit X + 1
The modification after I test the strategy
tester and forward test, works on one pair. When I add another pair, the hedging position opens as the rules but the
first hedging position stop loss when opening the second hedge not being modify.
I have a question about this problem with a little snippet from the code that I modified at https://www.mql5.com/en/forum/332467
If there was someone here who could help me pin point my mistakes