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.

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
//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)