//Created By User ChrisMoody //Created on 3-5-14 //Special Thanks to TheLark for showing me who to create the On/Off Check Boxes for The Plots. study(title="CM_No-Trade-Zone", shorttitle="CM_NoTradeZone",overlay=true) timeinrange(res, sess) => time(res, sess) != 0 sNT1 = input(true, title="No Trade Zone 9:30-10:00 AM EST?") sLunch = input(true, title="Lunch 12:00-1:00 PM EST") sNT2 = input(true, title="NTZ 1:00-1:30 PM EST") warnClose = input(true, title="Warning Close 3:30-3:50 PM EST") warnCloseFinal = input(true, title="Warning Close Final 3:50-3:55 PM EST") //Extra Plots If Needed - Step1 - make sure you make active Step 2 and Step 3 Below // Make active by deleting the to forward slashes at the left of extraPlot1 and 2 //extraPlot1 = input(true, title="ExtraPlot1 add Time Description") //extraPlot2 = input(true, title="ExtraPlot2 add Time Description") noTrade1 = red lunchHour = yellow noTrade2 = red warn_Close = orange warn_CloseFinal = orange //Make active by deleting the to forward slashes at the left of extraPlot_1 and 2 - You can change colors here //extraPlot_1 = red //extraPlot_2 = red //Must use Military Time 1300 = 1:00PM //***Make sure your time zone is set to your correct time zone bgcolor(sNT1 and timeinrange(period, "0930-1000") ? noTrade1 : na, transp=60) bgcolor(sLunch and timeinrange(period, "1200-1300") ? lunchHour : na, transp=60) bgcolor(sNT2 and timeinrange(period, "1300-1330") ? noTrade2 : na, transp=60) bgcolor(warnClose and timeinrange(period, "1530-1550") ? warn_Close : na, transp=50) bgcolor(warnCloseFinal and timeinrange(period, "1550-1555") ? warn_CloseFinal : na, transp=10) //Additional Plots if needed STEP 3 Adjust Time //bgcolor(extraPlot1 and timeinrange(period, "1000-1030") ? extraPlot_1 : na, transp=60) //bgcolor(extraPlot2 and timeinrange(period, "1400-1430") ? extraPlot_2 : na, transp=60)
Optimized for a 5 Minute Bar or Less. Max 30 Minute Bar (Won’t Show FinalWarning). To use a larger timeframe like 60 minutes all of the times need to cover a 60 minute period.
This indicator defaults to a period of NoTradeZone (Red) 9:30 to 10am, 12-1 (Lunch Hour-Yellow), NoTradeZone (Red) 1-1:30 and an WarningMarketsClosing Orange plot from 3:30 until 3:50pm and FinalWarning (Dark Orange) 3:50-3:55. You can change colors in the settings. But you have to go in to the source code to change times (Currently it’s not possible to set up where you can enter times in the Inputs Tab). Also make sure you have your time zone set Correctly!!!
You Must Watch Video Titled “Changing Time In The Code” For Directions On Adjusting Time Periods.
New Video Titled “Importing Custom Indicators” explains How To Install Using PasteBin Link to get Code for Indicator.
Link To Both Videos…Blog Post Dated Mar 03 2014: http://blog.tradingview.com
Link To Copy Code: http://pastebin.com/gS0mnDtk
If your looking for specific charting features let me know and i can pint you in the right direction. However...I can assure you with the upgrades TradingView has planned over the next 3-6 months this platform will give you more features than other platforms.