Balance of power indicator
Forums › ProRealTime English forum › ProBuilder support › Balance of power indicator
- This topic has 4 replies, 4 voices, and was last updated 8 years ago by
bolsatrilera.
-
-
10/11/2017 at 11:53 AM #49027
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 level10/11/2017 at 12:14 PM #4902910/11/2017 at 2:08 PM #49040I translated the indicator into ProBuilder version, you can find and download it here now: Balance of Power
10/12/2017 at 11:31 AM #49114Hi, Nicolas,your version is the True Balance of Power,I have this version:
1234567891011121314151617181920212223242526REM TRUE BALANCE OF POWER// código original de eykpunter para la plataforma Tradingview//reforma del script de LazyBear//@version=3//adaptado para Prorealtime por bolsatrileraper=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 rangelin= 1.5*LinearRegression[per](bop)if lin < 0 thenbackgroundcolor (252,213,208)endifif bop > 0 thenr=154g=205b=50elser=255g=165b=0endifreturn bop coloured (r,g,b)style (histogram)as "True Bop",lin style(line,2)as "Emoline", 0 as "0"10/12/2017 at 11:35 AM #49116The Balance of Power by Lazy Bear is this:
1234567891011121314151617181920212223242526272829303132REM BALANCE OF POWER// @author LazyBear//código original para la plataforma Tradingview// Balance Of Power - BOP//adaptación para Prorealtime por bolsatrileralength=14BOP=(close - open) / (high - low)if BOP >0 thenif BOP > BOP[1] thenr = 154g = 205b = 50elser=255g=165b=0endifelsif BOP >BOP[1] thenr=255g=165b=0elser=255g=0b=0endifPlotEma=Average[length](BOP)return BOP coloured (r,g,b)style(histogram)as "Bop",PlotEMA coloured (0,0,255)as "EMA",0 as "0" -
AuthorPosts
Find exclusive trading pro-tools on