RicardoSantos

[RS]Gap SR Zones V0

EXPERIMENTAL:
Request for MarxBabu.
Von Favorisierten Skripten entfernen Zu Favorisierten Skripten hinzufügen
//@version=2
study(title='[RS]Gap SR Zones V0', shorttitle='Gap', overlay=true)
bars = input(20)

is_gap_up = open > close[1] + syminfo.mintick
is_gap_down = open < close[1] - syminfo.mintick
bars_since_gap_up = barssince(is_gap_up)
bars_since_gap_down = barssince(is_gap_down)

gap_up_open = is_gap_up ? open : bars_since_gap_up > bars ? na : gap_up_open[1]
gap_up_high = is_gap_up ? highest(2) : bars_since_gap_up > bars ? na : gap_up_high[1]
gap_up_low = is_gap_up ? lowest(2) : bars_since_gap_up > bars ? na : gap_up_low[1]

gap_down_open = is_gap_down ? open : bars_since_gap_down > bars ? na : gap_down_open[1]
gap_down_high = is_gap_down ? highest(2) : bars_since_gap_down > bars ? na : gap_down_high[1]
gap_down_low = is_gap_down ? lowest(2) : bars_since_gap_down > bars ? na : gap_down_low[1]

plot(title='Up Open', series=gap_up_open, style=linebr, color=black, linewidth=2)
up_1 = plot(title='Up High', series=gap_up_high, style=linebr, color=black, linewidth=1)
up_2 = plot(title='Up Low', series=gap_up_low, style=linebr, color=black, linewidth=1)
fill(up_1, up_2, color=red, transp=75)

plot(title='Down Open', series=gap_down_open, style=linebr, color=black, linewidth=2)
down_1 = plot(title='Down High', series=gap_down_high, style=linebr, color=black, linewidth=1)
down_2 = plot(title='Down Low', series=gap_down_low, style=linebr, color=black, linewidth=1)
fill(down_1, down_2, color=lime, transp=75)
Startseite Aktien-Screener Forex-Screener Krypto-Screener Wirtschaftskalender So funktioniert es! Chartmerkmale Preise Hausregeln Moderatoren Webseite & Brokerlösungen Widgets Charting Lösungen Hilfe Center Feature-Anfrage Blog & News FAQ - Häufige Fragen & Antworten Wiki Twitter
Profil Profileinstellungen Konto und Abrechnung TradingView Coins Meine Support Tickets Hilfe Center Veröffentlichte Ideen Followers Ich folge Private Nachrichten Chat Abmelden