RicardoSantos

[RS]Open Range Breakout V0

1297 visningar
218
1297 9
Request for DCC
Ta bort från favoritskript Lägg till som favoritskript
//@version=2
study(title='[RS]Open Range Breakout V0', shorttitle='ORB', overlay=true)
//  Request for DCC
tf = input(title='Timeframe for open range:', type=string, defval='60', confirm=false)
f_is_new_day() => change(time('D'))!=0

ND_open = f_is_new_day() ? security(tickerid, tf, open) : ND_open[1]
ND_high = f_is_new_day() ? security(tickerid, tf, high) : ND_high[1]
ND_low = f_is_new_day() ? security(tickerid, tf, low) : ND_low[1]

ND_stretch = na(ND_stretch[1]) ? 0 : f_is_new_day() ? (ND_stretch[1]*9 + security(tickerid, tf, (high-open)>=(open-low)?high-open:open-low)) / 10 : ND_stretch[1]

filter_high = f_is_new_day() ? na : ND_high
filter_low = f_is_new_day() ? na : ND_low

filter_high_stretch = f_is_new_day() ? na : ND_high+ND_stretch
filter_low_stretch = f_is_new_day() ? na : ND_low-ND_stretch

fh = plot(title='TR', series=filter_high, style=linebr, color=black)
fl = plot(title='BR', series=filter_low, style=linebr, color=black)
fhs = plot(title='TS', series=filter_high_stretch, style=linebr, color=green)
fls = plot(title='BS', series=filter_low_stretch, style=linebr, color=maroon)
fill(title='Positive Stretch', plot1=fh, plot2=fhs, color=green, transp=50)
fill(title='Negative Stretch', plot1=fl, plot2=fls, color=maroon, transp=50)
Ricardo - Love this, but as with Cooney_S that I'd like to be able to set the opening time start, this works on ES Futures but starts a new day at 6pm, how would we set this (not a coder) so that the day starts at 9:30am? Thanks...
Svara
Question please: Can we make it so a particular time period and be set at the "Open Range"? For example, I would like to set up the range to be from 10am -12pm. Thanks!
Svara
should be possible, ill give it a shot over the weekend
Svara
cooney_s RicardoSantos
Thanks a lot!
Svara
I have a question about this indicator. Should 60 be the setting no matter what time frame you trade on?
Svara
not at all, should be scaled for the market volatility(market range) and intended performance(trades/time).
Svara
Not working
Svara
For us traders that do not have as much experience, an explanation of your idea would be very helpful
+1 Svara
this was a request for user DCC, should redirect inquires to him :p
...buy on green, sell on red
+2 Svara
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Program Hur det fungerar Diagramfunktioner Priser Refer a friend Ordningsregler Help Center Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Blogg och nyheter Twitter
Profil Profilinställningar Konto och fakturering Refer a friend Mina kölappar Help Center Publicerade idéer Följare Följer Privata meddelanden Chatt Logga ut