IS there a way to access bar index for a different time frame?
Created at 17 Apr 2022, 05:40
RO
IS there a way to access bar index for a different time frame?
17 Apr 2022, 05:40
Hello,
I was wondering if I run the indicator on 4H chart is there a way to access bar index of 5m bars? Any input will be appreciated. thanks!
amusleh
18 Apr 2022, 10:18
Hi,
Do you mean the current bar index?
To access current bar index of another time frame Bars you can use Bars.OpenTimes.GetIndexByTime method: cAlgo API Reference - TimeSeries Interface (ctrader.com)
@amusleh