soru

soru H/L zones

50
shared on Delta's requst:)

hf
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
study("soru H/L zones", "soru H/L zones", overlay=true)

//inputs
h_left1 = input(title="H left 1", type=integer, defval=30)
h_left2 = input(title="H left 2", type=integer, defval=90)
h_left3 = input(title="H left 3", type=integer, defval=240)
h_left4 = input(title="H left 4", type=integer, defval=480)
show_channel1 = input(title="Show channel 1", type=bool, defval=true)
show_channel2 = input(title="Show channel 2", type=bool, defval=true)
show_channel3 = input(title="Show channel 3", type=bool, defval=true)
show_channel4 = input(title="Show channel 4", type=bool, defval=true)

h_left_low1 = lowest(h_left1)
h_left_low2 = lowest(h_left2)
h_left_low3 = lowest(h_left3)
h_left_low4 = lowest(h_left4)
h_left_high1 = highest(h_left1)
h_left_high2 = highest(h_left2)
h_left_high3 = highest(h_left3)
h_left_high4 = highest(h_left4)
newlow1 = low <= h_left_low1
newlow2 = low <= h_left_low2
newlow3 = low <= h_left_low3
newlow4 = low <= h_left_low4
newhigh1 = high >= h_left_high1
newhigh2 = high >= h_left_high2
newhigh3 = high >= h_left_high3
newhigh4 = high >= h_left_high4

channel_high1 = plot(show_channel1 ? h_left_low1 : 0, color=black)
channel_low1 = plot (show_channel1 ? h_left_high1 : 0, color=black)
//fill(channel_high, channel_low, color=gray, transp=70)
channel_high2 = plot(show_channel2 ? h_left_low2 : 0, color=black)
channel_low2 = plot (show_channel2 ? h_left_high2 : 0, color=black)
channel_high3 = plot(show_channel3 ? h_left_low3 : 0, color=black)
channel_low3 = plot (show_channel3 ? h_left_high3 : 0, color=black)
channel_high4 = plot(show_channel4 ? h_left_low4 : 0, color=black)
channel_low4 = plot (show_channel4 ? h_left_high4 : 0, color=black)