RicardoSantos

[RS]Open Range Breakout V0

570 8 90
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)
planBe PRO
a year ago
For us traders that do not have as much experience, an explanation of your idea would be very helpful
Reply
RicardoSantos PRO planBe
a year ago
this was a request for user DCC, should redirect inquires to him :p
...buy on green, sell on red
Reply
MarxBabu
a year ago
Not working
Reply
gfglenn1 PRO
a year ago
I have a question about this indicator. Should 60 be the setting no matter what time frame you trade on?
Reply
RicardoSantos PRO gfglenn1
a year ago
not at all, should be scaled for the market volatility(market range) and intended performance(trades/time).
Reply
coondawg71 PRO
9 months ago
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
RicardoSantos PRO coondawg71
9 months ago
should be possible, ill give it a shot over the weekend
Reply
coondawg71 PRO RicardoSantos
9 months ago
Thanks a lot!
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out