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)