May I seek your assistance in converting the following tradingview code to proreal code?
study(“Basic BIAS”, shorttitle = “BIAS”)
n = input(title=”Basic guides line”, type=input.integer, defval=120)
//Basic guides can be replaced with other guides
basic_line = ema(close,n)
bias = (close – basic_line) / basic_line * 100
plot(bias,color=#1589F5,style = plot.style_stepline, transp=0)
hline(0,title = “Zero”, color=#0F001A)
Thanks indeed.
It is the normalized distance of the current price related to an EMA, here is the Prorealtime code:
n=120 //period
basic_line = average[n,1](close)
bias = (close – basic_line) / basic_line * 100
return bias
Thanks Nicolas. Always helpful.