NEXA Donchian Break
- Experts
-
Park Seongcheon
Hello,
My name is Park Sung Chan, a developer specializing in MetaTrader 5 algorithmic trading systems.
I design and research long-term, reliable automated trading models based on the structural characteristics and statistical patterns of financial markets. - Version: 1.10
- Updated: 19 June 2026
1. Product Overview
NEXA Donchian Break is an automated trading Expert Advisor for MetaTrader 5 that identifies price breakout zones using the Donchian Channel and attempts to open trades only when additional technical indicator filters are satisfied.
The product provides two strategy modes with different filtering structures. Users can adjust the input parameters to compare and analyze the relationship between Donchian breakout signals, trend filters, volume filters, stop-loss methods, and exit management.
Version 1.10 introduces a fixed trailing-stop function measured in pips. Users can configure the trailing activation distance, the distance between the current market price and Stop Loss, and the minimum step required before the Stop Loss is moved again.
This product was developed for free distribution, learning, and research purposes.
The product does not guarantee any specific profit or performance. Results may vary depending on market conditions, broker specifications, trading costs, symbol settings, and user-defined parameters.
2. Version 1.10 Update
Version 1.10 adds the following function.
Pip-Based Trailing Stop
When a position reaches the configured profit distance, the EA moves the Stop Loss step by step as the market price advances.
The following values can be configured separately:
-
trailing-stop activation distance;
-
distance between the current market price and Stop Loss;
-
minimum Stop Loss movement step.
The pip calculation automatically considers the following symbol specifications provided by the broker:
-
number of decimal digits;
-
point size;
-
minimum tick size;
-
minimum Stop Loss distance.
The trailing stop does not move an existing Stop Loss in an unfavorable direction. It can only move the Stop Loss in a direction that improves the position.
Position protection continues to operate even when the trading session filter blocks new entries.
3. Strategy Structure Overview
The EA provides two strategy modes.
Strategy Mode V1
Strategy Mode V1 combines Donchian Channel breakouts with momentum and trend-strength confirmation.
Main components:
-
detection of an upper or lower Donchian Channel breakout;
-
price-direction confirmation using the Momentum indicator;
-
trend-strength filtering using the ADX indicator;
-
initial Stop Loss calculated using ATR;
-
optional transition to a Swing-based Stop Loss after a specified profit condition;
-
optional ADX- and ATR-based trailing stop;
-
optional fixed trailing stop measured in pips.
Strategy Mode V2
Strategy Mode V2 combines Donchian Channel breakouts with trend acceleration and volume-flow confirmation.
Main components:
-
detection of an upper or lower Donchian Channel breakout;
-
direction and acceleration confirmation using the MACD histogram;
-
volume-flow confirmation using the OBV slope;
-
optional ADX trend-strength filter;
-
Stop Loss calculated using the opposite Donchian Channel line;
-
optional ADX-based trailing stop;
-
optional fixed trailing stop measured in pips.
Each strategy mode uses a different combination of filters. Users can compare both modes to study differences in signal frequency and filtering strength.
4. Main Operating Features
NEXA Donchian Break provides the following functions:
-
signal calculation on a selected timeframe;
-
Donchian Channel breakout detection;
-
selectable V1 and V2 strategy modes;
-
selectable close-based or High/Low-based breakout detection;
-
optional closed-bar-only signal calculation;
-
optional restriction to one position per symbol;
-
trading-hour filter;
-
weekday trading permissions;
-
optional London and New York market-open exclusion periods;
-
fixed-lot position entry;
-
ATR-based initial Stop Loss;
-
Swing-based Stop Loss transition;
-
ADX- and ATR-based trailing stop;
-
fixed pip-based trailing stop;
-
automatic broker minimum Stop Loss distance handling;
-
automatic broker volume-step adjustment;
-
position identification using a Magic Number.
The EA uses only functions available inside the MetaTrader 5 platform.
It does not use external DLLs, WebRequest, external server communication, or personal-data collection.
5. Detailed Input Parameter Description
This section explains how each input parameter may affect the operation of the strategy.
Changing input values may affect trade frequency, Stop Loss distance, position duration, and overall trading results.
No specific parameter value guarantees any particular result.
[General Settings]
InpSymbol
Specifies the symbol that the EA will trade.
If the specified symbol does not exist on the broker, the EA may use the current chart symbol.
Depending on the broker, Gold may be listed as GOLD, XAUUSD, or with an additional suffix. The exact broker symbol name should be checked before use.
InpFixedLots
Sets the fixed lot size used for new trades.
The entered lot size is automatically adjusted according to the broker's:
-
minimum volume;
-
maximum volume;
-
volume step.
InpMagicNumber
Defines the identification number used to distinguish positions created by the EA.
When several EAs are used on the same account, different Magic Numbers are recommended.
InpEnableDebugLog
Enables or disables detailed EA logging.
When enabled, the log may include signal checks, filter results, order results, and Stop Loss modifications.
Long-term backtests may generate a large amount of log data, so this option can normally remain disabled.
[Trading Time Filter]
InpUseTimeFilter
Enables or disables the time restriction for new trade entries.
When disabled, the EA evaluates entry conditions regardless of the configured trading hours.
InpTradeStartHour / InpTradeEndHour
Define the allowed time range for new trade entries.
The filter uses the broker's server time.
InpAllowMonday to InpAllowFriday
Enable or disable trading for each weekday from Monday to Friday.
InpExcludeLondonOpen
Restricts new trade entries during the configured London market-open period.
InpExcludeNYOpen
Restricts new trade entries during the configured New York market-open period.
The time filter applies to new entries. Stop Loss management and trailing functions for existing positions continue operating outside the allowed entry hours.
[Strategy Mode]
InpStrategyMode
Selects the strategy mode.
-
V1: Donchian + Momentum + ADX
-
V2: Donchian + MACD + OBV
V1 mainly evaluates price momentum and trend strength.
V2 evaluates MACD changes and OBV flow to estimate trend acceleration and volume direction.
[Core Settings]
InpSignalTF
Defines the timeframe used for signal calculation.
This timeframe can be different from the timeframe of the chart on which the EA is attached.
InpDonchianLenV1 / InpDonchianLenV2
Define the Donchian Channel calculation period for each strategy mode.
A shorter period may react more quickly to recent price changes.
A longer period evaluates breakouts against a wider historical price range.
InpUseCloseBreakout
Defines the breakout confirmation method.
-
true: breakout confirmed by the closing price;
-
false: breakout confirmed by the High or Low price.
Close-based detection uses the candle's closing position.
High/Low-based detection reacts when price reaches or crosses the channel during the candle.
InpClosedBarOnly
Defines whether the EA evaluates signals only when a new candle begins.
When enabled, repeated signal evaluation within the same candle can be reduced.
[Filters - V1]
InpMomentumPeriod
Defines the calculation period of the Momentum indicator.
InpMomentumAvgLookback
Defines the historical range used to calculate the average Momentum value.
For buy signals, the current Momentum value must be above its historical average.
For sell signals, the current Momentum value must be below its historical average.
InpADXPeriod
Defines the ADX calculation period.
InpADXMinV1
Defines the minimum ADX value required in V1 mode.
A higher value may restrict entries to stronger trend conditions, but it may also reduce the number of signals.
[Filters - V2]
InpMACDFast
Defines the fast EMA period of the MACD indicator.
InpMACDSlow
Defines the slow EMA period of the MACD indicator.
InpMACDSignal
Defines the MACD signal-line period.
InpUseMACDAccel
Defines whether the EA must confirm not only the MACD histogram direction but also consecutive histogram acceleration.
When enabled, an additional trend-acceleration condition is applied.
InpOBVSlopeLookback
Defines the historical range used to calculate the OBV slope.
InpMinOBVSlopePoints
Defines the minimum required OBV slope strength.
When set to 0, only the OBV direction is checked.
InpUseADXinV2
Enables or disables the additional ADX filter in V2 mode.
InpADXMinV2
Defines the minimum ADX value required in V2 mode.
[Risk / Exit]
InpRR_TP
Defines the Take Profit distance as a ratio of the initial Stop Loss distance.
For example, a value of 2.0 places the target at approximately twice the initial risk distance.
InpV1_UseSwingSL
Enables or disables the Swing-based Stop Loss transition in V1 mode after a specified profit condition is reached.
InpSwingLookback
Defines the number of historical candles used to search for a Swing High or Swing Low.
InpATRPeriod
Defines the ATR period used for the initial Stop Loss and ADX trailing calculation.
InpATRMultV1
Defines the ATR multiplier used to calculate the initial Stop Loss in V1 mode.
InpMinSL_Points
Defines the minimum initial Stop Loss distance in points.
InpSLSwitchAtRR
Defines the profit level, measured in multiples of the initial risk, at which the Swing Stop Loss transition is evaluated.
InpEnableADXTrail
Enables or disables the ADX- and ATR-based trailing stop.
InpADXTrailStart
Defines the minimum ADX value required before the trailing condition is evaluated.
InpADXTrailStepATR
Defines the ATR multiplier used to calculate the distance between the current market price and the trailing Stop Loss.
InpOnePositionOnly
Restricts the EA to one position for the same symbol and Magic Number.
[Trailing Stop - Pips]
InpEnablePipsTrailing
Enables or disables the fixed trailing stop measured in pips.
The default value is false.
Set this option to true to activate the function.
InpTrailingStartPips
Defines the profit distance, measured in pips, required before the trailing stop starts.
For example, when set to 100, the EA begins evaluating Stop Loss movement after the position reaches approximately 100 pips of profit.
InpTrailingDistancePips
Defines the distance, measured in pips, maintained between the current market price and Stop Loss.
For buy positions, the Stop Loss is calculated below the current Bid price.
For sell positions, the Stop Loss is calculated above the current Ask price.
InpTrailingStepPips
Defines the minimum favorable movement required before the Stop Loss is modified again.
A smaller value may cause more frequent Stop Loss updates.
A larger value causes the Stop Loss to be updated only after a larger market movement.
Pip Calculation Method
The EA checks the symbol's decimal digits and minimum tick size to calculate the pip value.
For standard three-digit and five-digit price formats, 10 points are treated as 1 pip.
For other price formats, the symbol point size is used, while values smaller than the broker's minimum executable tick size are not applied.
Because Gold and other CFD symbols may use different pricing formats across brokers, users are advised to verify the actual Stop Loss movement distance on a demo account before live use.
6. Interaction Between Stop Management Functions
The EA includes the following Stop Loss management functions:
-
Swing-based Stop Loss transition;
-
ADX- and ATR-based trailing stop;
-
fixed pip-based trailing stop.
When several functions are enabled, each one may evaluate the Stop Loss of the same position.
The Stop Loss is modified only when the new value is more favorable than the current value.
-
Buy position: the Stop Loss can move only upward.
-
Sell position: the Stop Loss can move only downward.
The Stop Loss is not widened again in the direction of greater loss.
When several Stop Loss management functions are active at the same time, the function producing the more favorable Stop Loss level may affect the final position protection level.
To evaluate each trailing method separately, users may enable only one trailing function at a time during testing.
7. Important Usage Notes
This product is distributed free of charge for learning and research purposes.
Before applying the EA to a live account, users are advised to perform sufficient Strategy Tester and demo-account testing.
Trading results may vary depending on:
-
broker symbol name;
-
number of price digits;
-
minimum tick size;
-
minimum Stop Loss distance;
-
spread;
-
slippage;
-
server time;
-
volume restrictions;
-
execution method;
-
commission;
-
swap;
-
market volatility.
The time filter uses the broker's server time. Therefore, the configured London and New York market-open periods may not exactly match local exchange time.
If the symbol entered in InpSymbol does not exist, the current chart symbol may be used. Users should check the symbol settings and the Experts or Journal log before operation.
Pip values are converted into price distance according to the broker's price format. The same numeric input may represent a different price distance or monetary effect on another broker.
All settings should be adjusted at the user's own discretion and responsibility.
8. Technical Limitations and Compliance
This product was developed for MetaTrader 5.
A compiled MetaTrader 5 program file is provided for distribution.
The product does not include:
-
external DLL calls;
-
WebRequest;
-
external server communication;
-
remote-control functions;
-
personal-data collection;
-
third-party payment systems;
-
external licensing systems;
-
external messenger integration;
-
advertising functions;
-
a separate feature-limited demo version.
All signal calculations, position checks, and Stop Loss management are performed using functions available inside the MetaTrader 5 platform.
9. Support and Questions
Questions about product usage, operating methods, and feature suggestions may be submitted through the Comment section of the MQL5.com product page.
When reporting an issue, the following information may help with verification:
-
symbol name;
-
timeframe;
-
broker price digits;
-
input parameters;
-
Experts or Journal log;
-
time of the issue;
-
error message.
Final Note
NEXA Donchian Break was created as an educational Expert Advisor for studying automated trading structure, parameter design, and the effect of combining different technical filters.
Users can compare two Donchian breakout modes and analyze the relationship between:
-
price breakouts;
-
Momentum;
-
ADX;
-
MACD;
-
OBV;
-
ATR-based Stop Loss;
-
Swing-based Stop Loss;
-
ADX-based trailing stop;
-
pip-based trailing stop;
-
trading-time filters.
By changing the available functions and input values, users can observe differences in signal frequency, Stop Loss placement, position duration, and exit behavior.
