Restart MT5 and it back to 0.01
-
Hello guy
I build Grid EA and it work properly.
But once in the while when the platform(MT5 restart or i restart server, EA will constantly open new trade with 0.01 even the running lot size is bigger than 0.01.
i also use "ALL(automated and manual opened)" to check the existing position with it the same Magic number, it still did not recognize or continue everything.
I can say in short word, EA will start like the fresh new EA after MT5 restart.Please help me guy. Now i am on live account running and met this problem.
Thanks and have a nice day . . . .
-
@Pheaktra-Capo Yes, this is the normal way to work. Bots don't 'remember' any value opn any variable when they or the platform itself are restarted. If you want the bot to do that, you need to store the value on a 'Terminal Variable' instead. Like this:

Then, once the bot is restarted, you need to 'refeed' the variables you need with those terminal variables through the 'on init' tab.
-
I made up to 76 variable. It store all data. But it not recognize once MT5 restart
-
Anything that needs to be remembered, as @l-andorrà said needs to be stored in a terminal variable, if 76 have information that needs to be remembered, then you will need to create 76, use an actual terminal variable block though.