![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi everyone, when i try to draw a line of "(Close-Low)/(High-Low)", 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=(Close-Low)/(High-Low);
}
}