Which Trading Rule I have to choose, that EA opens Trades only between 8 a.m. to 9:30 p.m. and closes all open Trades at 9:30 p.m.?
1 replies
birdy70
12 years ago #112519
Hello everyone,
could you tell me please which Trading Rule I have to choose, that the EA opens Trades only between the Trading Day Time 8:00 a.m. to 9:30 p.m. and close all open Trades at 9:30 p.m. for example?
IF
it is between 8:00 a.m. to 9:30 p.m.
and……….
THEN
…………….
Thanks for feedback.
Birdy70
0
Mark Fric
12 years ago #126053
Hello,
you have to specify two trading rules i this case:
Rule 1 – to open trades between 8:-00 and 9:30 pm
IF
Time >= GetTime(8, 0, 0)
and
Time < GetTime(21, 30, 0)
and
some other entry conditions…
THEN
Enter at market
Rule 2 – to close all positions after 9:30 pm
IF
Time >= GetTime(21, 30, 0)
THEN
Close all positions
Mark
StrategyQuant architect
0
Viewing 1 replies (of 1 total)