Download MetaTrader 5
To add comments, please log in or register
Any questions regarding MQL5 Cloud Network? FAQ will help you!
Sherif Hasan
7223
Sherif Hasan 2015.12.12 15:36 

Hi,

I want to close all opened orders on 10 minutes before friday market end.

because closing time differ from different brokers!

Your support is appreciated.

Doerk Hilger
1073
Doerk Hilger 2015.12.12 23:01  
sheriffonline:

Hi,

I want to close all opened orders on 10 minutes before friday market end.

because closing time differ from different brokers!

Your support is appreciated.

Scan backwards through M5 until iTime of a bar returns another date. This last candle then will return the closing time -5 min, also with iTime.
Carl Schreiber
5937
Carl Schreiber 2015.12.12 23:13  

The forex market (opens at 8:00 am) and closes at 5:00 pm EST (EDT) New York time.

On this base you can calculate your 04:50 EST and close all your orders.

Doerk Hilger
1073
Doerk Hilger 2015.12.14 06:57  
gooly:

The forex market (opens at 8:00 am) and closes at 5:00 pm EST (EDT) New York time.

On this base you can calculate your 04:50 EST and close all your orders.

... but not with different brokers, and that was the question. 
/
To add comments, please log in or register