Hey guys,
I was wondering if there is a way to get a specific candles time. Right now I am using math to get this data from my charts. I am hoping there is a more elegant way to perform this. I am worried that there may be some chart error and say a candle is missing, this would now point me at the 4:59 candle, and could throw off my results.
Here is my example that I am using now. Say it is 10:01, and I want to get the close of the current charts m1 candle at 5:00 am, I would use the following:
iClose(NULL,PERIOD_M1,+(TimeHour(TimeCurrent())*60)+(TimeMinute(TimeCurrent())) -301);
I tried looking through codebase, but did not see a function that I could call.
Thanks,
Dale
I was wondering if there is a way to get a specific candles time. Right now I am using math to get this data from my charts. I am hoping there is a more elegant way to perform this. I am worried that there may be some chart error and say a candle is missing, this would now point me at the 4:59 candle, and could throw off my results.
Here is my example that I am using now. Say it is 10:01, and I want to get the close of the current charts m1 candle at 5:00 am, I would use the following:
iClose(NULL,PERIOD_M1,+(TimeHour(TimeCurrent())*60)+(TimeMinute(TimeCurrent())) -301);
I tried looking through codebase, but did not see a function that I could call.
Thanks,
Dale
Makin my way, the only way I know how...