Download MetaTrader 5

Close position at specific time

To add comments, please log in or register
Are you used to trading from your smartphone? Mobile version of MetaTrader 5 will suit you best!
Paulo Fraga
73
Paulo Fraga 2016.09.05 00:53 

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
4685
Marco vd Heijden 2016.09.05 05:24  
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
73
Paulo Fraga 2016.09.05 13:27  
Marco vd Heijden:
For which platform?

Hello, for mt5.

 

Thanks. 

Bernhard Schweigert
5705
Bernhard Schweigert 2016.09.05 15:51  
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