How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

# Custom Indicator for Donchian Channels!!! System Rules Included!

13126 38
Mentor of mine (Mark Helweg) who ran a successful Hedge Fund, and has won several Awards for Quantatative Analysis conducted a free webinar that blew my mind. We’ve all heard most successful Traders make the most money on 5% of their trades. The reason is simple. To make BIG Money You Have to Catch BIG MOVES in the market. Do You Have A system That Get’s You In To Trades With LOW Risk, But Also Has Rules Built In To KEEP You In A WINNING TRADE? Well He Gave Me His System So I Coded It and I’m Passing Along to You….Trade Rules Will be in the First Post. INDICATOR - Donchian Channel that allows you to pick different Periods for the Upper and Lower Band. Read The First Post For an Explanation…..
//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

study(title="CM_Donchian Channels Modified", shorttitle="CM_DC Modified", overlay=true)

length1 = input(4, minval=1, title="Upper Channel")
length2 = input(60, minval=1, title="Lower Channel")

upper = highest(length1)
lower = lowest(length2)

basis = avg(upper, lower)

l = plot(lower, style=line, linewidth=4, color=red)
u = plot(upper, style=line, linewidth=4, color=lime)

plot(basis, color=yellow, style=line, linewidth=1, title="Mid-Line Average")

fill(u, l, color=white, transp=75, title="Fill")
First you have to have a reason you believe what your trading is about to make a potential BIG MOVE on a Daily or Weekly Time Frame. Then you need a System that will allow you to enter the trade with LOW Risk…BUT…the System has to Force you to stay in the Trade when your up a lot and want to take Profits.

***This Indicator Works on BIG Moves…It does not work on Range Bound Symbols. Indicators for Range Bound Symbols are known as Oscillators. RSI, Stochastic, CCI etc, and Upper Indicators based on Standard Deviations like Bollinger Bands.

For this Example I’ll discuss the AUDUSD on the Chart. Top Left of Chart Price went in to consolidation as most symbols do before huge moves.

#1 If your expecting the security to move down you set the value of the lower band to 4.

#2 You set the opposite band between 40 and 100, You can start with 40 and after you have locked in profit move the parameters to 60 or 100.

#3 Rule # 1 - When Price Breaks the 4 bar band you Enter. The initial Stop is 1 Tick outside the opposite band.

#4 Note*** You need Price consolidation b/c even though the opposite band was set at 60 it was close to Entry so your not risking a lot. ****You have to position size so if you get stopped out your not risking more than 1-3% of your capital. This is SO important b/c even though this chart looks great often times you take a loss or two before the trade works. Remember price is in consolidation and it’s impossible to know when it will finally BREAK.

#5 The thin yellow line on the chart is the midband. Typically when price Breaks the consolidation area for the first time it will retrace and test that area.
#6 Rule #2 - When price retraces if it does not reach the midband, and then goes below the 4 bar line add to your position and bring stop to break even. Risk Free Trade besides tying up capital.

#7 Rule #3 If on the first pull back price CLOSES above the midband close half your position limiting your risk. Big moves that are ready to MOVE typically won’t touch the midband. Note on the chart price did not reach the midband and went down over 1000 pips…then retraced to 50% level and continued down not retracing to the midband for currently 780+ pips.

#8 Rule #4 Once you’ve had a big move if price CLOSES above Midband take off half locking in Profits. Re enter if it continues in your direction when price takes out the 4 bar line.

#9 Rule #5 When price goes above the upper band CLOSE TRADE.

#10 Trade what you know…If you understand Fib Levels notice when price retraced to the 50% Fib Level the lower 4 bar line and the upper 60 bar line were CLOSE TOGETHER so when price rejected the 50% Fib Level and took out the 4 bar line you once again had a LOW RISK Entry and would currently be up 780 pips. With profit taken at 950 pips that 1600 pips of profit.

#11 Statistics show when you hunt these big moves the ones you catch only equal about 5% of trades of GREAT Traders. But that 5% makes more than the other 95% of their Trades combined.

