am i missing something? - page 2

 

thanks dudes, esp SDC...the problem was that the values were too small to be seen in the chart window, now the problem is rectified, and the indicator is visible and working, thanks a lot again to those spent their valuable time in helping me..

 
kmnatarajan:

the aim was to show the calculated values of previous bar's {(high)-(low)+(open)-(close)}/2, tat's why i chose to index the arrays as i+1, for each i, the i+1 would be the previous bar right?...or is there something else?


Yes you are correct except for the very first bar in the chart (the oldest one) has no previous bar so if you were to draw the line as calculated on that bar you would have an erroneous beginniing to the line, you can avoid that by coding it as WHR described (which would be the more accurate way of doing it) or by calling SetIndexDrawBegin() as you did to avoid drawing the initial bars of the indicator
Reason: