Balance of power indicator
- This topic has 4 replies, 4 voices, and was last updated 7 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › Balance of power indicator
Hello! I would like to test the indicator Balance of power! 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)
I found this code in internet but it doesn´t work in Prorealtime so I need your help please! Thank you very much
//@version=3
study(“True Balance of power”)
per=input(30, title=”periods for Emoline”, type=integer, step=1, minval=4)
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*linreg(bop, per, 0) //linear regression as emoline
bgcolor(lin0?green:orange, style=columns) //plot BOP as columns
plot(lin, title=”Emoline”, color=rising(lin,2)?blue :black, linewidth=3) //plot emoline as line
hline(0, linestyle=line) //zero level
I translated the indicator into ProBuilder version, you can find and download it here now: Balance of Power
Hi, Nicolas,your version is the True Balance of Power,I have this version:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
REM TRUE BALANCE OF POWER // código original de eykpunter para la plataforma Tradingview //reforma del script de LazyBear //@version=3 //adaptado para Prorealtime por bolsatrilera per=30 //title="periods for Emoline", type=integer, step=1, minval=4) hihi = max(high, close[1]) lolo = min(low, close[1]) opop = close[1] bop = 100*(close-opop)/(hihi-lolo) //part of range lin= 1.5*LinearRegression[per](bop) if lin < 0 then backgroundcolor (252,213,208) endif if bop > 0 then r=154 g=205 b=50 else r=255 g=165 b=0 endif return bop coloured (r,g,b)style (histogram)as "True Bop",lin style(line,2)as "Emoline", 0 as "0" |
The Balance of Power by Lazy Bear is this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
REM BALANCE OF POWER // @author LazyBear //código original para la plataforma Tradingview // Balance Of Power - BOP //adaptación para Prorealtime por bolsatrilera length=14 BOP=(close - open) / (high - low) if BOP >0 then if BOP > BOP[1] then r = 154 g = 205 b = 50 else r=255 g=165 b=0 endif elsif BOP >BOP[1] then r=255 g=165 b=0 else r=255 g=0 b=0 endif PlotEma=Average[length](BOP) return BOP coloured (r,g,b)style(histogram)as "Bop",PlotEMA coloured (0,0,255)as "EMA",0 as "0" |
Find exclusive trading pro-tools on