Download Donchian Channel for MetaTrader 4

Donchian Channel

Donchian Channel

This tool for MetaTrader 4 is specifically engineered to streamline your trading operations. This technical indicator acts as a specialized analysis tool designed to visualize market data. It helps traders identify emerging trends, momentum shifts, and key support or resistance levels by plotting statistical calculations directly onto price charts.

How to Setup and Use Donchian Channel

1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.

2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.

3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.

4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.

Frequently Asked Questions

Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."

Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).

Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.

Description & Settings

Donchian Channel
The Donchian channel is an indicator used in market trading developed by Richard Donchian It is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen.
A line is marked for the high and low values visually demonstrating the channel on the markets price. This indicator also includes a mid line and a moving average of the mid line.
The Donchian channel is a useful indicator for seeing the volatility of a market price. If a price is stable the Donchian channel will be relatively narrow. If the price fluctuates a lot the Donchian channel will be wider. Its primary use, however, is for providing signals for long and short positions.
If a security trades above its highest n periods high, then a long is established. If it trades below its lowest n periods low, then a short is established.
Buffers Used In Indicator
This indicator uses four buffers representing;
Upper Donchian Channel - Buffer 0 - Green Line
Middle Donchian Channel - Buffer 1 - Blue Line
Lower Donchian Channel - Buffer 2 - Green Line
MA Donchian Channel - Buffer 3 - Red Line
The Code
The code is fairly straightforward, it gets the High and Low for the last ā€˜n’ periods in InpBarsToLookBack. It then takes an average of the High and Low values to create the Middle Line of the Channel. The iMAOnArray function is then used to get a moving average of the Middle Donchian Channel based upon parameters InpMaPeriod and InpMaMethod that have been inputted.
Chart Output
The output on the chart consists of the four buffers outlined above. If needed the color can be changed to None to show only Buffers that are needed.
iCustom
To call the indicator using the iCustom function;
double donchian = iCustom(Symbol(), Period(), "Donchian Channel", InpBarsToLookBack, InpMaPeriod, InpMaMethod, Buffer[], shift);
To use a Script to call the last price of the Moving Average buffer using the default parameters it would be;
double donchian = iCustom(Symbol(), Period(), "Donchian Channel", 20, 14, MODE_SMA, 3, 0);
Thanks
Thank you for taking the time to download this indicator. Please feel free to post any questions related to the indicator and reviews are appreciated.

You May Also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators