ChrisMoody

CM_Donchian Channels Modified_V2 - Alert Capable

CM_Donchian Channels Modified_V2 With Alert Capability

***This Indicator was created by user Request to Add Alerts Capabilities for Donchian Channels .

New Features:
***Alerts Work - Ability To Create Alerts From Main Indicator.
***Can Also Be Used In Conjunction with Lower Indicator - CM_Donchian Channels Modified_V2_Lower_Alert
***Added Ability To Turn On/Off Highlight Bars.
***Added Ability to Turn On/Off Donch Channel Midline
***Added Ability to Turn On/Off Triangles That Plot At Top and Bottom Of Chart When Breakout Condition is TRUE.

Special Indicator Features:
***Ability To Use Different LookBack Period on Upper and Lower Donch Channel Lines.

How To Create Alerts:
***Create Alert by selecting Indicator - Either the name of the Upper Or Lower Indicator...
***Then select either Alert Breakout Upside or Downside(To The Right Of Indicator Name)
***Select Greater Than
***Select Value
***For Value put .99


Original Post Explaining Indicator is -
***If You Need Help Getting Custom Indicators to Trigger Alerts then View This Post.
오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?
//Modified Donchonian Channel with separate adjustments for upper and lower levels
//Purpose is if you expect big move up, Use lower input example 3 or 4, and longer lower input, 40 - 100 and use lower input line as a stop out
//Opposite if you expect big move down
//Mid Line Rule in Long Example.  If lower line is below entry take partial profits at Mid Line and move stop to Break even.
//If Lower line moves above entry price before price retraces to midline use Lower line as Stop...Opposite if Shorting
//Created by user ChrisMoody 1-30-2014

//Updated 12-14-2014 by ChrisMoody, Added Alert Capability, Bars Change Colors Based on Breakouts.Arrows At Bottom Showing Entry
//Create Alert by selecting Indicator, then either Alert Breakout Upside or Downside, Select Greater Than, Select Value, for Value put .99

study(title="CM_Donchian Channels Modified_V2", shorttitle="CM_DC Modified_V2", overlay=true)
length1 = input(20, minval=1, title="Upper Channel")
length2 = input(20, minval=1, title="Lower Channel")
sml = input(true, title="Show Mid-Line?")
shb = input(true, title="Show Highlight Bars When Breaking out?")
sa = input(true, title="Show Arrows on Top And Bottom of Screen When Breaking Out?")

upper = highest(length1)
lower = lowest(length2)
basis = avg(upper, lower)

break_Above = close > upper[1] ? 1 : 0
break_Below = close < lower[1] ? 1 : 0

break_AboveHB() => shb and close > upper[1] ? 1 : 0
break_BelowHB() => shb and close < lower[1] ? 1 : 0

plot(break_Above, title="Alert Breakout Upside", style=circles, linewidth=1, color=white)
plot(break_Below, title="Alert Breakout Downside", style=circles, linewidth=1, color=white)

barcolor(break_AboveHB() ?  fuchsia : na)
barcolor(break_BelowHB() ?  fuchsia : na)

plotshape(sa and break_Above ? break_Above : na, title="Arrows Showing Break Above", style=shape.triangleup, location=location.bottom, color=lime)
plotshape(sa and break_Below ? break_Below : na, title="Arrows Showing Break Above", style=shape.triangledown, location=location.top, color=red)

u = plot(upper, title="Upper DC Band", style=line, linewidth=4, color=lime)
l = plot(lower, title="Lower DC Band", style=line, linewidth=4, color=red)
plot(sml and basis ? basis : na, title="Mid-Line", color=yellow, style=line, linewidth=1)

fill(u, l, color=white, transp=75, title="Fill")

코멘트

Hi Chris. Thanks for this and all your great indicators. Definitely appreciate the work. I like this one a lot but I've been looking at it and I'm seeing instances where price causes the donchian channel to move up/down but a green/red triangle doesn't appear. I can even see instances in the main example on this page. Is there a parameter I'm not aware of that is filtering out certain moves to produce the triangle? I've looked at the code and am not seeing anything, but then again I'm not that well-versed in this area so who knows. From my understanding anytime price causes the donchian to increase or decrease due to the current bar's price action we should be seeing a green/red triangle. Is this correct? Thanks in advance! Any help or clarification would be appreciated.
+13 응답
👏
+1 응답