how to get bar index (or shift) number from time?

To add comments, please log in or register
okwh
1643
okwh  
how to get bar index (or shift) number from time?

function
datetime iTime( string symbol, int timeframe, int shift)
can get datetime from shift,
then how to get shift from one datetime?

Or
how to get OpenOrder's shift position.

now MT only get OpenOrder's datetion with function
datetime OrderOpenTime( )


Is it
int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)
????
Rashid Umarov
Admin
16563
Rashid Umarov  
Yes, function iBarShift() is made just for these cases.
Marcin Rutkowski
302
Marcin Rutkowski  
Rashid Umarov:
Yes, function iBarShift() is made just for these cases.

THis is just for MT4   .....is anythink for mt5  ?

Alain Verleyen
38676
Alain Verleyen  
Marcin Rutkowski:

THis is just for MT4   .....is anythink for mt5  ?

https://www.mql5.com/en/code/1864
iBarShift
iBarShift
  • votes: 47
  • 2013.10.25
  • Alain Verleyen
  • www.mql5.com
But this function is not included in MQL5, mainly because MQL5 provides all necessary basic, low-level, functions to process such operation in a library. What I discovered, remarkably, is that all four versions are bugged, in the sense they don't reproduce exactly the MQL4 iBarShift(). Indeed, when the datetime given as input parameter, don't...
To add comments, please log in or register