READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

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

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

Administrator, sq-ultimate, 2 replies.

Visit profile

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)