Donchian Channels Indicator
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
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:
Hi, You can use this support and resistance indicator which uses Donchian Channels as Support and Resistance and you can open and close trades when it crosses the line.
https://forum.communitypowerea.com/communities/7/topics/815-support-and-resistance-indicator?redirect_to_reply=6377#comment-6377