peacefulLizard50262

Balance of Force (BOF)

The script "Balance of Force" is an indicator that aims to provide insight into the bullish and bearish forces present in the market by analyzing the relationship between bullish and bearish true ranges. The indicator first calculates the bearish and bullish true ranges by taking the absolute difference between the open and close prices for each period and summing these values over a user-specified length. It then calculates the ratio of the bullish true range to the bearish true range and takes the natural logarithm of this value, resulting in the "bullish-bearish ratio".

The script then calculates the standard deviation of this ratio over a user-specified length to create a measure of volatility. Using this deviation and the dominant cycle, it then applies an exponential moving average to smooth the ratio. The indicator plots the smoothed ratio, the raw ratio, and the deviation of the ratio multiplied by 1, 2 and 3 in addition to filling the area between the deviation multiplied by 3 and the log(1) with red and green. The user can use the indicator to identify potential bullish or bearish market conditions by analyzing the relationship between the smoothed ratio and the log(1) and the deviation of the ratio.
Release Notes:
Added the option to use a different high/low true range instead of open/close

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.

Disclaimer

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?