Balance of Power, introduced by Igor Livshin, attempts to measure the strength of buyers vs. sellers by assessing the ability of each to push price to an extreme level. Livshin published this indicator in the August 2001 issue of Stocks and Commodities Magazine. This version of indicator calculates the BOP exactly as it is described in the article where it was published.
The resulting raw BOP values can be optionally smoothed using any Moving Average type.
The BOP oscillates between extremes of -1 and +1.
Livshin makes the following statements:
//PRC_Balance Of Power (BOP) | indicator
//23.07.2019
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
PeriodAct = 14 // Period
PeriodRng = 28 // Range
UseLastPeriod = 1 // Use Last period in calculation? (1=yes 0=no)
// --- end of settings
shift=1
if uselastperiod then
shift=0
endif
bh=highest[periodrng](high)[shift]
bl=lowest[periodrng](low)[shift]
BOP=(close-open[periodact-1])/(bh-bl)
r=255
g=0
if (close>bl+(bh-bl)/2.0) then
r=0
g=255
endif
return bop coloured(r,g,0)style(histogram), 0 coloured(150,150,150) style(dottedline)