soru

NUT

30
Hello,
No detailed description as usual

Cheers,
soru
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title="NUT",shorttitle="NUT", overlay=true)
timeinrange(res, sess) => time(res, sess) != 0


//ny_high = security(tickerid,'510',high)
//ny_low = security(tickerid,'510',low)
len_tf = ismonthly? 1 : isweekly ? 1 : isdaily? 1 : interval>60 ? 9 : interval>15 ? 36 : interval>5 ? 110 : interval >= 1 ? 540 : 1
ny_highs = timeinrange(period, "0800-1700") ? high : na
ny_lows = timeinrange(period, "0800-1700") ? low : na
ny_high = highest(ny_highs,len_tf)
ny_low = lowest(ny_lows,len_tf)
n1= plot(timeinrange(period, "0800-1700") ? ny_high : na,style=areabr,transp=100)
n2=plot(timeinrange(period, "0800-1700")  ? ny_low:na,style=areabr,transp=100)
nf = fill(n1,n2,color=red)

eu_highs = timeinrange(period, "0300-1200") ? high : na
eu_lows = timeinrange(period, "0300-1200") ? low : na
eu_high = highest(eu_highs,len_tf)
eu_low = lowest(eu_lows,len_tf)
e1= plot(timeinrange(period, "0300-1200") ? eu_high : na,style=areabr,transp=100)
e2=plot(timeinrange(period, "0300-1200")  ? eu_low:na,style=areabr,transp=100)
ef = fill(e1,e2,color=green)

daily_high = security(tickerid,"1D",high)
daily_low = security(tickerid,"1D",low)
plot(daily_high,style=line,color=black)
plot(daily_low,style=line,color=black)

pivot = (high + low + close ) / 3.0 
dp = input(false, title="Show Daily Pivots?")
wp = input(true, title="Show Weekly Pivots?")
daily_pivot = security(tickerid, 'D', pivot[1]) 
weekly_pivot = security(tickerid, 'W', pivot[1]) 
plot(dp ? daily_pivot : na, style=circles,linewidth=1,color=blue)
plot(wp ? weekly_pivot : na, style=circles,linewidth=1,color=orange)