RicardoSantos

[RS]Gap SR Zones V0

EXPERIMENTAL:
Request for MarxBabu.
Favori Komutlardan Çıkart Favori Komutlara Ekle
//@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)
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Kurallarımız Moderatörler Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Yardım Alın Yeni Özellik Talebi Blog ve Haberler SSS Viki Twitter
Profil Profil Ayarları Hesap ve Ödemeler Yardım Alın Yayınlanmış Fikirler Takip Edenler Takip Ediliyor Özel Mesajlar Sohbet Çıkış