How to get the index of bar like MT4 iBarShift Thank you

Created at 13 May 2020, 12:52
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
LO

lordyy

Joined 24.03.2015

How to get the index of bar like MT4 iBarShift Thank you
13 May 2020, 12:52


Hi,
 
How to get the index of bar in Ctrader,just like MT4 iBarShift 

MT4 iBarShift:
  datetime some_time=D'2004.03.21 12:00'; 
  int      shift=iBarShift("EURUSD",PERIOD_M1,some_time); 
Returned value:
Index of the bar which covers the specified time.  (history "gap"), 


Thanks


cTrader Automate
@lordyy
Replies

PanagiotisCharalampous
13 May 2020, 13:00

Hi lordyy,

Here it is.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

lordyy
14 May 2020, 07:33

RE:

PanagiotisCharalampous said:

Hi lordyy,

Here it is.

Best Regards,

Panagiotis 

Join us on Telegram

 

Thanks a lot ! 


@lordyy