Hi,
I know we can use input variables to the algo but is there a way that allows it to only execute the orders if the input variable has been updated today e.g.
Input variable x = 15 // comes from variable optimisation – definition of variables, x as integer with fixed value
If x updated today then
if longCond then
endif
endif
Or can I make the algo stop by end of the day so that only once variable has been input, I have to manually start it for rest of the day? like a default stop or expiration but I don’t want to change the expiration global parameter to impact other auto algos.
Thanks
Ash
Will QUIT do what you want?
QUIT
No input data is available.
Yo update any variable you need to stop the strategy, modify any value you wisj, then restart it. So whenever you restart it you know if any data have changed.
Thanks, I think QUIT is the best way to do it e.g. QUIT at US Close so I know it won’t run itself again unless I modify the external input. Also, after I posted, I was thinking another way could be to use Arrays to store last value of the input variable but frankly haven’t used arrays in algo yet but have used it in indicators alot.
Thanks both.
My experience of arrays is that optimisation takes forever and if I recall correctly, Algos get stopped, due – in my opinion – to exceeding the time allowed to execute the code.
Th error message in above stoppages is the one for ‘not enough historical data’ (again my opinion).