forexpirate

Trading Time

Code put blue bars during times you input. I put it to show times I am asleep and not alert to trade. I also put code into strategy to control when trades can open or close. FXCM and IDC exchanges have different time zones, as well as AMEX, etc. You will have to change it for each zone.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="Trading Time",shorttitle="Trading Time", overlay=true)
nt = input('0230-0915', type=session, title="Not Trading")
nttime =  nt
bgPlot2 = (time(period, nttime))
bgcolor(bgPlot2 and isintraday? navy : na,transp=30,title="Time")