ChrisMoody

Custom Indicator - No Trade Zone Warning Back Ground Highlights!

Years ago I did an analysis of my trades. Every period of the day was profitable except for two. From 10:00-1030, and 1:00 to 1:30. (I was actively Day Trading Futures) Imagine a vertical graph broken down in to 30 minute time segments. I had nice Green bars in every time slot (Showing Net Profits), and HUGE Red Bars from 10 to 10:30 and 1 to 1:30. After analysis I found I made consistent profits at session open, but then I would enter in to bad setups around 10 to make more money. I also found after I took lunch when I came back at 1:00 I would force trades instead of patiently waiting for a great trade setup. I created an indicator that plotted a red background around those times telling me I was not allowed to enter a trade. Profits went up!!! Details on How to adjust times are in 1st Post. You can adjust times and colors to meet your own trading needs.

开源脚本

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

免责声明

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

想在图表上使用此脚本?
//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)