Reply

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

Subscriber, bbp_participant, community, 25 replies.

Visit profile

6 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

Administrator, sq-ultimate, 3 replies.

Visit profile

6 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 2 posts - 1 through 2 (of 2 total)