soru

NUT

209 10 21
Hello,
No detailed description as usual

Cheers,
soru
Remove from Favorite Scripts Add to Favorite Scripts
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)

can elaborate a bit?
Reply
soru jangseohee
green box shows movement in EU session, red shows movement in US session.
Yellow line = weekly pivot (in options you can tick daily pivot also).
Black lines = daily top/bottom

This script is for intraday only:)
Reply
what can be done about the chart time frame not corresponding correctly?
Reply
soru coondawg71
meaning what? this one is strictly for intraday
Reply
not your indicator in particular, but how TV plotting doesn't line up with time based indicators vertically. Anything based on a time does not line up with the correct time. "MPC" for example, or anything session related. I'm sure they will get it fixed eventually.
Reply
soru coondawg71
I'm not sure if we are on the same page but:
Red/green 'boxes' show US/EU session respectively.
I've checked MPC chart - it works correctly. MPC is in these boxes all the time as trading hours for it are fully in US session.
Reply
LOL! You must have the magic touch. Ever since I have been a member of TV none of the time based indicators lined up correctly, others had the same issue too. But now, all is well, not only are you a good coder, you have the Midas touch. Good indicator as I am a FX trader too. Thanks for sharing.
Reply
soru coondawg71
Thanks:). I guess its all about the way you code it and how you look at the problem your are facing - you can easily miss important factors and the script might work only for 'some' charts.
Thanks again.
Reply
Intriguing...Have you tried coding strategies yet?
You're a good coder, me not so much...
+1 Reply
soru IvanLabrie
Thanks bud.
I have not used TV for some time. Will take a look at it in free time.
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
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