Transforming an histogram/oscillator into a 0 to 100 range indicator

To add comments, please log in or register
Richard Jehl
1670
Richard Jehl  
Hello friends, is there a way of expressing the values of the classic Bears Power and Bull Power MT4 indicators into a 0 to 100 range oscillator (or histogram), where the level 50 would replace the level 0, like in RSI ? The purpose is to keep the characteristics of the values, and the basic mathematical formula of these 2 indicators. I wonder if some characteristics would be lost in the new indicator/histogram, by the imposition of the 2 absolute limits of 0 and 100. Any answer ? Thank you for your help and happy trading !
lippmaje
689
lippmaje  
double BearsVsBullsPower(string symbol=NULL,int timeframe=0,int period=13,int applied_price=PRICE_CLOSE,int shift=0)
{
   double bears=iBearsPower(symbol,timeframe,period,applied_price,shift); // ranges 0..100
   double bulls=iBearsPower(symbol,timeframe,period,applied_price,shift); // ranges 0..100
   return bulls-bears; // ranges -100..100, -100 full bears, 100 full bulls
}
Just an idea. Expand on it.
Richard Jehl
1670
Richard Jehl  
lippmaje:
Just an idea. Expand on it.

Thank you for your idea, but I am bad at coding and don't know what to do about this, everything I tried failed lol

To add comments, please log in or register