RicardoSantos

[RS]Open Range Breakout V0

683 8 112
Remove from Favorite Scripts Add to Favorite Scripts
//@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)
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!
Reply
should be possible, ill give it a shot over the weekend
Reply
coondawg71 PRO RicardoSantos
Thanks a lot!
Reply
I have a question about this indicator. Should 60 be the setting no matter what time frame you trade on?
Reply
not at all, should be scaled for the market volatility(market range) and intended performance(trades/time).
Reply
Not working
Reply
For us traders that do not have as much experience, an explanation of your idea would be very helpful
Reply
this was a request for user DCC, should redirect inquires to him :p
...buy on green, sell on red
Reply
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体
台灣
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out