Warrior_EA/Variables/Variables.mqh
AnimateDread 609be10391 feat(ai): AI_HYBRID = ensemble preset (all NNs, one chart); conv+recurrent renamed AI_CONVLSTM
The user is right that no special combination logic is needed: the AI
signals are ordinary voting filters, and the aggregate already has
union semantics - abstaining filters do not dilute the average, so an
ensemble chart trades whenever ANY deployed member clears the vote
threshold and disagreeing members net out. What the ensemble preset
actually adds:

- AI_CHOICE value 4 renamed AI_CONVLSTM (the name says the front-end);
  enum VALUES stable, CSignalHYBRID class and State\HYBRID\ folder kept,
  so saved configs and trained models keep their identity.
- New AI_HYBRID = 6: enables PAI+CONV+LSTM+CONVLSTM together on one
  chart - replaces four separate charts of the same symbol. Each member
  trains and self-gates independently; only certified members ever vote.
- |ENS1 fingerprint token on every member, so an ensemble member's
  weight files can never collide with a solo model of identical
  settings on another chart of the same symbol (the duplicate-chart
  guard would otherwise correctly fight over one .nnw).
- Private default AIType = AI_HYBRID: one D1 drop now yields every
  topology's gate verdict for that symbol.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 16:50:36 -04:00

35 lines
2.9 KiB
MQL5

//+------------------------------------------------------------------+
//| Warrior_EA |
//| AnimateDread |
//| |
//+------------------------------------------------------------------+
string eaName = "Warrior_EA";
//--- Version of the pattern-journaling SEMANTICS: what a row in a <Filter>_Pattern_N_<Buy|Sell> table
//--- means, which bars produce one, and what the columns are. Folded (unconditionally) into the DB
//--- filename fingerprint (ComputeDbConfigFingerprint, Warrior_EA.mq5), so bumping it re-keys every
//--- database and stale rows can never feed UpdateSignalsWeights() again. BUMP THIS whenever a signal
//--- class's pattern definitions change meaning (Signals\Signal*.mqh - e.g. b2069bc's Ichimoku models,
//--- 8710240's Sanyaku state->event), or the journaling contract in CExpertSignalCustom::Direction()
//--- changes. The config fingerprint alone cannot see code changes - it hashes inputs, and 7 months of
//--- rows recorded under three different Pattern_N meanings shared one table because nothing re-keyed.
//--- v3: per-side journaling (each side's own ladder match writes its own row; net vote is a data
//--- column, not a drop filter) + the netVote schema column.
//--- v4: a reversing signal registers its own trade after closing the opposite one (true
//--- stop-and-reverse); v3 absorbed it as an exit, which one-sided the ledger for every pure event
//--- pattern (strict alternators like MACD model 3 put all rows on whichever side fired first).
//--- v5: the OpenLongParams/OpenShortParams gate is gone from the logger - order-placement failures
//--- (stops-level, ATR warm-up, entry-mode rejection) cluster in volatility/spread conditions and
//--- were non-randomly censoring those bars out of the log. The DB logs every matched ladder,
//--- unconditionally on the decision layer.
#define SIGNAL_DB_SEMANTICS_VERSION 5
string tableschema = "year INTEGER, month INTEGER, day INTEGER, dayOfWeek INTEGER, hour INTEGER, minutes INTEGER, pattern STRING, direction STRING, entryPrice DOUBLE, exitPrice DOUBLE, result STRING, netVote DOUBLE";
bool IsBacktesting = false;
//--- EnableSessionFilter/EnableNewsFilter/EnableRiskGuard are real inputs (Variables\Inputs.mqh),
//--- consistent with every other filter's on/off toggle. EnableITF and EnableMarketDepth are gone -
//--- both modules were removed 2026-08-01, see the removal notes in that file.
bool EnablePAI = (AIType == AI_MLP || AIType == AI_HYBRID);
bool EnableCONV = (AIType == AI_CONV || AIType == AI_HYBRID);
bool EnableLSTM = (AIType == AI_LSTM || AIType == AI_HYBRID);
bool EnableHYBRID = (AIType == AI_CONVLSTM || AIType == AI_HYBRID); // the CONVLSTM instance; see AI_CHOICE
bool EnableMETA = (AIType == AI_META);
//+------------------------------------------------------------------+