Close position at specific time

 

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 

 
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?
 
Marco vd Heijden:
For which platform?

Hello, for mt5.

 

Thanks. 

 
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?