The Balance of Power indicator measures the market strength of buyers against sellers by assessing the ability of each side to drive prices to an extreme level. The calculation is: Balance of Power = (Close price – Open price) / (High price – Low price) The resulting value can be smoothed by a moving average.
Traders may use this indicator to help:
(description found on the web)
Code converted from Pinescript (tradingview) version by a request in the english indicators forum section.
//PRC_True Balance of Power | indicator
//11.10.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from Pinescript version
//---settings
//per=30 //periods for Emoline
//---end of settings
trhi = max(high, close[1]) //true high
trlo = min(low, close[1]) //true low
trop = close[1] //true open
bop = 100*(close-trop)/(trhi-trlo) //True Balance of Power as percent
lin= 1.5*linearregression[per](bop) //linear regression as emoline
r=0
g=255
if bop<0 then
r=255
g=140
endif
return bop coloured(r,g,0) style(histogram) as "BOP", lin style(line,3) as "Emoline"