| Filename | Latest commit message | Latest commit date |
|---|---|---|
Every feature the network sees today is a function of the traded symbol's own OHLCV: returns, ranges, oscillators, cloud distances, swing structure. Measured end to end that whole family sits at the noise floor (research/test_classic.py, and the mutual-information verdict before it). EURUSD moving is a statement about EUR and about USD, and which one moved is invisible from EURUSD alone - but plainly visible if you also look at EURJPY, GBPUSD and the rest. System\CrossAsset.mqh builds a currency-strength panel from the FX pairs in Market Watch: per bar, each currency's index is the average log return across every available pair containing it, signed so "up" always means that currency strengthened. Six features - base and quote strength at 1 and 20 bars, the DIVERGENCE between the pair and what its two currencies separately did, and the cross-sectional dispersion of currency moves as a regime term. The divergence is the thesis: it is the one value here that cannot be derived from the traded series at all, being defined only relative to the rest of the market. Built ONCE per training run against the traded symbol's bar grid, not per bar - a per-bar cross-symbol lookup would be pairs x 178k iBarShift calls. Correctness work, all of it driven by what MT5 actually guarantees rather than by what the API surface suggests: - Alignment is by TIMESTAMP, never by index. Bars do not open together across symbols, and in the tester each symbol gets its own generated tick sequence, so index k on GBPUSD and index k on USDJPY are not the same instant. Each traded bar takes the last reference bar at or BEFORE its timestamp - never after, which would be lookahead - and anything more than one bar period stale is treated as absent rather than carried forward across a holiday gap. - SeriesReady() gates every pair on SymbolSelect + SymbolIsSynchronized + the PER-TIMEFRAME SERIES_SYNCHRONIZED. The symbol-wide and per-timeframe flags can disagree because the terminal builds series on separate threads, so checking only the first is not enough. Non-blocking by design: an unready pair is skipped and picked up on a later build. - Failure is never fatal. Fewer than two usable pairs logs why and every Features() call 0-fills, so a missing reference symbol costs the context block rather than the whole run. Fingerprint: the flag goes in, the DISCOVERED REFERENCE SET does not. Which pairs exist in Market Watch is a measured property of the terminal, exactly like the bar count the existing comment warns about - keying the weights filename on it would orphan a trained model the moment the user adds a symbol, silently, because a missing cache reads as a normal first run. Defaults ON, which re-keys existing databases on first run. That is intended: the input vector genuinely changed shape. Deliberately NOT built, having checked what the platform actually provides: - swap/carry. SYMBOL_SWAP_LONG/SHORT have no history - "last values will be used for the whole test period" - so a backtest over 2020-2026 applies 2026 carry to 2020 bars. - signed order flow. TICK_FLAG_BUY/SELL and volume_real are empty on Forex; any feature assuming trade direction would silently be all zeros. - depth of market. Unavailable on retail FX symbols and never replayed in the tester. - calendar actual-vs-forecast surprise. MqlCalendarValue.actual_value is the FINAL, post-revision figure and the calendar keeps no as-of-release snapshot, so a surprise feature for a 2019 bar is built from a number nobody had in 2019. Needs a live recorder, not a historical read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
| .. | ||
| AtomicFile.mqh | ||
| CrossAsset.mqh | ||
| NewBar.mqh | ||
| NewsRelevance.mqh | ||
| PrintVerbose.mqh | ||
| README.md | ||
| StatusLabel.mqh | ||
| TradeChecks.mqh | ||
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
VerboseModeflag. 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.