Overview
This is an Expert Advisor built around the "No Nonsense Forex" (NNFX) trading methodology — a systematic approach that requires a trade to be confirmed by multiple independent, non-correlated technical layers before entry, rather than relying on a single indicator's signal. Instead of hard-coding one specific combination of indicators, the EA treats each layer of the NNFX stack as a configurable slot: a trader picks which indicator fills the Baseline, Confirmation 1, Confirmation 2, Volume, Exit, and Continuation roles from a menu of implementations, and the EA wires them into a single confluence-based entry/exit system at runtime.
The practical effect is that this one codebase behaves like a strategy-building toolkit rather than a fixed EA — a user (or the developer testing for a client) can isolate any single layer for evaluation via a Signal_Type mode (Baseline_Only, C1_Only, Baseline_C1_C2, Full_Algo, etc.), swap the Baseline moving average from a Hull MA to a Kaufman AMA without recompiling logic, or benchmark a dozen Confirmation-1 candidates against the same Baseline. That flexibility is what the NNFX methodology demands in practice — traders spend most of their setup time backtesting different indicator combinations — and building it as a single configurable EA rather than a family of one-off scripts is a meaningfully harder engineering problem.
Architecture
- Signal-layer enums — six independent
enumtypes (ENUM_BASELINE,ENUM_C1,ENUM_C2,ENUM_VOLUME,ENUM_EXIT,ENUM_CONTINUATION), each listing the interchangeable indicator implementations available for that role (Baseline alone offers ten: Hull MA, Kijun-sen, ALMA/ATR bands, DEMA, AMA, FRAMA, LWMA, low-pass filter, and two others). - Per-layer parameter blocks — each slot gets its own labeled input section (buffer indices, lookback periods, up to ten generic numeric inputs) so a single indicator interface can drive wildly different underlying calculations without the EA needing to know their internals in advance.
- Signal composition (
ENUM_SIGNAL) — an eleven-way mode selector (Baseline_OnlythroughFull_Algo) that determines which subset of the six layers must agree before a trade fires, used both for live trading and for isolating individual layers during optimization. - Shared indicator library (
Indicators.mqh) — a separate include file supplying the actual math for the indicator catalog referenced by the enums, keeping the EA's own file focused on orchestration and risk rather than reimplementing every indicator inline. - Risk management layer — fixed-lot or percent-risk position sizing, ATR-based stop distance, configurable take-profit, and a trailing stop with independent start/step factors, applied uniformly regardless of which indicators are active.
Implementation
The EA's #include <Indicators.mqh> pulls in a custom shared library (also present in the developer's include tree) that implements the actual signal math — Aroon, Williams %R, Absolute Strength, Vortex, iTrend, Chaikin Money Flow, VZO, and others — behind a common enough interface that any of them can occupy the C1 or C2 confirmation slot interchangeably. Each layer's parameter block follows the same pattern: a labeled separator input for organization in the MT4 properties dialog, an enum to pick the implementation, and up to ten generic double/int inputs whose meaning depends on which indicator was selected for that slot — a pattern that trades some type-safety for the flexibility of a single EA covering what would otherwise be dozens of indicator-specific variants.
Risk is resolved independently of signal logic: Risk_Percent (percentage-of-equity sizing) or Fixed_Lot_Size feed into stop-loss distance calculated either from a fixed point value or from ATR, and Open_One_Position_With_Full_Size controls whether continuation signals scale into an existing position or wait for a flat book. Take_Continuation_Trades gates a separate continuation-signal layer (its own enum of RVI, PSAR, Aroon, Heiken Ashi, and other reversal/momentum detectors) that lets the EA add to a winning trend after the initial confluence entry, distinct from the Exit layer that manages when to close it.
Reliability
The EA exposes its full configuration surface as MT4 input parameters, meaning every layer, threshold, and risk setting is adjustable and re-optimizable directly from the Strategy Tester's parameter grid without a rebuild — a deliberate design choice given that NNFX methodology is fundamentally about backtesting many indicator combinations to find a robust confluence set for a given instrument. The Signal_Type isolation modes double as a debugging and validation tool: a developer can confirm each layer independently produces sane signals (Baseline_Only) before trusting the combined Full_Algo output.
