MT5 "netting mode", how to set target for account, works even EA restarted ?
-
Because of trading grids, I place hundreds of orders. To avoid fee and limited number of orders, I have to consider to use MT5 with netting mode.
What I tried is use formula block (Balance + profit), put in a Variable (when no trade).
Set EA close all orders when Equity > Variable.
https://fxdreema.com/shared/AqAfTIjNcIt works. However, when my laptop closed Metatrader, EA restarted. It caused a mess.
Because of netting mode, balance is changing. So I can only set profit target before EA trades.
Any ideas to set target profit with MT5 netting mode, works even EA restarts ?
-
@migen The easiest way is to not let the computer turn off, the other way is to store your required value in a global variable, and read every time EA starts, there are blocks that can do this but I am unsure how.