Warrior_EA/Enumerations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
AnimateDread 6717509c8b fix(build): four compile faults - one was a SILENT enum collision that inverted the direction policy
Reported by the user's MetaEditor compile of f64e0f8 (26 errors, 4 warnings). The four
warnings mattered more than the errors.

1. INTELLIGENT WAS TWO ENUMS. MONEY_MANAGEMENT_STRATEGY::INTELLIGENT (=1) is declared
   BEFORE TRADING_DIRECTION::INTELLIGENT (=3) in InputEnums.mqh, so MQL5 resolved every
   'tradingdirection == INTELLIGENT' to the MM member and converted it to value 1 =
   TRADING_DIRECTION::LONG_ONLY. Wrong in both directions at once: selecting Intelligent
   (3) matched NOTHING and silently traded both sides, while selecting Long only (1)
   matched and handed the decision to the measured drift verdict - which can answer
   SHORT_ONLY, so the one setting that must never go short could have. Reported by the
   compiler as a WARNING only, never an error. Renamed to DIRECTION_INTELLIGENT; the
   VALUE stays 3, so saved .set files are unaffected. Swept every enum in the repo for
   sibling collisions (38 enums, detector validated against the pre-fix source, which it
   flags): none remain.
2. g_warriorMetaGate sits above the class it points at - added the forward declaration,
   the same pattern g_warriorEnsemble already uses in ExpertSignalAIBase.mqh.
3. The broker-time rename (b63e39f) never reached BufferNewTickSignal's PARAMETER or its
   two call sites: the local became brokerTime, the parameter stayed gmtTime, and the
   body was rewritten to read brokerTime. All five sites now agree.
4. ConfigureAISignal calls IsMetaTarget() from a free function - moved it to the public
   section (identity, not an implementation seam); the other meta seams stay protected.

NOT COMPILED - user compiles in MetaEditor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 13:16:45 -04:00
..
GlobalEnums.mqh convert 2025-05-30 16:35:54 +02:00
InputEnums.mqh fix(build): four compile faults - one was a SILENT enum collision that inverted the direction policy 2026-08-19 13:16:45 -04:00
README.md feat: Enhance README and documentation for Warrior_EA project 2026-04-20 19:28:34 -04:00

Enumerations Documentation

GlobalEnums.mqh

Defines the ENUM_SIGNAL enumeration for trading signal states:

  • Buy: Indicates a buy signal.
  • Sell: Indicates a sell signal.
  • Neutral: Indicates a neutral/no-action signal.
  • Undefine: Indicates an undefined or uninitialized state.

InputEnums.mqh

Defines a large set of enumerations for configuration and input parameters used throughout the EA. These include:

  • Custom menu and property enums for UI/configuration.
  • Period presets (e.g., 5, 10, 14, 20, 30, 50, 100, 200) for indicator calculations.
  • Training years presets for ML/AI training window selection.
  • ATR multipliers for volatility-based calculations.
  • Threshold presets for signal/trigger sensitivity.
  • Risk/reward ratio presets for money management.
  • Bars expiration settings for trade/session logic.
  • Entry multipliers for order sizing.
  • Trailing strategy types (none, ATR-based, SAR, MA, etc.).
  • Money management strategies (fixed risk, intelligent, fixed lot, etc.).
  • Day-of-week and session enums for time-based logic.
  • ITF (Intraday Time Filter) settings.
  • Hourly session presets (H1-H23) for time filtering.

Purpose: These enumerations provide a strongly-typed, maintainable way to configure and control the EA's behavior, supporting both traditional and AI/ML-driven logic. They enable dynamic feature selection, risk management, and strategy configuration, and are essential for modular, testable code.

Modernization Note:

  • Enumerations should be referenced in configuration UIs and parameter files to enable dynamic, user-driven feature pipelines.
  • Consider extending enums to support new AI/ML features and dynamic input selection as the EA evolves.