AI Expert Advisor
  • MQL5 79.3%
  • Python 8.2%
  • HTML 5.1%
  • C 3.1%
  • C++ 2.8%
  • Other 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
AnimateDread 1a900a0a35 feat(vote): CONSENSUS arithmetic - agreement is now what the threshold dials
Era-680 report, all three observations one equation: "peak 29, no arrows at
threshold 30" / "at 20, arrows on EVERY bar" / "label at 12 while arrows
everywhere". Under the voters-only divisor, any bar with at least one
directional voter read the weighted mean of the firing tiers' weights - and
once the tiers self-ranked to each model's pooled win rate (~28-31), that
mean was NEAR-CONSTANT regardless of headcount. One member alone: ~29. Four
unanimous: ~29. Min_Vote_Open was a step function around that constant -
above it nothing ever fired, below it everything did - and the label's 12
was a 3v1 split netting through the same divisor. Not three display bugs:
one arithmetic that could not express agreement.

The divisor is now the CAPABLE weight - every filter that could vote,
whether it did or not:
 * live (Direction): VoteCapableWeight() - classic pattern ladders always,
   veto filters never, AI members once past the same readiness test
   LongCondition gates on. A model still training must not dilute an
   ensemble it cannot join: four trainees + one deployed model is a solo
   chart wearing an ensemble label, and the solo vote reads full strength.
 * gate (EnsembleEraVerdict): g_ensVoteWeightSum accumulates for every
   member that EVALUATED the bar, Neutral included.
 * overlay sweep + prospective readout: weight counts whenever the member
   has data; a snapshotted Neutral dilutes.
One arithmetic, four sites, same numbers everywhere.

What the numbers become (four members, w~0.29, tiers~29): unanimous ~29 -
the CEILING, which is the pooled win rate and is what the peak displays;
3-of-4 ~22; 2-of-4 ~14.5; 3v1 ~14.5. Min_Vote_Open 20 now means "roughly
three-quarters of the ensemble's trust agrees, net". It MUST sit below the
ceiling to ever fire - the census/peak states the ceiling.

