RicardoSantos

[RS]jangseohee NYSE - NHNL Indicator

Request for jangseohee: added fractal channels as a extra :p
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
study("[RS]jangseohee NYSE - NHNL Indicator V0")
timeperiod = input("D")
NH = security("HIGN", timeperiod, close)
NL = security("LOWN", timeperiod, close)
plot(NH, color=green, style=columns)
plot(-NL, color=maroon, style=columns)

showvectorchannel1 = input(true)
showvectorchannel2 = input(false)
showvectorchannel3 = input(false)
showvectorchannel4 = input(false)
showvectorchannel5 = input(false)

topvc1 = NH[2] < NH[1] and NH[1] > NH[0]
botvc1 = NL[2] < NL[1] and NL[1] > NL[0]

topv1 = topvc1 ? NH[1] : na
botv1 = botvc1 ? -NL[1] : na

plot(showvectorchannel1 ? topv1 : na, color=silver, offset=-1)
plot(showvectorchannel1 ? botv1 : na, color=silver, offset=-1)

topvc2 = topvc1 and valuewhen(topvc1, topv1, 1) < topv1
botvc2 = botvc1 and valuewhen(botvc1, botv1, 1) > botv1

topv2 = topvc2 ? NH[1] : na
botv2 = botvc2 ? -NL[1] : na

plot(showvectorchannel2 ? topv2 : na, color=gray, offset=-1)
plot(showvectorchannel2 ? botv2 : na, color=gray, offset=-1)

topvc3 = topvc2 and valuewhen(topvc2, topv2, 1) < topv1
botvc3 = botvc2 and valuewhen(botvc2, botv2, 1) > botv1

topv3 = topvc3 ? NH[1] : na
botv3 = botvc3 ? -NL[1] : na

plot(showvectorchannel3 ? topv3 : na, color=black, offset=-1)
plot(showvectorchannel3 ? botv3 : na, color=black, offset=-1)

topvc4 = topvc3 and valuewhen(topvc3, topv3, 1) < topv1
botvc4 = botvc3 and valuewhen(botvc3, botv3, 1) > botv1

topv4 = topvc4 ? NH[1] : na
botv4 = botvc4 ? -NL[1] : na

plot(showvectorchannel4 ? topv4 : na, color=black, offset=-1)
plot(showvectorchannel4 ? botv4 : na, color=black, offset=-1)

topvc5 = topvc4 and valuewhen(topvc4, topv4, 1) < topv1
botvc5 = botvc4 and valuewhen(botvc4, botv4, 1) > botv1

topv5 = topvc5 ? NH[1] : na
botv5 = botvc5 ? -NL[1] : na

plot(showvectorchannel5 ? topv5 : na, color=black, offset=-1)
plot(showvectorchannel5 ? botv5 : na, color=black, offset=-1)