Donchian Channel Trading Expert Advisor
Info
The Donchian Channel Trading Expert Advisor is a Expert Advisor for MetaTrader 4 that this expert advisor (ea) trades based on retracements from donchian channel levels. It incorporates a trailing stop loss and take profit functionality and is compatible with all timeframes and major forex pairs, as well as stocks like the Nasdaq.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Experts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use Donchian Channel Trading Expert Advisor
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
This Expert Advisor (EA) trades based on retracements from Donchian Channel levels.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 4. Place the file in the MQL4/Experts folder and restart the terminal.
Description & Settings
Related: APB Channel EA: Heikin-Ashi Reversals with Keltner Channel Confirmation and Swing Structure Stops - another powerful expert for MetaTrader 4 traders.
This Expert Advisor (EA) trades based on retracements from Donchian Channel levels. It incorporates a trailing stop loss and take profit functionality and is compatible with all timeframes and major forex pairs, as well as stocks like the Nasdaq.Also recommended: tc trade channel: a channel-based trading strategy - similar expert with strong performance on MetaTrader 4.
It is recommended to test this EA on a demo account first.
The EA trades only on the price of the opening candle.
To disable trading with an increasing lot size after a losing trade, set "increasefactor" to 0.
Input Parameters:
- use_tp_in_money: Use take profit in money (values: true/false).
- tp_in_money: Take profit in money (values: 10-100).
- use_tp_in_percent: Use take profit in percent (values: true/false).
- tp_in_percent: Take profit in percent (values: 10-100).
------------[Money Trailing Stop for Multiple Trades]----------------------
- enable_trailing: Enable trailing stop with money (values: true/false).
- take profit in money (in current currency): Take profit in money (values: 25-100).
- stop loss in money (in current currency): Stop loss in money (values: 1-20).
-----------------------------------------------------------------------------------
- barstocount: Number of bars to count (values: 1-20).
- exit: Close trades if the trend is against you and control drawdown (values: true/false).
- tick: Control trade execution based on ticks or open prices (values: true/false). 'true' means open prices.
- lots: Lot size (values: 0.01-1).
- lots_size_exponent: Lot size exponent (values: 1.01-2).
- candlestoretrace: Number of candles for divergence (values: 1-20).
- increasefactor: Factor to increase lot size based on total margin after a loss (values: 0.001-0.1).
- stop_loss: Stop loss in pips (values: 30-500). Set to 600 for multiple trades.
- magicnumber: Magic number for trade identification (values: 1-100000).
- takeprofit: Take profit in pips (values: 50-200). Set to 600 for multiple trades.
- fastma: Fast Moving Average period (values: 1-20).
- slowma: Slow Moving Average period (values: 50-200).
- mom_sell: Momentum sell trigger threshold (values: 0.1-0.9).
- mom_buy: Momentum buy trigger threshold (values: 0.1-0.9).
---------------------Control Draw Down-----------------------------
- useequitystop: Use equity stop loss (values: true).
- totalequityrisk: Total equity risk percentage (values: 0.01-30).
-----------------------------------------------------------------------------
- max_trades: Maximum number of concurrent trades (values: 1-12).
If using only 1 trade:
//////////////////////////////////////////////////
- usetrailingstop: Enable trailing stop (values: true/false).
- whentotrail: Trigger for trailing stop (values: 40-100).
- trailamount: Trailing stop amount (values: 40-100).
- distance_from_candle: Distance from candle for trailing stop (values: 1-100).
- usecandeltrail: Enable candle trailing stop (values: true/false).
- x: Number of candles for candle trailing stop (values: 1-100).
- enable_break_even: Enable break-even feature (values: true/false).
- when_move_break_even: Level to move to break-even (values: 5-30).
- how_much_pips_move_break_even: Pips to move for break-even activation (values: 5-30).
This EA should be optimized every few months. It can be used as a hedging grid EA or a single trade EA.
To perform a backtest, ensure all settings are correctly configured.
You may also like: moving average and commodity channel index (ma2 cc i) - excellent alternative for expert users on MetaTrader 4.
Source Code
/
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.