RicardoSantos

[RS]Fractal Support and Resistance V0

Fractal based SR levels:
lime and red are hidden levels based on "/\" lows and "\/" highs.
green and maroon are based on regular fracals "\/" lows and "/\" highs.
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?
study(title='[RS]Fractal Support and Resistance V0', overlay=true)
h = high
l = low
c = close
hh = h[4] < h[2] and h[3] < h[2] and h[2] > h[1] and h[2] > h
ll = l[4] > l[2] and l[3] > l[2] and l[2] < l[1] and l[2] < l
hl = l[4] < l[2] and l[3] < l[2] and l[2] > l[1] and l[2] > l
lh = h[4] > h[2] and h[3] > h[2] and h[2] < h[1] and h[2] < h
hl_high = hl ? h[2] : c < hl_high[1] ? hl_high[1] : na
lh_low = lh ? l[2] : c > lh_low[1] ? lh_low[1] : na
hh_high = hh ? h[2] : c < hh_high[1] ? hh_high[1] : na
ll_low = ll ? l[2] : c > ll_low[1] ? ll_low[1] : na
//plot(hl ? l[2] : na, color=gray, offset=-2)
//plot(lh ? h[2] : na, color=gray, offset=-2)
plot(hl_high, style=circles, color=red, linewidth=2, offset=-2)
plot(lh_low, style=circles, color=lime, linewidth=2, offset=-2)

plot(hh_high, style=circles, color=maroon, linewidth=3, offset=-2)
plot(ll_low, style=circles, color=green, linewidth=3, offset=-2)