|
How to paint "Close[i]/High[i]" in seperate window?
hi everyone, when i try to draw a line of "(Close[i]-Low[i])/(High[i]-Low[i])", i get a very strange result. to my opinion, the line will wave between 0 and 1, but actual result is a straint line, i'm puzzled, can some one explain this?
here is my simple code:
//-----------------------------------------
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 White
double buffer1[];
int CountedBars=0;
int init()
{
SetIndexBuffer(0,buffer1);
return(0);
}
int start()
{
CountedBars=IndicatorCounted();
if(Bars<1) return(0);
for(int i=Bars-CountedBars;i>=0;i--)
{
buffer1[i]=(Close[i]-Low[i])/(High[i]-Low[i]);
}
}
Last edited by inssuc; 12-27-2007 at 07:43 PM.
Reason: get new problem
|