I know, I've been doing this long enough I should be able to fix this w/out thinking. But I can't find the problem.
I'm trying to pull the last day's High and Low and draw them on an hourly chart. I can't seem to pull the values.
Any ideas?
Thanks.
I'm trying to pull the last day's High and Low and draw them on an hourly chart. I can't seem to pull the values.
Any ideas?
Thanks.
Inserted Code
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
double varHigh[],varLow[];
int init()
{
SetIndexStyle(0,DRAW_LINE);
SetIndexShift(0,varHigh);
SetIndexStyle(1,DRAW_LINE);
SetIndexShift(1,varLow);
SetIndexLabel(0,"High Yesterday");
SetIndexLabel(1,"Low Yesterday");
SetIndexEmptyValue(0,0.0);
SetIndexEmptyValue(1,0.0);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int counted_bars=IndicatorCounted(); int limit;
if(counted_bars<0) {Alert("counted bars < 0"); return(-1); }
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int shift=0; shift<limit; shift++)
{
varHigh[shift]=iHigh(NULL,PERIOD_D1,shift);
varLow[shift]=iLow(NULL,PERIOD_D1,shift);
Comment(varHigh[shift]," ",varLow[shift]);
}
return(0);
}
//+------------------------------------------------------------------+