RicardoSantos

[RS]Open Range Breakout V3

2239瀏覽
312
2239 7
Request for DCC/coondawg71
added support for using session.

theres a issue with the session it needs to have the format inverted:
(start-end) to (end-start)
'0000-1500' to '1500-0000'
從喜愛的腳本中移除 添加到喜愛的腳本
//@version=2
study(title='[RS]Open Range Breakout V3', shorttitle='ORB', overlay=true)
//  Request for DCC
mode = input(title='Mode (1:timeframe, 2:session):', type=integer, minval=1, maxval=2, defval=1)
tf = input(title='Timeframe for open range:', type=string, defval='60', confirm=false)
tf2 = input(title='Timeframe for range capture:', type=string, defval='D', confirm=false)
sess = input(title='Session for mode 2:', type=string, defval='0400-1500')

f_is_new_day(_mode) => _mode == 1 ? change(time(tf2))!=0 : _mode == 2 ? change(time(tf2, sess))!=0 : false

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

ND_stretch = na(ND_stretch[1]) ? 0 : f_is_new_day(mode) ? (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(mode) ? na : ND_high
filter_low = f_is_new_day(mode) ? na : ND_low

filter_high_stretch = f_is_new_day(mode) ? na : ND_high+ND_stretch
filter_low_stretch = f_is_new_day(mode) ? 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)
thanks for h=the great work and can you explain more about the TS and BS calcualtion. I am new here. thanks
回覆
@davincitom, it calculates the range from the opening based on the timeframe and weighted by the previous value
回覆
Change = Chance.
回覆
i dont, but you may feel free to copy/adapt or ask/hire someone to do it.
回覆
Hey Ricardo. I am using this study on my TradingView account with CQG. Do you have a Thinkscript version by any change? Thanks.
回覆
RicardoSantos...What's up man...Been a long time. Your Scripts are always on point. Good Job....
回覆
thx man, means a lot coming from you.
回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 節目 如何運作 圖表功能 價格 網站規則 版主 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 幫助中心 推薦朋友 功能請求 部落格 & 新聞 常見問題 維基 推特
概述 個人資料設定 賬戶和賬單 推薦朋友 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出