Warrior_EA/System
AnimateDread d0e89a6fc7 fix(SignalNewsFilter): scope calendar veto to the traded symbol's own currencies
CalendarValueHistory() was called with no country filter at all, so
ANY country's economic calendar event vetoed a trade regardless of
relevance - a JPY release blocked a EURUSD trade just as readily as a
USD one, making NF_MinImpact's fine-tuning far noisier than intended.

Adds System/NewsRelevance.mqh (GetRelevantCountryCodes/
ImpactWeightedProximity), a shared utility that cross-references
CalendarCountries() against the symbol's base/quote currency to get
the actually-relevant ISO country codes, then uses
CalendarValueHistory()'s country_code-filtering overload. Shared so
the upcoming NN news-input feature reuses the same relevance logic
rather than duplicating it.

Compiled clean (MetaEditor, 0 errors/0 warnings).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 17:22:33 -04:00
..
CheckStopped.mqh convert 2025-05-30 16:35:54 +02:00
NewBar.mqh convert 2025-05-30 16:35:54 +02:00
NewsRelevance.mqh fix(SignalNewsFilter): scope calendar veto to the traded symbol's own currencies 2026-07-18 17:22:33 -04:00
PrintVerbose.mqh convert 2025-05-30 16:35:54 +02:00
README.md feat: Enhance README and documentation for Warrior_EA project 2026-04-20 19:28:34 -04:00
StatusLabel.mqh fix: correct metric label in training output and improve status panel comments 2026-07-17 21:53:09 -04:00

System Subsystem (System/)

Overview

The System/ directory contains utility and infrastructure code for the Warrior EA. These modules provide essential services such as expert stop handling, new bar detection, and conditional logging, supporting robust and maintainable EA operation.

Key Components

CheckStopped.mqh

  • Function: CheckStopped()
  • Purpose: Handles expert advisor stop events. Commits and closes the database, removes the EA, and logs the stop event.
  • Integration: Should be called regularly to ensure safe shutdown and resource cleanup.

NewBar.mqh

  • Function: NewBar()
  • Purpose: Detects the arrival of a new bar (candle) on the chart.
  • Logic: Compares the current bar's time with the last seen bar time. Returns true if a new bar is detected.
  • Integration: Used for event-driven logic, e.g., only executing logic once per bar.

PrintVerbose.mqh

  • Function: PrintVerbose(string message)
  • Purpose: Conditional logging based on a VerboseMode flag. Prints messages only if verbose mode is enabled.
  • Integration: Useful for debugging and development without cluttering logs in production.

Documented April 2026. For further details, see the main project documentation.