I'm currently programming an EA and want to implement a trailing-StopLoss. If an order is open the SL is calculated for the current bar and plotted on the chart. The SL is to be recalculated for the following bars. If the price is exceeded or undershot, the order should be closed. How is this when the Internet connection is broken or a restart of the computer is necessary? How do I do that the SLs are still displayed after a reboot of the computer or a reconnect of internetconnection? The special feature when calculating the SL values is that they are dependent on the account balance. A new calculation of all SL values after a reconnect is therefore difficult I think.
Maybe you might click on the topic links to read about it ?
Global variables are kept in the client terminal for 4 weeks since the last access, then they will be deleted automatically.
And yes if you use filewrite there will be a loss is testing speed, how much will depend on how often you read and save the new values, as well as on the hardware you are using.
i had a look at the links but read it not in detail.
I would run the EA on my PC at home and not at the client. I think I have to write in files.