Donchian Channels Indicator

Avatar
  • updated

What Are Donchian Channels?

Donchian Channels are three lines generated by moving average calculations that comprise an indicator formed by upper and lower bands around a midrange or median band. The upper band marks the highest price of a security over N periods while the lower band marks the lowest price of a security over N periods. The area between the upper and lower bands represents the Donchian Channel.

https://www.investopedia.com/terms/d/donchianchannels.asp

Image 5171

Image 5175

I don't remember where I got the code. Then I applied a fix to the code in "HIGH_LOW_OPEN" since the original was wrong.

Then I added one more buffer with the closing price of the candle to be able to use it in CP with the "Type=On Line Cross"

The buy signal is when the candle before the current one (Use closed bars only=true) is above the middle line (Color=clrYellow)

Sell when it is below.

Indicator:

donchian_channels.ex5
donchian_channels.mq5


Config:

Test_v2.54.set

Avatar
Ulises Cune

There is a bug when changing "Type of extreme points" in the indicator for these 2 values (*CLOSE*)

Image 5177

Image 5178

Avatar
Ulises Cune
Avatar
san takashima
Quote from opik

Image 5183

Image 5184

EURUSD +ZZ + Donchian channel.set

Thanks ulises

Hello,

Thank you very much for your test setting here.
I've been trying to test Donchain Channles and was wondering how best I could set it up.

So, this came as a big help!
A couple of questions...

1 was the Martingale setting intentional?

2 various setting difference in time frames like, signal time frame set to 5min, zigzag set to 5min, ATR set to 15min etc... result of your BT optimization?
thank you for your help!

Avatar
Ulises Cune
Quote from san takashima

Hello,

Thank you very much for your test setting here.
I've been trying to test Donchain Channles and was wondering how best I could set it up.

So, this came as a big help!
A couple of questions...

1 was the Martingale setting intentional?

2 various setting difference in time frames like, signal time frame set to 5min, zigzag set to 5min, ATR set to 15min etc... result of your BT optimization?
thank you for your help!

My set was just a test of using the indicator, it is not a strategy. Read the manual and program the strategy.

Avatar
san takashima
Quote from Ulises Cune

My set was just a test of using the indicator, it is not a strategy. Read the manual and program the strategy.

thank you!!!!!

Avatar
san takashima
Quote from Ulises Cune

My set was just a test of using the indicator, it is not a strategy. Read the manual and program the strategy.

Hello,
Could you explain about the buffer...?
You had it set to buffer 3 to BUY and 1 for SELL, But testing a various setting including buffer 4 seem to work well, but as I'm not sure what it means... hard to test it further...
Thanks for your help!

Avatar
aramabdo
Quote from Ulises Cune

My set was just a test of using the indicator, it is not a strategy. Read the manual and program the strategy.

I think he means this set not your set:

EURUSD +ZZ + Donchian channel.set

Avatar
aramabdo
Quote from san takashima

thank you!!!!!

The test set by Ulises is different from the set provided by san takashima


Avatar
san takashima
Quote from aramabdo

I think he means this set not your set:

EURUSD +ZZ + Donchian channel.set

Sorry, I was not specific.... yes. I meant this set.