Warrior_EA/System
Repository files (latest commit first)
Filename Latest commit message Latest commit date
AnimateDread 04d70fb748 refactor(dry): one writer for the era-resume context, one for an alt-data row
Two literal duplications the scan found, both of the kind where a divergence is
silent:

- Training.mqh stashed the era-loop resume context at FOUR yield points, seven
  identical assignments each (pass 1 differing only in i-1). A field missed at
  one of them resumes the next chunk against a different era than the one that
  yielded, and nothing reports it until the numbers drift. Now StashEraResume().

- AltDataFetch grew its five parallel arrays inline in three places. They are
  one record split across five buffers, so a resize missed on any one reads out
  of range on the NEXT append, not at the site of the mistake. Now
  AltSeriesAppend(), which returns the new index and zero-fills; callers set
  only the columns their source has.

Braces balance across every in-scope file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 00:36:36 -04:00
..
AltData.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
AltDataFetch.mqh refactor(dry): one writer for the era-resume context, one for an alt-data row 2026-08-22 00:36:36 -04:00
AtomicFile.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
BinomialStats.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
CrossAsset.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
NewBar.mqh refactor(comments): stdlib comment style across the remaining in-scope files 2026-08-22 00:25:52 -04:00
NewsRelevance.mqh refactor(comments): stdlib comment style across the remaining in-scope files 2026-08-22 00:25:52 -04:00
PrintVerbose.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
Random.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
README.md refactor(ai): extract Layer.mqh and deduplicate AI config 2026-08-01 11:27:28 -04:00
StatusLabel.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -04:00
TradeChecks.mqh refactor(comments): box headers to stdlib length 2026-08-22 00:30:14 -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 new bar detection, conditional logging, crash-safe file writes and trade validation, supporting robust and maintainable EA operation.

Key Components

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.