Close position at specific time

To add comments, please log in or register
Paulo Fraga
75
Paulo Fraga  

Hello,

I started coding EA and i want to know how to close all opened positions at specific time. I want to create a parameter and input the time to close all opened positions, for example at 5pm daily.

Regards.

Paulo Fraga 

Marco vd Heijden
Moderator
8178
Marco vd Heijden  
Paulo Fraga:

Hello,

I started coding EA and i want to know how to close all opened positions at specific time. I want to create a parameter and input the time to close all opened positions, for example at 5pm daily.

Regards.

Paulo Fraga 

For which platform?
Paulo Fraga
75
Paulo Fraga  
Marco vd Heijden:
For which platform?

Hello, for mt5.

 

Thanks. 

Bernhard Schweigert
28353
Bernhard Schweigert  
Paulo Fraga:

Hello,

I started coding EA and i want to know how to close all opened positions at specific time. I want to create a parameter and input the time to close all opened positions, for example at 5pm daily.

Regards.

Paulo Fraga 

get the daily time - broker or local - than make the close call when time is bigger then day beginn + 17 x 60 x 60 seconds. got it?
To add comments, please log in or register