forked from mnbvc188199/Warrior_EA
| Filename | Latest commit message | Latest commit date |
|---|---|---|
User request: "the entry/exit thresholds are manual numbers, I would like
them to be confidence percentages, so the current 20 would be only 20%
confidence in a profitable trade."
WHY 20 WAS EVER SENSIBLE. Under UseDatabaseRanking both factors of a filter's
contribution are win rates: the pattern weight is that pattern's measured win
rate (UpdateSignalsWeights -> ApplyPatternWeight) and m_weight is the filter's
average win rate over its patterns, /100. Dividing the sum by the VOTER COUNT
therefore produced a mean of PRODUCTS of two win rates - a genuinely
60%-accurate filter firing a 60% pattern scored 0.60 x 60 = 36. The number was
never on a probability scale, so its magnitude meant nothing on its own.
Dividing by Sum(m_weight) instead makes it a weighted MEAN of win rates, which
is a win rate: result = Sum(w_i*p_i)/Sum(w_i). Every voter at 60% now reads 60;
MACD's double-divergence pattern (weight 100) voting alone reads 100. m_weight
stops being a discount on the probability and becomes how much a filter's
opinion COUNTS - which is what a module weight should always have been.
Default Min_Vote_Open 20 -> 50: not a tightening, the same bar re-expressed.
ONE SCALE, EVERYWHERE - the part that made this bigger than a rescale. Three
other places compared against a 0..1 softmax confidence and would each have
become a fresh currency mismatch the moment the input changed meaning:
* the AI early-exit route (LiveSignedConfidence vs m_ai_exit_threshold) now
reads m_lastAiVote - the AI filters' own weighted mean, undiluted by the
classic side, which is the only reason that route exists - against the
same m_threshold_close the averaged vote uses. m_ai_exit_threshold is
retired rather than left dangling.
* m_oosDecisionSeries now carries the vote, not the confidence, so the exit
SIMULATION stops modelling a close rule the EA does not run.
* ExitPolicy() clamped anything > 1.0 to zero. Passing the unscaled input
through that would have silently switched vote exits off in the
simulation while live went on running them - found before it shipped;
the bound now tracks the scale.
LiveSignedConfidence() is deliberately untouched and still 0..1: MM sizing,
SL/TP scaling and the intelligent trailing want a model confidence, not a win
rate.
CALIBRATION CAVEAT, stated in the code where the claim is made: this is only a
real probability to the extent the pattern weights are. A pattern with fewer
than MIN_TRADES_FOR_WIN_RATE journaled trades keeps its DEFAULT weight - a
designed prior (25/50/75/100 for the AI tiers), not a measurement. Until the
signal DB fills, "60" means "the designed conviction of the patterns that
fired". Closing that gap is the next commit.
Also corrects VOTE_CLOSE_PRESETS' comment, which documented the two scales
this removes.
NOT COMPILED - user compiles in MetaEditor.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
| .. | ||
| GlobalEnums.mqh | ||
| InputEnums.mqh | ||
| README.md | ||
Enumerations Documentation
GlobalEnums.mqh
Defines the ENUM_SIGNAL enumeration for trading signal states:
Buy: Indicates a buy signal.Sell: Indicates a sell signal.Neutral: Indicates a neutral/no-action signal.Undefine: Indicates an undefined or uninitialized state.
InputEnums.mqh
Defines a large set of enumerations for configuration and input parameters used throughout the EA. These include:
- Custom menu and property enums for UI/configuration.
- Period presets (e.g., 5, 10, 14, 20, 30, 50, 100, 200) for indicator calculations.
- Training years presets for ML/AI training window selection.
- ATR multipliers for volatility-based calculations.
- Threshold presets for signal/trigger sensitivity.
- Risk/reward ratio presets for money management.
- Bars expiration settings for trade/session logic.
- Entry multipliers for order sizing.
- Trailing strategy types (none, ATR-based, SAR, MA, etc.).
- Money management strategies (fixed risk, intelligent, fixed lot, etc.).
- Day-of-week and session enums for time-based logic.
- ITF (Intraday Time Filter) settings.
- Hourly session presets (H1-H23) for time filtering.
Purpose: These enumerations provide a strongly-typed, maintainable way to configure and control the EA's behavior, supporting both traditional and AI/ML-driven logic. They enable dynamic feature selection, risk management, and strategy configuration, and are essential for modular, testable code.
Modernization Note:
- Enumerations should be referenced in configuration UIs and parameter files to enable dynamic, user-driven feature pipelines.
- Consider extending enums to support new AI/ML features and dynamic input selection as the EA evolves.