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.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
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)