Martingale EA - Platform Restarts
-
Just a quick question,
what if you example the EA is martingale and started as 0.01 lots then went to 0.50 lots.
After awhile, the MT5 crashes and you need to restart the platform.
Will the EA start again at 0.01?
-
Yes, you need to use/store/delete within a global variable (terminal variable on here)
-
@jstap how can we do that so that it will continue after mt5 restarts?
-
yes is the only way to have it remember after close. The easiest way is to set as soon as placing a trade, this is just an example, once saved in a terminal variable you can read it anywhere:
-
@jstap what if i have four sets of condition
1 initial Buy
1 Martingale Buy
1 Initial Sell
1 Martingale Sell -
Then you set 4 terminal variables by different name, this is the name you use to read them.
-
@jstap if i put another one like this, would it be the same also?
-
No I would set a new tree with a for each block, these are loops so under a no trade block will start and run the loop only once, so for continual checking of pips away needs to be free from the no trade block, once a trade is placed a no trade block stops passing.

-
@jstap thanks. i will try and observe.