I'm hoping someone here can help. I'm trying to write an indicator that will tell me how much time is remaining in a candle.
But I can't figure out if I'm getting the right data. I get some huge number that I can't translate into minutes.
I'm trying this on a 4hr chart (backtesting. which, for something that should be so simple, should be easy to do).
But I can't figure out if I'm getting the right data. I get some huge number that I can't translate into minutes.
I'm trying this on a 4hr chart (backtesting. which, for something that should be so simple, should be easy to do).
Inserted Code
#property indicator_chart_window
int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int counted_bars=IndicatorCounted(); int limit;
if(counted_bars<0) return(-1);
datetime varLeft;
limit=Bars-counted_bars-1;
for(int shift=0; shift<limit; shift++)
{
varLeft=TimeCurrent()-Time[shift];
Comment(varLeft," minutes left until end of bar");
}
return(0);
}