forked from animatedread/Warrior_EA
User design (2026-08-19): 'remove the enum menu that selects neural networks... individual inputs for every NN just like classic signals... the META NN should be integrated into the voting decision pipeline when enabled... as a bonus meta labelling is applied to enabled NNs.' - AI_CHOICE is GONE (tombstoned per the stale-.set doctrine). Use_MLP/Use_CONV/Use_LSTM/ Use_CONVLSTM are ordinary bools like the classic votes; the ensemble arithmetic adapts to any subset because the consensus divisor is the enabled capable weight. Two or more enabled = ensemble (|ENS1 token + joint gate, exactly the old AI_HYBRID fingerprints, so existing weight files keep loading); one = the old solo preset; none = classic-only. - Use_MetaLabeling un-couples META from the direction NNs (the old selector made them mutually exclusive). S3 ships: CSignalMETA::LiveMetaGate scores each vote-cleared entry (shared window at bar 1 + proposal descriptor: side, net vote, live geometry, spread/ATR; pattern one-hot ZEROED - ranking, not calibrated probability, documented in the body) and vetoes below the cost-adjusted break-even. Entries only; fail-open everywhere, loudly. - COEXISTENCE HAZARDS closed: VoteCapableWeight()=0 and ProspectiveVote()=false for the meta target - solo-only until today, a trained META would otherwise sit in the consensus divisor as a permanent abstainer and shrink every vote by its module weight. - CERTIFIED == TRADED: the ensemble era verdict replays the identical veto through the same g_warriorMetaGate pointer over its OOS fired bars (bar re-resolved from the row's own time; fail-open counted as fires and reported: 'metaGate: N approved, M vetoed, K unscored'). The overlay deliberately does NOT replay it (veto-filter-in-replay class, calendar-cliff precedent) - documented at the sweep site. Solo charts' own gate does not model the veto - the standing solo-gate caveat, documented at the input. - DB continuity: the pattern/journal DB fingerprint's first slot was (int)AIType; DbLegacyAiSlot() maps every legacy-expressible config to its OLD value (new 2-3 member subsets get 100+bitmask, outside the legacy range) so no existing database re-keys. filterID becomes the enabled roster via one EnabledNNSummary(). - HUD: the meta line shows the gate (armed/(trn), last P vs BE, ok/veto tally); the armed/disarmed announcement fires on state change via one latch (MetaGateArmedNow), not only when an entry happens to be proposed. NOT COMPILED - user compiles in MetaEditor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
40 lines
3.3 KiB
MQL5
40 lines
3.3 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.
|
|
//--- Direct copies of the per-NN inputs (Variables\Inputs.mqh; the AI_CHOICE preset selector is
|
|
//--- gone since 2026-08-19). The Enable* names survive because dozens of sites read them.
|
|
//--- EnableHYBRID still names the CONVLSTM topology INSTANCE (CSignalHYBRID, State\HYBRID\) - a
|
|
//--- 2026-08-15 enum-rename artifact kept so the class and its on-disk files keep their identity.
|
|
//--- Re-derived in InitializeSignal() like before (init-order safety); same values both times.
|
|
bool EnablePAI = Use_MLP;
|
|
bool EnableCONV = Use_CONV;
|
|
bool EnableLSTM = Use_LSTM;
|
|
bool EnableHYBRID = Use_CONVLSTM; // the CONVLSTM instance; see the rename note above
|
|
bool EnableMETA = Use_MetaLabeling;
|
|
//+------------------------------------------------------------------+
|