Enjoy the indicator and directions are on the chart in the white box on how to get the code….

Check out AAPL on a daily chart with 4 bar on lower band, FB with 4 Bar on Upper Band, TSLA with 4 bar on upper band, GOOG with 4 Bar on upper band….****Easier to use on Stocks b/c you constantly hear about Stocks that MOVING.

Last TIP*** Chuck Hughes has won the World Trading Championship around 7 times and come in 2nd several other times. Use his method. If the 50 EMA is above the 100EMA (On Dow, S&P, NasDaq) search the 52 week high list.

If the 50 EMA is below the 100EMA search the 52 week low list.
Thank you very much for sharing your programmes.
Even if one will not follow them 1:1 the alway give to think and learn new views.
It is completely right that a minority of trades brings the majority of profit. I can confirm it. I cannot confirm the 5%. It is 47% of my deals that are losses. Perhaps I am not good enough yet. It may be that profits are not high enough and losses are to big.
This seem to be a good indicator to inrease the profitability of the winning deals.
Thank you for it.
motleifaul
I just checked it out. Indeed, 14% of my past year's deals brought 85% of the profit. I hadn't expected this.
motleifaul
ChrisMoody
Great, thank you for this comment. It gives me support in my own thoughts. I still spend to much time with making wind.
I had a friend who served in the Finnish navy. He told me that they had Russian and American air defense weapons on board. The Russian made a large number of shots per minute, the American much less. The results where almost the same. The Americans met their target by precisely finding it, the Russians by "simply so much iron in the air", as he said. I shall try to reduce the iron. :-) And you are right, the commisions eat a good deal of the profit.
The problem with longer time frames is that the drawdown for a single deal will be larger. You cannot work with tight stopps and this makes it harder to stand a langer lasting drawdond periode when some deals in series fall into loss. It is difficult to sit and see the deal go wrong and not to react on short term signals to get out. So again, I hope that the indicator shou shared will give same support.
ChrisMoody
Never mind i found it {the bracket thanks again}
Awesome!!! Please how can I code Hull Moving Average to have change colors (uptrend vs. downtrend)?
Thanks.
ericktatch
Just posted a chart with your indicator. Let me know if you want anything else....

Chris.. Thanks again for your excellent post. There is lot to learn from you.
Kautilya
Thanks...I can assure you trading is a life long journey. We all make the same mistakes. I make different mistakes now than I did 10 to 15 years ago. It's important not to make the same mistakes over and over again. It's very important to remember to design your system around capturing big moves in the market. I was lucky my mentor DRILLED that in to me my first 5 years of trading. I've gotten off track a time or two since then...but if I would have not had a great mentor...when I was broke and trying to build my trading account so I could trade full time...If I would have gotten off track then I probably wouldn't have made it.
I could not find the {} brackets. I have click on the 'Make it Mine". But couldn't find anywhere the brackets.
faizal.mansor.908
the brackets are on the chart after clicking make it mine and it takes you to that chart..just look to your top left where the code name is and the it should be the 3rd button that says show source code..just hover your mouse over and the name should come up..you have to change the name for it to save
Hey Chris first thanks for the code..but for some reason i cant get it on the chart am stuck at number 3 "click the curly brackets" could you show a example where the brackets are please?
Andrek1876
Absolutely...There has been so much confusion on this issue I am going to record a video "Showing" how to do this. I'm out of town this weekend but I will post link below and on all future charts I post with custom indicators.
ChrisMoody
Thanks but i found it..but still post the video may help someone else..thanks again
You are right. To paraphrase Richard Donchian - letting your profits run and cutting your losses overides any other rule! The problem I've always had with using the "four week rule" or any other variant of the Donchian Channel over the long time frame particularly nowadays is knowing which markets are truly trending and I have a problem with giving up a large percentage of profits as the price moves across to the opposite channel! However I have often thought of trying this method out on a 15 minute timeframe to catch the mini trends. I have looked at this in theory and it could work out quite well. It could also work well with Renko blocks and I have a picture of what this would look like on the AUDUSD.
Yes, yes thank you for this...you have been making some amazing stuff and well be rewarded for your kind gifts and hard work.

