Suppose I only want my EL strategy to trade between two fixed times. In PST these times are 0630 and 1245. How do I compare the current time to these values?
My current code:
Inputs:
TimeBegin(630),
TimeEnd(1245);
if CurrentTime > TimeBegin and CurrentTime < TimeEnd then begin
{ trade logic here}
end
else begin
{no trading}
end;
Will this work or must I somehow convert CurrentTime to an integer? For BeginTime, must I specifiy it as 0630 rather that 630?
Please explain. Thanks.
|