RicardoSantos

[RS]Open Price Trail V0

334 visningar
24
EXPERIMENTAL: added a average level of ( ( previous average+current level ) / 2) to show trending direction and action zone.
Ta bort från favoritskript Lägg till som favoritskript
study(title="[RS]Open Price Trail V0", shorttitle="[RS]OPT.V0", overlay=true)
mode = input("hour")
hourfix = input(19, title="hourfix(at what time is 00h correct):", minval=0, maxval=23)
openprice = mode == "hour" ? valuewhen(minute == 0, open, 0) :
        mode == "day" ?
            ( isintraday ? valuewhen(hour == hourfix and minute == 0, open, 0) :
            valuewhen(hour == hourfix, open, 0) ) :
        mode == "week" ?
            ( isintraday ? valuewhen(dayofweek == 1 and hour == hourfix and minute == 0, open, 0) :
            valuewhen(dayofweek == 1, open, 0) ) :
        mode == "month" ?
            ( isintraday ? valuewhen(dayofmonth == 1 and hour == hourfix and minute == 0, open, 0) : 
            valuewhen(dayofmonth == 1, open, 0) ) :
        mode == "year" ?
            ( isintraday ? valuewhen(weekofyear == 1 and dayofweek == 1 and hour == hourfix and minute == 0, open, 0) :
            isdaily ? valuewhen(weekofyear == 1 and dayofweek == 1, open, 0) :
                valuewhen(weekofyear == 1, open, 0) ) : na

scolor = openprice != openprice[1] ? na : close >= openprice ? green : maroon
p1 = plot(openprice, color=scolor, linewidth=2)

pretracker = nz(tracker[1], openprice[1])
tracker = openprice != openprice[1] ? avg(pretracker, openprice) : pretracker
p2 = plot(tracker, color=gray)
fill(p1, p2, color=gray, transp=80)

Kommentarer

Kind of looks like a pivot, I'll take a look.
You got pm.
Svara
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Hur det fungerar Diagramfunktioner Priser Tipsa en vän Ordningsregler Hjälpcenter Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Blogg och nyheter Twitter
Profil Profilinställningar Konto och fakturering Hänvisade vänner Mynt Mina kölappar Hjälpcenter Publicerade idéer Följare Följer Privata meddelanden Chatt Logga ut