How can I fixed (0/100) an indicator that I´m using in a expert adviser?

 

Hello there.

I have maybe a small problem.  I´m using a istochastic value and signal in my expert. But I need to make it count between 0 and 100. Can anyone give me an idear.  I need the indicator to work on that range to compair with another. And it is just writing like the book says but there is no way to "fixed" it.

 

Sincerly Eric 

 
eirjoh: I have maybe a small problem.  I´m using a istochastic value and signal in my expert. But I need to make it count between 0 and 100.
The stochastic indicator is a value between 0 (all prices=lowest) and 100 (all prices=highest.) It doesn't need fixing.
         sumlow+=Close[k]-LowesBuffer[k];
         sumhigh+=HighesBuffer[k]-LowesBuffer[k];
        }//for
      MainBuffer[i]=sumlow/sumhigh*100;
Reason: