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)