samuelhei

DYNAMIC S&R 2.0

This indicator shows the support and resistance levels of four periods. Now you can customize it entirely, defining the periods and what you can show, or not.

When a weaker support/resistance is broken you now what is the next support/resistance.

The average of support and resistance can be used as an entry point or as a indicator of bear/bull market (when the close price is below the average the market is bear, and when the close price is above the average the market is bull).

To add to your chart, add this to favorites and in your chart go to indicators, then to favorites, and it will appear on the right side.

Please, give-me your feedback! And a Tip if you will use it.
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
study("Dynamic S&R",overlay=true)

// Author: samuelhei
// Tips: 1NR9tyn8tAn6nuQzosaZ2SkfT38PLxN5mf
// Feel free to use this script as you want!

a = input(400,"A (bars back)") 
ha = input(true,"Habilitate A",type=bool)
hb = input(true,"Habilitate B",type=bool)
hc = input(true,"Habilitate C",type=bool)
hd = input(true,"Habilitate D",type=bool)

cb = input(0,"Custom B 0=(A/2)",type=integer)
cc = input(0,"Custom C 0=(B/2)",type=integer)
cd = input(0,"Custom D 0=(C/2)",type=integer)


hac = input(true,"Habilitate Average of support and resistance of D", type=bool)
avm = input(1,"Multiplier of averege line.", type=float)

b = cb ? cb : a/2
c = cc ? cc :b/2
d = cd ? cd :c/2

hga = highest(close,a)
hgb = highest(close,b)
hgc = highest(close,c)
hgd = highest(close,d)

la = lowest(close,a)
lb = lowest(close,b)
lc = lowest(close,c)
ld = lowest(close,d)

pha = plot(ha ? hga : na,"Highest A",gray)
phb = plot(hb ? hgb : na,"Highest B",gray)
phc = plot(hc ? hgc : na,"Highest C",gray)
phd = plot(hd ? hgd : na,"Highest D",gray)


fill(pha,phb,black,70)
fill(phb,phc,black,80)
fill(phc,phd,black,90)

pla = plot(ha ? la : na,"Lowest A",gray)
plb = plot(hb ? lb : na,"Lowest B",gray)
plc = plot(hc ? lc : na,"Lowest C",gray)
pld = plot(hd ? ld : na,"Lowest D",gray)

fill(pla,plb,black,70)
fill(plb,plc,black,80)
fill(plc,pld,black,90)

av = ((hgd + ld) / 2)*avm

plot(hac ? av : na,"Average",black)