Download MetaTrader 5

How can I know when the broker will close the trade in friday?

To add comments, please log in or register
Interested in Signals activity? Come and track!
HongDi s& t development co.,ltd.
1588
hongbin fei 2012.01.14 15:42 

Is any example code for this purpose.

 

thanks

Ian Harris
106
Ian Harris 2012.01.14 18:29  

I've just been having a look at this too, with the idea of closing out my trades five minutes before the session closes. (if anybody's got any examples of that I'd be interested to take a look).

Have a look at function SymbolInfoSessionTrade.You can use it to get the end of session time on Friday, which I'm assuming is what you are looking for? So you can close out your trade before then? You might also need TimeTradeServer to get the current server time. Not sure how all this works but maybe this will give you a starting point.

;-) Ian

HongDi s& t development co.,ltd.
1588
hongbin fei 2012.01.16 06:29  
mogplus8:

I've just been having a look at this too, with the idea of closing out my trades five minutes before the session closes. (if anybody's got any examples of that I'd be interested to take a look).

Have a look at function SymbolInfoSessionTrade.You can use it to get the end of session time on Friday, which I'm assuming is what you are looking for? So you can close out your trade before then? You might also need TimeTradeServer to get the current server time. Not sure how all this works but maybe this will give you a starting point.

;-) Ian

I try use it, but the from and to value are all is  "1970..." I donot know what is it.
Slawa
Moderator
6840
Slawa 2012.01.17 16:07  
codeidea:
I try use it, but the from and to value are all is  "1970..." I donot know what is it.

Why? Did you read documentation?

time in seconds from 00 hours 00 minutes, in the returned value date should be ignored


To add comments, please log in or register