DC has lately become my favorite tool!

You are the man :)
FractalEyeZ
Thanks...Let me know if you need anything.
ChrisMoody
Hello Chris - I'm apparently 'dense' trying to get this indicator, which looks great by the way. I was able to grab you modified CCI indicator by copying code from the comments. On the DC, I am not seeing any arrow on the top right. How do I 'make it mine'? Thanks!
-Vernon
mcdaniel_v
Ahhhh, I found it! Thanks anyway!
mcdaniel_v
Good...Let me know if you need anything else
ChrisMoody
Well, I figured I could fake it after finding the 'Make it Mine' button..after pressing that, I get a new browser tab with a copy of your chart. I don't see curly brackets. Geez, it was so easy on the CCI indicator to just copy the code and paste in the script editor. This one, not so much..any help is appreciated.
mcdaniel_v
Try This...Copy all below this line

//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

study(title="CM_Donchian Channels Modified", shorttitle="CM_DC Modified", overlay=true)

length1 = input(4, minval=1, title="Upper Channel")
length2 = input(60, minval=1, title="Lower Channel")

upper = highest(length1)
lower = lowest(length2)

basis = avg(upper, lower)

l = plot(lower, style=line, linewidth=4, color=red)
u = plot(upper, style=line, linewidth=4, color=lime)

plot(basis, color=yellow, style=line, linewidth=1, title="Mid-Line Average")

fill(u, l, color=white, transp=75, title="Fill")
ChrisMoody
That worked great..thanks!
ChrisMoody
Do you have Donchian Channels for ThinkorSwim?
ChrisMoody
can i just ask what is probably a daft question? when you say "Rule # 1 - When Price Breaks the 4 bar band you Enter." do you mean breaks away from. It just doesn't appear to go through the lower line. I have it downloaded on to my indicators list and it looks like a very good tool, so thanks in advance of the moves.
stefitch
You set the direction you are expecting a breakout to a setting of 4. Going through means current bars close is lower than the value of the 4 period line 1 bar ago or the previous bar...therefore the current close caused the value of the 4 period line to be lower than it was. The opposite is true if you set the Top Line to be the 4 period line.
ChrisMoody
Thanks for that chris.
Hi Chris
Pardon, this is not a comment, but maybe you can help me.
I am from South Africa, and wonder if you can tell me where to find the Donchian Channels with the midline (tree lines - top, bottom and the middle line). So far I could find only the two line Donchian channel. I will appreciate it if you can fill me in on where to get it.
Kind regards
Julius Burmeister
juliusmaatjie
Not 100% sure what you are asking. If you are asking me how to import this custom code I just recorded a video on how to import code...it's the first video on this page... http://videos.tradingview.com
ChrisMoody
f your looking for a regular Donch Channel indicator with midline...then just make sure the values are set to the same for the look back period for both the Donch High and Low lines
ChrisMoody
Hi Chris
I use the MT4 charts and already add the Donchian Channels in the Navigator (indicators) section. But this is the 2 line (top and Bottom) Donchian Channels. I would prefer the three line Donchian Channel. Do you know where I can get one to add to the MT4. I don't know how to add a snip of the donchian to this reply. One see them on Youtube . Refer to the insert for a video.
juliusmaatjie
Just posted V2 of the Indicator...

ChrisMoody
Hi Chris, could it be possible to code for 2 Donchian channels with variable lengths in one script, something like lets say 20 and 50 length Donchian channel together. So, instead of clicking on 2 indicators, 1st for 20 DC and 2nd for 50 DC, it can take of 2 variable lengths in one indicator. Something like the following link where 4 EMAs have been together...
ChrisMoody
Interesting post on Donchian channels. I tried clicking to top right corner of chart a dozen times but nothing happens. Can you email this indicator to me or is it a paid indicator?
Btw, I tried this on Chrome and Firefox browser.
Thanks.
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter