Hi,
is there any way to disable symbol change using efs?
I made a script to do automated trading but yesterday I accidently changed the symbol, which restarted the efs with a different symbol, and I lost all the information stored in the variables such as position size, entry price, indicator values, etc...
One of the way I came up with to overcome this problem, was to store all the variables to a file during postMain(), and reloading them in preMain() when the symbol is returned to the original. But then I noticed that some indicator values (such as # of trades) can not be recovered by this method.
Another way I thought of was to jump from postMain() back to main(), depending on whether the trade is open or not. But this might mess up the stack memory since it jumps from one subroutine to another.
Does anyone have a solution for this? Or is it not possible?
Thanks,
ykk
is there any way to disable symbol change using efs?
I made a script to do automated trading but yesterday I accidently changed the symbol, which restarted the efs with a different symbol, and I lost all the information stored in the variables such as position size, entry price, indicator values, etc...
One of the way I came up with to overcome this problem, was to store all the variables to a file during postMain(), and reloading them in preMain() when the symbol is returned to the original. But then I noticed that some indicator values (such as # of trades) can not be recovered by this method.
Another way I thought of was to jump from postMain() back to main(), depending on whether the trade is open or not. But this might mess up the stack memory since it jumps from one subroutine to another.
Does anyone have a solution for this? Or is it not possible?
Thanks,
ykk
Comment