On Balance Volume Scaled - OBV Scaled

The main idea of this oscillator is to place the OBV oscillator and its oscillation around the range of 0 and around -50 to +50 and for this scaling of the "On Balance Volume" oscillator, I have used Min-max normalization.
Since this oscillator does not have a specific minimum and maximum, just setting the maximum and minimum does not seem the best thing to do. As in this case, we will constantly observe sudden changes and we will have problems such as volatility. On the one hand, we will constantly deal with sudden changes and problems such as volatility. Also on the other hand, the continuous collisions of the high/low(+50 & -50) and index and returning from that is another thing that we are going to deal with.
Therefore, to solve these problems and create more flexible maximum and minimum ranges, another similar method has been used. Choosing the maximum of our normalization to the size of the moving average of 100 candles of the index maximum and choosing the minimum of normalization to the size of the moving average of 100 candles of the minimums of the OBV index, and then normalizing the OBV index with the Min-max method with those ranges, is the recommended method ,which has been used to eliminate problems. In this case, we will not have any problem hitting 50 and returning or hitting -50 and returning. Also, our scaled OBV index will have the ability to touch and cross 50 and -50 and can fluctuate without problems.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?