Hi, can anybody help with a line of code which will only allow my automated trade to execute between the hours of 8am & 8pm?
Thank you.
StefParticipant
Average
defparam flatbefore=080000 // don't trade before 8am
defparam flatafter=200000 // don't trade after 8pm
StefParticipant
Average
or
if opentime>=080000 and opentime<=200000 and otherbuyconditions then
buy x contracts at market
endif
Thank’s Stef, I’ve used your first coding suggestion and it works a treat!