tmr0

Relative True Range

Dots show the total movement for the period as a percentage (profit potential).
Line shows the volatility of the period in relation to the beginning of the period.
Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?
//coded by tmr0
//точки показывают суммарное движение за период в процентах (потенциальная прибыль)
//линия показывает волатильность за период по отношению к началу периода
// dots show the total movement for the period as a percentage (profit potential)
// line shows the volatility of the period in relation to the beginning of the period

study(title="Relative True Range", shorttitle="tRTR", overlay=false, precision=1)
res = input("D", type=resolution)
len = input(20, minval=1)

y0 = (highest(len)-lowest(len))/hl2[len-1]*100
y = security(tickerid, res, y0)
z1= (high-low)/open
z0 = sum(z1, len)*100
z = security(tickerid, res, z0)

plot(z, color=purple, style=circles, transp=0, linewidth=2)
plot(y, color=y>50?red:y>25?orange:y>10?green:blue, style=area, transp=60)

hline(0, linestyle=dotted, color=blue)
hline(10, linestyle=dotted, color=green)
hline(25, linestyle=dotted, color=orange)
hline(50, linestyle=dotted, color=red)