Need More Help? Book Your FREE Strategy Session With Our Team Today!
We'll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.BOOK YOUR FREE STRATEGY SESSION NOW >>
The Donchian Channel is a price channel formed by two bands, an upper and a lower band, that trace respectively the highest high and the lowest low of the last N periods.
It can be used in different ways but basically it is employed in trend-following systems.
Today we are going to build a trend-following strategy that uses the upper and lower bands as triggers to send entry orders, and we'll test its performance on a well-diversified portfolio of instruments.
Watch the video to learn more about:
- What is the Donchian Channel and how is it calculated?
- How to code it and create a trading system in MultiCharts or TradeStation
- How to determine the number of periods to be used to calculate the bands
Enjoy the video! 😎
Hey everyone! One of the coaches of Unger Academy here and today we’re going to be talking about another widely used indicator in trading: the Donchian Channel.
I'd like to talk about this indicator because in our previous videos we spoke about other indicators which are also built on price channels, namely the Bollinger Bands and the Keltner Channel. If you haven't seen these videos, I recommend you watch them because they are really very useful.
The Donchian Channel Indicator
The Donchian Channel, also known as the Price Channel, consists of two bands, as we've just seen on the chart, an upper band and a lower band.
These bands are calculated using a simple function that identifies the Highest high of the last 'x' periods and the Lowest low of the last 'x' periods. Then, there is also a version that includes a midrange line, which is nothing more than the average of the upper and lower channels.
Plotting these variables (we will now leave out the midrange line) we get the lower band and the upper band of the channel, and this price channel will update when the price reaches a new high or a new low in the last 'x' bars, where 'x' is a number we set as an input. Obviously, we can optimize the number of periods to see which one produces the best results.
Here we see some examples of how the Donchian Channel is calculated. We set 20 periods and since we're using hourly bars, the bands of the channel identify the Highest high of the last 20 hours and the Lowest low of the last 20 hours.
Whenever there is a new high the upper band will update, just as when there is a new low the lower band will update.
This is what happened in these cases, where you can see that the price has risen enough to break through these levels and, as a result, on the next bar, the price of the channel, in this case the upper channel, is then updated.
This indicator can be used in various ways and both in trend-following and reversal strategies. This means that we can use it when we want to trade in favor of the trend, thus buying when prices break through the upper channel and selling when they break through the lower channel, or against the trend, thus buying on the lower channel and selling on the upper channel.
The classic theory suggests to use this channel in a purely trend-following strategy, so we'll focus on this type of trigger in the rest of this video.
As always, MultiCharts and PowerLanguage, a programming language created specifically for trading, come to our aid and make our lives much easier.
The Strategy's Script
Here we see a simple strategy with very few conditions that will serve our purposes. We have set as input the periods that we are going to use to calculate the indicator. Then two variables, the 'Upper Channel' and the 'Lower Channel', which identify the two bands of the channel, the upper and the lower.
These bands are calculated very simply (we see it here in rows 5 and 6) through the 'HighestFC' function, where FC stands for Fast Calculation (which is a speeding up of the 'Highest' function) and the 'LowestFC' function. And these functions identify the Highest high of the last 'x' bars and the Lowest low of the last 'x' bars.
I have also included two conditions for skipping the first bar of each session because, as some of you may know, there may be pitfalls when we open positions during the first bar of each session.
Further down we will then have the entry conditions of the strategy. And we see that we will buy with stop orders on the upper channel and sell with stop orders on the lower channel.
Using this simple strategy on a very large portfolio, and using a 60-minute timeframe, so using hourly bars again, from 1 January 2008 until 28 December 2021, we see that we can already get some good results.
So let me show them to you now. The equity line grows fairly steadily, apart from the last three years, when we have seen a general deterioration in performance. But nothing too dramatic to be honest.
We have currently set 20 periods as the default value, but perhaps optimizing this parameter too would allow us to get an improvement.
In any case, the results are certainly satisfactory. We see that all the markets are profitable except one, and we're happy with that. Gold, as we can see above, Soybeans, Heating Oil and RBOB Gasoline stand out among the rest. Coffee, which is another trend-following commodity, is also doing very well.
Of course, at this point, the overall average trade would still not be sufficient to safely activate this strategy on all of these markets, but this strategy can certainly represent a good starting point to work on some commodities.
Moving on to the optimization of the periods used to calculate the Donchian Channel, let's evaluate the stability of the parameters we have set. As an initial parameter we will use 10 periods and as a final parameter 200 periods in steps of 10 periods.
We can see that all values from 10 up to 100 are profitable. We can see that the very first values are the ones the produce the best results in terms of net profit because obviously the frequency of trading will be higher.
So, let's take 20 as a good starting point, but don't forget to look around for other combinations that can give good results, perhaps even with a reversal approach.
At this point, we can close by saying that the Donchian Channel is certainly a very useful tool that can be suitable for trend-following markets but that may also be useful in reversal strategies. This is proven by the negative results we see in the lower part of the optimization report. Moreover, this price channel could also be used as a trailing stop to close our positions.
So this is certainly a versatile indicator, although it may need some further tweaking to be used for live trading.
Thank you so much for having been with me so far, and I really hope that this video has helped you.
In addition, in the description of this video, we're going to leave you a link to a webinar by the 4-time world trading champion Andrea Unger, who will explain step-by-step how you can become successful with trading systems.
Thanks again, I will see you soon. Bye-bye!
Need More Help? Book Your FREE Strategy Session With Our Team Today!
We’ll help you map out a plan to fix the problems in your trading and get you to the next level. Answer a few questions on our application and then choose a time that works for you.BOOK YOUR FREE STRATEGY SESSION NOW >>
Andrea Unger here and I help retail traders to improve their trading, scientifically. I went from being a cog in the machine in a multinational company to the only 4-Time World Trading Champion in a little more than 10 years.
I've been a professional trader since 2001 and in 2008 I became World Champion using just 4 automated trading systems.
In 2015 I founded Unger Academy, where I teach my method of developing effecting trading strategies: a scientific, replicable and universal method, based on numbers and statistics, not hunches, which led me and my students to become Champions again and again.
Now I'm here to help you learn how to develop your own strategies, autonomously. This channel will help you improve your trading, know the markets better, and apply the scientific method to financial markets.
Becoming a trader is harder than you think, but if you have passion, will, and sufficient capital, you'll learn how to code and develop effective strategies, manage risk, and diversify a portfolio of trading systems to greatly improve your chances of becoming successful.