This is the ensemble the user specified in the original design discussion
("if the perceptron also votes, both together reach the threshold; if
another NN votes the other side, the threshold is not reached") - union
semantics was the pre-ensemble behaviour, kept until measurement showed its
vote magnitude was a constant.

Plus overlay DECLUSTERING, the other half of "arrows on every bar": the
same three NMS rules as the per-member arrows (same-direction runs collapse
to their first bar, cross-direction flicker keeps the stronger side), online
over the sweep's strictly oldest->newest walk. Suppression is a verdict and
deletes a standing arrow; the den==0 no-data skip still never does.

NOT COMPILED - user compiles in MetaEditor.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 06:58:03 -04:00
.claude . 2026-07-18 17:43:29 -04:00
.clinerules feat: suppress noisy performance warnings unless VerboseMode 2026-07-27 10:58:29 -04:00
AI fix(batchnorm): bound the normalized value - a constant input feature was amplified 1e4x and pinned PAI's head to its rails 2026-08-17 00:21:51 -04:00
Database fix(meta): make the stale-DB corpus warning unmissable in the tester 2026-08-12 23:56:26 -04:00
DirectML fix: dense backprop read the weight matrix transposed - on every backend 2026-08-11 18:06:09 -04:00
docs feat(altdata): wire everything the sources serve - screens become priors, not gates 2026-08-16 17:29:22 -04:00
Enumerations feat(vote): thresholds become confidence percentages, on ONE scale everywhere 2026-08-18 15:52:08 -04:00
Expert feat(vote): CONSENSUS arithmetic - agreement is now what the threshold dials 2026-08-19 06:58:03 -04:00
Market Descriptions Add new research scripts for trading strategy analysis 2026-08-02 12:25:20 -04:00
Marketing/Logo refactor(AI): clean up comments and add conditional compilation guards 2026-07-22 17:17:23 -04:00
Money fix: four risk-layer holes a funded account would eventually find 2026-08-11 18:14:26 -04:00
Panel fix: the DB backfill could never run, and HEAD did not compile 2026-08-16 21:25:51 -04:00
references feat: add SGD+momentum optimizer and input-driven hyperparameters 2026-07-18 14:56:41 -04:00
research research(altdata): H4 timeframe screen - information survives, diluted; costs 2.6x worse 2026-08-16 17:49:37 -04:00
Scripts fix(research): calendar recorder - separate LIVE from BACKFILL, fix seen-set key 2026-08-01 20:22:12 -04:00
Signals fix(ensemble): per-member arrow namespaces; ConvLSTM rename; dialog in purge list 2026-08-16 18:26:55 -04:00
Structures fix(db): per-side pattern journaling + versioned journaling semantics 2026-08-12 10:37:57 -04:00
System fix(shutdown): make ExitPolicy public, and stop every long loop the moment MT5 asks 2026-08-17 17:03:11 -04:00
Trailing feat(trade): implement trade safety checks per Article 2555 and resource limits 2026-07-26 23:08:32 -04:00
Variables feat(chart): on-chart vote readout, and Min_Vote_Open 50 -> 40 2026-08-18 18:22:45 -04:00
.gitignore chore: keep the reference PDFs out of the repository 2026-08-01 22:18:18 -04:00
AI_NETWORK.md refactor(ai): extract Layer.mqh and deduplicate AI config 2026-08-01 11:27:28 -04:00
cpu_directml.log feat(opencl): add feedback alignment support to weight update kernels 2026-07-28 15:01:40 -04:00
DATABASE.md feat: add max-pooling and convolution OpenCL kernels, clean up barrier and signal code 2026-07-13 03:23:39 -04:00
EXPERIMENTS.md feat: make batch normalization mandatory, and record the run-3 results 2026-07-30 08:51:10 -04:00
Meta_Labeling_Design.md docs: H4 experiment result - H3 (lift does not transfer; single-instrument well closed) 2026-08-13 13:06:46 -04:00
opencl.log feat(opencl): add feedback alignment support to weight update kernels 2026-07-28 15:01:40 -04:00
profiling.csv fix: handle legacy neuron classes in BlendWeightsFrom to avoid UB 2026-07-26 14:45:08 -04:00
README.md feat: Enhance README and documentation for Warrior_EA project 2026-04-20 19:28:34 -04:00
REFACTOR_NOTES.md refactor(ai): extract Layer.mqh and deduplicate AI config 2026-08-01 11:27:28 -04:00
SIGNALS.md feat(signals): add MACD/Ichimoku presets and Vote_Close disabled option 2026-07-26 18:33:12 -04:00
Warrior_EA.md feat: Enhance README and documentation for Warrior_EA project 2026-04-20 19:28:34 -04:00
Warrior_EA.mq5 fix(chart): display now reads era-end SNAPSHOTS - the live cache is wiped mid-era 2026-08-18 22:03:20 -04:00
Warrior_EA.mqproj Add new research scripts for trading strategy analysis 2026-08-02 12:25:20 -04:00
Warrior_EA_System_Overview.md refactor(ai): extract Layer.mqh and deduplicate AI config 2026-08-01 11:27:28 -04:00

Warrior_EA Project Overview

Description

Warrior_EA is a modular, AI/ML-ready MetaTrader 5 Expert Advisor designed for robust, production-grade trading. It integrates traditional and AI-driven signals, advanced money management, trailing stops, and a database/statistics subsystem for adaptive optimization.

Key Features

  • AI/ML Integration: LSTM, PAI, and CONV neural network signals, with configurable feature pipelines and training options.
  • Traditional Signals: Modular support for classic indicators (MA, MACD, RSI, etc.) and price action patterns.
  • Money Management: Fixed lot, fixed risk, and intelligent/adaptive strategies.
  • Trailing Stops: ATR-based, MA-based, Parabolic SAR, and more.
  • Database/Statistics: Tracks trades, signals, and performance for optimization and research.
  • Configurable Inputs: All major features and strategies are user-configurable via Inputs.mqh.
  • Robust Initialization: Retry logic and error handling for all critical subsystems.
  • Production-Ready: Designed for institutional and advanced retail use, with a focus on maintainability and extensibility.

Directory Structure

  • AI/: Neural network and ML logic
  • Database/: Database and statistics management
  • Enumerations/: Enum and type definitions
  • Expert/: Main EA orchestration and custom logic
  • Money/: Money management strategies
  • Signals/: Signal generation (AI and traditional)
  • Structures/: Data structures for signals and trades
  • System/: Utility and infrastructure modules
  • Trailing/: Trailing stop strategies
  • Variables/: Global input parameters and runtime variables

Getting Started

  1. Configure your desired strategies and features in Variables/Inputs.mqh.
  2. Compile Warrior_EA.mq5 in MetaEditor.
  3. Attach to a chart and enable Algo Trading.
  4. Monitor logs and database/statistics for performance and optimization.

Modernization & AI/ML Roadmap

  • Migrate all hard-coded signals to a configurable, feature-driven pipeline.
  • Expand AI/ML subsystem with new models and training options.
  • Enhance database/statistics for deeper analytics and automated optimization.
  • Introduce unit and integration tests for all modules.

Documented April 2026. For subsystem details, see each directory's README.md and AI_NETWORK.md.