Nexus Gann Matrix
- Experts
- Versione: 2.57
- Attivazioni: 5
Nexus Gann Matrix
Nexus Gann Matrix is an Expert Advisor for MetaTrader 5. It combines trend pullback and liquidity-sweep signals with configurable moving-average, momentum and Gann-range filters. The intended working chart is H1, with an optional H4 exponential moving-average filter.
The Expert Advisor analyses the chart symbol and evaluates entry signals after a bar closes. You can select automated trading or Signals & HUD Only mode. Signals-only mode displays the analysis and notifications without placing or managing orders.
Entry logic and chart analysis
Four entry groups can be enabled separately: trend pullbacks, liquidity sweeps, Bollinger Bands reversals and momentum breakouts. Trend pullbacks and liquidity sweeps are enabled by default. The filters use exponential moving averages, the Average Directional Index, the Relative Strength Index and the position of price within a recent high-low range.
The chart tools include coloured moving averages, a linear regression channel, Gann range levels, Square of Nine reference levels, swing-structure information and fair value gap zones. The volume-weighted reference level uses typical bar prices weighted by tick volume.
Position management
Initial stop-loss and final take-profit distances use the Average True Range, with adjustments for the symbol's trading specification. At the first target, the Expert Advisor attempts to close approximately half of the original position and move its stop beyond the entry price. Partial closing depends on the broker's minimum volume and volume step. An optional trailing stop and an optional time-based stop adjustment are available.
Position size can use a percentage of account balance, a user-defined calculation balance or a fixed lot size. Calculated risk is an estimate; price gaps, execution costs and slippage can change the realised result. The default risk input is 2.2% and should be reviewed before enabling automated trading.
Operation
Both hedging and netting accounts are handled. On a netting account, use the chart symbol exclusively for this strategy. Do not mix manual trades or other Expert Advisors on that symbol. The terminal must remain running for partial exits and stop adjustments.
The dashboard separates model-labelled signals and levels from account information. Its reconstructed historical signals and model win rate are separate from broker execution and account results. The risk-budget field displays a calculation based on the risk input in the account currency; the leverage field displays the account leverage. Use the MetaTrader Toolbox and Strategy Tester reports to review actual positions and test results.
Test the selected symbol, broker specification and settings in the Strategy Tester and on a demo account before use. Historical and demo results do not establish future performance. Support is available through the product comments and MQL5 private messages.
Input parameters and default values
The list below covers all 48 inputs. true enables a setting; false disables it. Model statistics describe a reconstructed candle model and are separate from executed account trades.
0. Operation mode and language
- inpWorkMode = MODE_EA_AUTO: automated trading and position management. MODE_SIGNALS_ONLY displays signals without placing or managing orders.
- inpHudLanguage = LANG_ENGLISH: dashboard language; English is the default.
- inpMagicNumber = 81152: identifier used to distinguish this Expert Advisor's trades. Avoid duplicate instances with the same identifier on one symbol.
- inpHistoryBars = 800: lookback in bars for reconstructed MODEL signals and outcome statistics; not the history of executed account trades.
1. Entry triggers and H4 filter
- inpUseH4Filter = true: apply the H4 exponential moving-average direction filter, using the configured global EMA period.
- inpUseReversal = false: enable the Bollinger Bands reversal entry group.
- inpUsePullback = true: enable the trend-pullback entry group.
- inpUseBreakout = false: enable the momentum-breakout entry group.
- inpUseSmcSweep = true: enable the swing-level liquidity-sweep entry group.
- inpAllowFlip = false: allow closing an owned opposite position before a new opposite entry, subject to trading checks.
- inpAdxThreshold = 20.0: ADX threshold used to distinguish trend conditions from flat conditions.
- inpTouchAtrMult = 0.15: ATR multiplier for the price-touch tolerance around the relevant EMA or Bollinger Band.
2. Swing structure and fair value gaps
- inpSmcSwingLen = 12: lookback in bars for previous swing highs and lows used by the structure and sweep calculations.
- inpShowSmcFvg = true: show calculated fair value gap zones on the chart.
3. Moving averages, regression and weighted level
- inpDrawTrafficEma = true: draw the three configured exponential moving averages in colour.
- inpEmaDrawBars = 250: maximum drawing lookback for the coloured moving averages.
- inpRequireTrafficFan = true: require the ordered EMA fan in the entry groups that use this filter: fast above slow above global for buys, reversed for sells.
- inpShowLinReg = true: display the linear regression channel.
- inpLinRegPeriod = 100: lookback in bars for the regression channel.
- inpLinRegDev = 2.0: deviation multiplier controlling the regression-channel width.
- inpShowHiddenLevels = true: display the range midpoint and tick-volume-weighted typical-price level. The latter is a weighted mean, not a volume-profile point of control.
4. Gann reference calculations
- inpUseGannOctaves = true: apply the range-octave filter in the entry groups that use it; avoid the upper 1/8 for the relevant buy entries and lower 1/8 for sell entries.
- inpGannPeriod = 72: lookback in bars for the high-low range, midpoint and tick-volume-weighted reference level.
- inpShowGannSq9 = true: show the Square of Nine support and resistance reference levels.
- inpUseGannTimeExit = false: enable the optional time condition for moving the stop past entry when price conditions permit; this does not force a position to close at a fixed time.
- inpGannTimeBars = 18: time threshold: hours in actual position management, bars in the reconstructed model. On an H1 chart these units correspond; on other periods they differ.
5. Indicator periods
- inpEmaGlobalLen = 200: global EMA period, also used for the H4 EMA filter.
- inpEmaSlowLen = 50: slow EMA period.
- inpEmaFastLen = 21: fast EMA period.
- inpBbLen = 20: Bollinger Bands period.
- inpBbMult = 2.1: Bollinger Bands deviation multiplier.
- inpRsiLen = 14: Relative Strength Index period.
- inpAdxLen = 14: ADX period for the Wilder-style calculation.
6. ATR targets and stop management
- inpAtrLen = 14: Average True Range period.
- inpSlMult = 2.0: ATR multiplier for the initial stop-loss distance, subject to broker-distance adjustments.
- inpTp1Mult = 1.1: ATR multiplier for the first target, where the Expert Advisor attempts an approximately 50% partial exit and a stop adjustment. Broker volume rules can prevent the partial exit.
- inpTp2Mult = 3.2: ATR multiplier for the final take-profit distance, subject to broker-distance adjustments.
- inpBeAtrMult = 0.08: ATR component of the stop offset, combined with price-relative and spread-based buffers when moving the stop past entry.
- inpBeOffset = 0.015: minimum price-relative stop offset; 0.015 means 0.015% of the entry price, not points or pips. It does not guarantee that execution costs will be covered.
- inpUseTrailing = false: enable the ATR trailing stop after the stop has been moved past entry.
7. Position size and calculation balance
- inpUseAutoLot = true: calculate lot size from the risk setting; false requests the fixed-lot setting instead.
- inpUserDeposit = 0.0: calculation balance override in account currency; 0 uses the account balance. It does not change the actual account funds.
- inpRiskPercent = 2.2: percentage of the calculation balance used for automatic lot sizing only. With fixed lots, the dashboard still shows the input risk budget. This is an estimate, not a guaranteed maximum loss.
- inpFixedLot = 0.01: requested lot size when automatic sizing is disabled, subject to volume and margin checks.
8. Dashboard and notifications
- inpPanelSize = PANEL_NORMAL: dashboard size; larger options are PANEL_LARGE and PANEL_HUGE.
- inpTopOffset = 1: vertical dashboard offset in steps.
- inpSendAlerts = true: enable terminal signal alerts.
- inpSendPush = true: enable MetaTrader mobile push notifications when configured in the terminal. Notifications are not sent during Strategy Tester runs.
