fix(ai): drop the conv pooling stage - it reduced across filters, not time
FeedForwardConv emits POSITION-MAJOR output, matrix_o[out + window_out * i],
so one bar's window_out filter responses are contiguous and consecutive bars
sit window_out apart. Both pooling implementations (FeedForwardProof and
CPU_FeedForwardProof) slide FLAT over that buffer - pos = i * step, reducing
`window` CONSECUTIVE elements. On a position-major layout those neighbours
are different FILTERS of the same bar, never one filter across time.
At the shipped 3/2 the pool computed max(bar0_f0, bar0_f1, bar0_f2), then
max(bar0_f2, bar0_f3, bar0_f4), with every 8th window straddling a bar
boundary. So it collapsed unrelated feature detectors into whichever fired
hardest, passed gradient to that winner only, and halved the feature map
while doing it - all below every learnable layer, where nothing above can
recover it. The removed inputs' own labels ("3 Bars") show time-axis pooling
was the intent throughout.
Measured cost: CONV sat pinned at ~40% balanced accuracy for 510 eras with
Sell recall 0%, while plain MLPs on the same data reached 57-61%. HYBRID,
which also carried this stage, came second-worst of the batch-norm group.
Not fixable in the topology: pooling one filter across time needs a stride
of window_out BETWEEN samples within a window, which a consecutive-window
kernel cannot express at any window/step. That needs a stride-aware kernel
in Network.cl + WarriorCPU.cpp + WarriorDML.cpp and a DLL rebuild, and is
only worth doing if a conv front-end earns its place without downsampling
first - with 20 sliding positions there is little to gain by halving them.
ConvPoolWindow/ConvPoolStep and their enums are removed with it, along with
the |CP: fingerprint term added earlier today.
Both builds compile 0 errors, 0 warnings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:28:44 -04:00
|
|
|
//+------------------------------------------------------------------+
|
2026-07-13 03:23:39 -04:00
|
|
|
//| CustomEnums.mqh |
|
|
|
|
|
//| AnimateDread |
|
|
|
|
|
//| https://www.mql5.com |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
#property copyright "AnimateDread"
|
|
|
|
|
#property link "https://www.mql5.com"
|
2026-07-22 17:17:23 -04:00
|
|
|
//--- Weight-update optimizer. This is really an AI\Network.mqh library type; a guarded duplicate is
|
|
|
|
|
//--- kept here so Variables\Inputs.mqh (which uses it for the TrainingOptimizer input) can be included
|
|
|
|
|
//--- before the AI headers - putting the EA's own inputs at the top of the Inputs tab. Keep in sync
|
|
|
|
|
//--- with AI\Network.mqh's copy; the shared WARRIOR_ENUM_OPTIMIZATION_DEFINED guard prevents a
|
|
|
|
|
//--- duplicate definition whichever header is parsed first.
|
|
|
|
|
#ifndef WARRIOR_ENUM_OPTIMIZATION_DEFINED
|
|
|
|
|
#define WARRIOR_ENUM_OPTIMIZATION_DEFINED
|
2026-07-29 00:03:54 -04:00
|
|
|
//--- A third DFA entry was removed 2026-07-28 - see AI\Network.mqh's copy for the full rationale (it was
|
|
|
|
|
//--- a deterministic index-parity sign flip on the gradient, i.e. ascent on half of every weight tensor,
|
|
|
|
|
//--- not Direct Feedback Alignment). SGD/ADAM keep ordinals 0/1: they feed the weights-filename
|
|
|
|
|
//--- fingerprint and must never be renumbered.
|
2026-07-22 17:17:23 -04:00
|
|
|
enum ENUM_OPTIMIZATION
|
|
|
|
|
{
|
|
|
|
|
SGD, // SGD + Momentum (heavy-ball, simpler, needs more eras)
|
2026-07-29 00:03:54 -04:00
|
|
|
ADAM // Adam (adaptive step, faster convergence, can overfit)
|
2026-07-22 17:17:23 -04:00
|
|
|
};
|
|
|
|
|
#endif
|
2026-07-22 22:51:04 -04:00
|
|
|
//--- Logical, commonly-used Moving Average / RSI periods only - keeps the Classic Signals inputs (and
|
|
|
|
|
//--- the AutoTuneIndicators search space over them, see ADIndicatorTuner.mqh) from being set/perturbed
|
|
|
|
|
//--- to an arbitrary, non-standard period.
|
|
|
|
|
enum MA_PERIOD_PRESETS
|
|
|
|
|
{
|
|
|
|
|
MA_PERIOD_5 = 5, // 5
|
|
|
|
|
MA_PERIOD_8 = 8, // 8
|
|
|
|
|
MA_PERIOD_9 = 9, // 9
|
|
|
|
|
MA_PERIOD_10 = 10, // 10
|
|
|
|
|
MA_PERIOD_13 = 13, // 13
|
|
|
|
|
MA_PERIOD_20 = 20, // 20
|
|
|
|
|
MA_PERIOD_21 = 21, // 21
|
|
|
|
|
MA_PERIOD_50 = 50, // 50
|
|
|
|
|
MA_PERIOD_100 = 100, // 100
|
|
|
|
|
MA_PERIOD_200 = 200, // 200
|
|
|
|
|
};
|
feat: add unified MA type support to indicator tuner
Add `MA_TYPE_PRESETS` enum covering advanced (ALMA, DEMA, ZLEMA, T3, Kalman) and standard (SMA, EMA, SMMA, LWMA) moving averages. Integrate `maType` and `bestMaType` into `CADIndicatorTuner` struct, update flatten/unflatten routines, and bump `AD_TUNE_PARAM_COUNT` to 33. This allows the auto-tuner to search over MA type alongside period, improving feature discovery.
2026-07-23 15:02:09 -04:00
|
|
|
//--- Unified moving-average TYPE, spanning the advanced/institutional MAs AND the standard methods, all
|
|
|
|
|
//--- served by the one CustomIndicators\ADMovingAverage.mq5. VALUES ARE THE INDICATOR'S OWN InpType codes
|
|
|
|
|
//--- and MUST stay in sync with it: 0..4 (ALMA/DEMA/ZLEMA/T3/Kalman) are the original codes, unchanged for
|
|
|
|
|
//--- cross-platform parity with the SQX build; 5..8 (SMA/EMA/SMMA/LWMA) were added on top. Drives both the
|
|
|
|
|
//--- classic MA vote (Signals\SignalMA.mqh) and the NN MA input feature, and is auto-tuner-searchable.
|
|
|
|
|
enum MA_TYPE_PRESETS
|
|
|
|
|
{
|
|
|
|
|
MA_TYPE_ALMA = 0, // ALMA (Arnaud Legoux)
|
|
|
|
|
MA_TYPE_DEMA = 1, // DEMA (double exponential)
|
|
|
|
|
MA_TYPE_ZLEMA = 2, // ZLEMA (zero-lag)
|
|
|
|
|
MA_TYPE_T3 = 3, // T3 (Tillson)
|
|
|
|
|
MA_TYPE_KALMAN = 4, // Kalman filter
|
|
|
|
|
MA_TYPE_SMA = 5, // SMA (simple)
|
|
|
|
|
MA_TYPE_EMA = 6, // EMA (exponential)
|
|
|
|
|
MA_TYPE_SMMA = 7, // SMMA (smoothed)
|
|
|
|
|
MA_TYPE_LWMA = 8, // LWMA (linear weighted)
|
|
|
|
|
};
|
2026-07-22 22:51:04 -04:00
|
|
|
enum RSI_PERIOD_PRESETS
|
|
|
|
|
{
|
|
|
|
|
RSI_PERIOD_2 = 2, // 2
|
|
|
|
|
RSI_PERIOD_5 = 5, // 5
|
|
|
|
|
RSI_PERIOD_7 = 7, // 7
|
|
|
|
|
RSI_PERIOD_9 = 9, // 9
|
2026-07-26 18:48:34 -04:00
|
|
|
RSI_PERIOD_14 = 14, // 14 (classic)
|
2026-07-22 22:51:04 -04:00
|
|
|
RSI_PERIOD_21 = 21, // 21
|
|
|
|
|
RSI_PERIOD_25 = 25, // 25
|
|
|
|
|
};
|
2026-07-26 18:33:12 -04:00
|
|
|
//--- MACD periods (Signals\SignalMACD.mqh classic vote + the MACD input feature). The preset SETS are
|
|
|
|
|
//--- deliberately chosen so that EVERY fast/slow combination satisfies CSignalMACD::ValidationSettings()'s
|
|
|
|
|
//--- "slow must exceed fast" rule - the fast list tops out at 15, the slow list starts at 17. A trader
|
|
|
|
|
//--- picking two legal-looking values from the dropdowns can therefore never produce a combination that
|
|
|
|
|
//--- fails init, and the auto-tuner (ADIndicatorTuner::PerturbRandom) can perturb either one in isolation
|
|
|
|
|
//--- without having to know the other's current value.
|
|
|
|
|
enum MACD_FAST_PRESETS
|
|
|
|
|
{
|
|
|
|
|
MACD_FAST_5 = 5, // 5
|
|
|
|
|
MACD_FAST_8 = 8, // 8
|
|
|
|
|
MACD_FAST_12 = 12, // 12 (classic)
|
|
|
|
|
MACD_FAST_15 = 15, // 15
|
|
|
|
|
};
|
|
|
|
|
enum MACD_SLOW_PRESETS
|
|
|
|
|
{
|
|
|
|
|
MACD_SLOW_17 = 17, // 17
|
|
|
|
|
MACD_SLOW_21 = 21, // 21
|
|
|
|
|
MACD_SLOW_26 = 26, // 26 (classic)
|
|
|
|
|
MACD_SLOW_34 = 34, // 34
|
|
|
|
|
MACD_SLOW_50 = 50, // 50
|
|
|
|
|
};
|
|
|
|
|
enum MACD_SIGNAL_PRESETS
|
|
|
|
|
{
|
|
|
|
|
MACD_SIGNAL_5 = 5, // 5
|
|
|
|
|
MACD_SIGNAL_7 = 7, // 7
|
|
|
|
|
MACD_SIGNAL_9 = 9, // 9 (classic)
|
|
|
|
|
MACD_SIGNAL_12 = 12, // 12
|
|
|
|
|
};
|
|
|
|
|
//--- Ichimoku periods (Signals\SignalIchimoku.mqh classic vote + the Ichimoku input feature). Same
|
|
|
|
|
//--- all-combinations-are-legal design as the MACD presets above, against
|
|
|
|
|
//--- CSignalIchimoku::ValidationSettings()'s "Tenkan < Kijun < Senkou B" rule: Tenkan tops out at 20,
|
|
|
|
|
//--- Kijun spans 22-40, Senkou B starts at 44. The classic 9/26/52 triple is in the middle of each.
|
|
|
|
|
enum ICHIMOKU_TENKAN_PRESETS
|
|
|
|
|
{
|
|
|
|
|
ICHI_TENKAN_7 = 7, // 7
|
|
|
|
|
ICHI_TENKAN_9 = 9, // 9 (classic)
|
|
|
|
|
ICHI_TENKAN_12 = 12, // 12
|
|
|
|
|
ICHI_TENKAN_20 = 20, // 20
|
|
|
|
|
};
|
|
|
|
|
enum ICHIMOKU_KIJUN_PRESETS
|
|
|
|
|
{
|
|
|
|
|
ICHI_KIJUN_22 = 22, // 22
|
|
|
|
|
ICHI_KIJUN_26 = 26, // 26 (classic)
|
|
|
|
|
ICHI_KIJUN_30 = 30, // 30
|
|
|
|
|
ICHI_KIJUN_40 = 40, // 40
|
|
|
|
|
};
|
|
|
|
|
enum ICHIMOKU_SENKOU_PRESETS
|
|
|
|
|
{
|
|
|
|
|
ICHI_SENKOU_44 = 44, // 44
|
|
|
|
|
ICHI_SENKOU_52 = 52, // 52 (classic)
|
|
|
|
|
ICHI_SENKOU_60 = 60, // 60
|
|
|
|
|
ICHI_SENKOU_120 = 120, // 120
|
|
|
|
|
};
|
2026-07-13 03:23:39 -04:00
|
|
|
//--- custom enumerations for certain settings, minimizes overfitting
|
|
|
|
|
enum IND_PERIODS_PRESETS
|
|
|
|
|
{
|
|
|
|
|
PERIOD_5 = 5, // 5 Periods
|
|
|
|
|
PERIOD_10 = 10, // 10 Periods
|
2026-07-26 18:48:34 -04:00
|
|
|
PERIOD_14 = 14, // 14 Periods (classic)
|
2026-07-13 03:23:39 -04:00
|
|
|
PERIOD_20 = 20, // 20 Periods
|
|
|
|
|
PERIOD_30 = 30, // 30 Periods
|
|
|
|
|
PERIOD_50 = 50, // 50 Periods
|
|
|
|
|
PERIOD_100 = 100, // 100 Periods
|
|
|
|
|
PERIOD_200 = 200, // 200 Periods
|
|
|
|
|
};
|
|
|
|
|
enum TRAINING_YEARS_PRESET
|
|
|
|
|
{
|
|
|
|
|
YEARS_1 = 1, // 1 year
|
|
|
|
|
YEARS_2 = 2, // 2 years
|
|
|
|
|
YEARS_5 = 5, // 5 years
|
|
|
|
|
YEARS_10 = 10, // 10 years
|
|
|
|
|
YEARS_20 = 20, // 20 years
|
|
|
|
|
};
|
2026-07-22 13:33:56 -04:00
|
|
|
//--- Stop-loss sizing mode. The ATR_* presets place the SL a fixed multiple of ATR beyond the
|
|
|
|
|
//--- recent swing high/low (the long-standing rule-based behavior). SL_INTELLIGENT keeps that same
|
|
|
|
|
//--- swing-anchored distance but tightens it as live AI/DB confidence rises (see
|
|
|
|
|
//--- CExpertSignalCustom::OpenParams()'s AI_SL_TIGHTEN_FACTOR) - a high-conviction setup gets a
|
|
|
|
|
//--- tighter stop, a marginal one keeps the full ATR cushion. SL_PREV_SWING sits the stop EXACTLY at
|
|
|
|
|
//--- the recent swing (buy: swing low / sell: swing high), no ATR padding. Negative sentinels so they
|
|
|
|
|
//--- can never be mistaken for a literal ATR multiple.
|
|
|
|
|
enum STOP_LOSS_MODE
|
|
|
|
|
{
|
|
|
|
|
SL_INTELLIGENT = -1, // Intelligent (AI-confidence scaled)
|
|
|
|
|
SL_PREV_SWING = -101, // Previous swing low (buy) / swing high (sell), no ATR padding
|
|
|
|
|
SL_ATR_x1 = 1, // ATR * 1 beyond swing
|
|
|
|
|
SL_ATR_x2 = 2, // ATR * 2 beyond swing
|
|
|
|
|
SL_ATR_x3 = 3, // ATR * 3 beyond swing
|
|
|
|
|
};
|
|
|
|
|
//--- Take-profit sizing mode. The ATR_* presets set the TP a fixed multiple of ATR FROM THE ENTRY
|
|
|
|
|
//--- PRICE (no longer derived from the reward:risk ratio - see Min_Risk_Reward_Ratio, now a pure
|
|
|
|
|
//--- rejection filter). TP_INTELLIGENT scales the ATR multiple UP with confidence (lets high-conviction
|
|
|
|
|
//--- winners run further). TP_PREV_SWING targets the recent swing (buy: swing high / sell: swing low),
|
|
|
|
|
//--- the structural take-profit. Negative sentinels as above.
|
|
|
|
|
enum TAKE_PROFIT_MODE
|
|
|
|
|
{
|
|
|
|
|
TP_INTELLIGENT = -1, // Intelligent (AI-confidence scaled)
|
|
|
|
|
TP_PREV_SWING = -101, // Previous swing high (buy) / swing low (sell)
|
|
|
|
|
TP_ATR_x1 = 1, // ATR * 1 from entry
|
|
|
|
|
TP_ATR_x2 = 2, // ATR * 2 from entry
|
|
|
|
|
TP_ATR_x3 = 3, // ATR * 3 from entry
|
|
|
|
|
TP_ATR_x4 = 4, // ATR * 4 from entry
|
|
|
|
|
TP_ATR_x6 = 6, // ATR * 6 from entry
|
|
|
|
|
TP_ATR_x8 = 8, // ATR * 8 from entry
|
|
|
|
|
TP_ATR_x10 = 10, // ATR * 10 from entry
|
|
|
|
|
};
|
2026-07-13 03:23:39 -04:00
|
|
|
enum RISK_REWARD_RATIO
|
|
|
|
|
{
|
|
|
|
|
RR_1x1 = 1, // 1:1 RR
|
2026-07-26 18:48:34 -04:00
|
|
|
RR_1x2 = 2, // 1:2 RR (classic)
|
2026-07-13 03:23:39 -04:00
|
|
|
RR_1x3 = 3, // 1:3 RR
|
|
|
|
|
RR_1x4 = 4, // 1:4 RR
|
|
|
|
|
RR_1x5 = 5, // 1:5 RR
|
|
|
|
|
RR_1x6 = 6,// 1:6 RR
|
|
|
|
|
RR_1x8 = 8, // 1:8 RR
|
|
|
|
|
RR_1x10 = 10, // 1:10 RR
|
|
|
|
|
};
|
|
|
|
|
enum MONEY_RISK_PERCENT_PRESET
|
|
|
|
|
{
|
2026-07-26 18:48:34 -04:00
|
|
|
RISK_PCT_1 = 1, // 1 (classic)
|
2026-07-13 03:23:39 -04:00
|
|
|
RISK_PCT_2 = 2, // 2
|
|
|
|
|
RISK_PCT_3 = 3, // 3
|
|
|
|
|
RISK_PCT_4 = 4, // 4
|
|
|
|
|
RISK_PCT_5 = 5, // 5
|
|
|
|
|
};
|
|
|
|
|
enum BARS_EXPIRATION
|
|
|
|
|
{
|
|
|
|
|
BARS_X1 = 1, // 1 Candle
|
|
|
|
|
BARS_X2 = 2, // 2 Candles
|
|
|
|
|
BARS_X3 = 3, // 3 Candles
|
|
|
|
|
BARS_X5 = 5, // 5 Candles
|
|
|
|
|
BARS_X10 = 10, // 10 Candles
|
|
|
|
|
BARS_X20 = 20, // 20 Candles
|
|
|
|
|
};
|
2026-07-22 13:33:56 -04:00
|
|
|
//--- Entry order placement. All ATR offsets are measured from the CURRENT price (bid/ask), NOT the
|
|
|
|
|
//--- swing - this is the deliberate change for stability. Sign picks the side, magnitude is the ATR
|
|
|
|
|
//--- multiple:
|
|
|
|
|
//--- MARKET - fill immediately at market.
|
|
|
|
|
//--- LIMIT_*xATR - pending LIMIT that many ATR on the favorable side of bid/ask (buy below /
|
|
|
|
|
//--- sell above): wait for a pullback into a better price.
|
|
|
|
|
//--- STOP_*xATR - pending STOP that many ATR on the breakout side of bid/ask (buy above /
|
|
|
|
|
//--- sell below): enter on continuation.
|
|
|
|
|
//--- ENTRY_PREV_SWING - pending order anchored at the recent swing (buy at the lookback swing low /
|
|
|
|
|
//--- sell at the swing high) - the one swing-anchored option kept as a choice.
|
|
|
|
|
//--- ENTRY_INTELLIGENT - AI-confidence-scaled LIMIT pullback from bid/ask: a deep pullback when
|
|
|
|
|
//--- confidence is low, collapsing to a market fill as confidence -> 1 (grab
|
|
|
|
|
//--- high-conviction setups, demand a better price on marginal ones).
|
|
|
|
|
//--- Non-MARKET results that clear the broker's stop-level distance become a pending order that
|
|
|
|
|
//--- auto-expires after Signal_Expiration bars; anything closer just fills at market
|
|
|
|
|
//--- (CExpertTrade::Buy/Sell handle the market-vs-limit-vs-stop routing off this price natively).
|
2026-07-13 03:23:39 -04:00
|
|
|
enum ENTRY_MULTIPLIER
|
|
|
|
|
{
|
2026-07-22 13:33:56 -04:00
|
|
|
ENTRY_INTELLIGENT = -100, // Intelligent (AI-confidence scaled limit pullback)
|
|
|
|
|
ENTRY_PREV_SWING = -101, // Pending at previous swing low (buy) / swing high (sell)
|
|
|
|
|
LIMIT_3xATR = -3, // Limit 3x ATR from bid/ask
|
|
|
|
|
LIMIT_2xATR = -2, // Limit 2x ATR from bid/ask
|
|
|
|
|
LIMIT_1xATR = -1, // Limit 1x ATR from bid/ask
|
|
|
|
|
MARKET = 0, // Market order
|
|
|
|
|
STOP_1xATR = 1, // Stop 1x ATR from bid/ask
|
|
|
|
|
STOP_2xATR = 2, // Stop 2x ATR from bid/ask
|
|
|
|
|
STOP_3xATR = 3, // Stop 3x ATR from bid/ask
|
2026-07-13 03:23:39 -04:00
|
|
|
};
|
|
|
|
|
enum TRAILING_STRATEGY
|
|
|
|
|
{
|
|
|
|
|
TRAILING_STRATEGY_NONE, // No Trailing Stop Strategy
|
|
|
|
|
TRAILING_STRATEGY_ATR_x1, // ATR * 1 Trailing Strategy
|
|
|
|
|
TRAILING_STRATEGY_ATR_x2, // ATR * 2 Trailing Strategy
|
|
|
|
|
TRAILING_STRATEGY_ATR_x3, // ATR * 3 Trailing Strategy
|
2026-07-22 13:33:56 -04:00
|
|
|
//--- Confidence-adaptive ATR trail: widens toward TRAIL_ATR_MAX_MULT when live AI confidence still
|
|
|
|
|
//--- backs the position (lets winners run), tightens toward TRAIL_ATR_MIN_MULT as that confidence
|
|
|
|
|
//--- weakens or flips against it (locks profit). See Trailing\TrailingIntelligent.mqh.
|
|
|
|
|
TRAILING_STRATEGY_INTELLIGENT, // Intelligent (AI-confidence adaptive ATR) Trailing Strategy
|
2026-07-13 03:23:39 -04:00
|
|
|
};
|
|
|
|
|
enum MONEY_MANAGEMENT_STRATEGY
|
|
|
|
|
{
|
|
|
|
|
FIXED_RISK, // Fixed risk Percent of Account
|
|
|
|
|
INTELLIGENT, // Intelligent lot size
|
|
|
|
|
FIXED_LOT, // Fixed lot size
|
|
|
|
|
};
|
|
|
|
|
enum TIME_FILTER_DAY_OF_WEEK
|
|
|
|
|
{
|
|
|
|
|
DOW_DISABLED = -1,// Disabled
|
|
|
|
|
DOW_SUNDAY = 0, // Sunday
|
|
|
|
|
DOW_MONDAY = 1, // Monday
|
|
|
|
|
DOW_TUESDAY = 2, // Tuesday
|
|
|
|
|
DOW_WEDNESDAY = 3, // Wednesday
|
|
|
|
|
DOW_THURSDAY = 4, // Thursday
|
|
|
|
|
DOW_FRIDAY = 5, // Friday
|
|
|
|
|
DOW_SATURDAY = 6, // Saturday
|
|
|
|
|
};
|
|
|
|
|
enum ENTRY_HOUR_OF_DAY
|
|
|
|
|
{
|
|
|
|
|
ENTRY_HOUR_DISABLED = -1, // Disabled
|
|
|
|
|
EH_0 = 0, // 00Hxx
|
|
|
|
|
EH_1 = 1, // 1Hxx
|
|
|
|
|
EH_2 = 2, // 2Hxx
|
|
|
|
|
EH_3 = 3, // 3Hxx
|
|
|
|
|
EH_4 = 4, // 4Hxx
|
|
|
|
|
EH_5 = 5, // 5Hxx
|
|
|
|
|
EH_6 = 6, // 6Hxx
|
|
|
|
|
EH_7 = 7, // 7Hxx
|
|
|
|
|
EH_8 = 8, // 8Hxx
|
|
|
|
|
EH_9 = 9, // 9Hxx
|
|
|
|
|
EH_10 = 10, // 10Hxx
|
|
|
|
|
EH_11 = 11, // 11Hxx
|
|
|
|
|
EH_12 = 12, // 12Hxx
|
|
|
|
|
EH_13 = 13, // 13Hxx
|
|
|
|
|
EH_14 = 14, // 14Hxx
|
|
|
|
|
EH_15 = 15, // 15Hxx
|
|
|
|
|
EH_16 = 16, // 16Hxx
|
|
|
|
|
EH_17 = 17, // 17Hxx
|
|
|
|
|
EH_18 = 18, // 18Hxx
|
|
|
|
|
EH_19 = 19, // 19Hxx
|
|
|
|
|
EH_20 = 20, // 20Hxx
|
|
|
|
|
EH_21 = 21, // 21Hxx
|
|
|
|
|
EH_22 = 22, // 22Hxx
|
|
|
|
|
EH_23 = 23, // 23Hxx
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum CLOSE_HOUR_OF_DAY
|
|
|
|
|
{
|
|
|
|
|
CLOSE_HOUR_DISABLED = -1, // Disabled
|
|
|
|
|
CH_0 = 0, // 00Hxx
|
|
|
|
|
CH_1 = 1, // 1Hxx
|
|
|
|
|
CH_2 = 2, // 2Hxx
|
|
|
|
|
CH_3 = 3, // 3Hxx
|
|
|
|
|
CH_4 = 4, // 4Hxx
|
|
|
|
|
CH_5 = 5, // 5Hxx
|
|
|
|
|
CH_6 = 6, // 6Hxx
|
|
|
|
|
CH_7 = 7, // 7Hxx
|
|
|
|
|
CH_8 = 8, // 8Hxx
|
|
|
|
|
CH_9 = 9, // 9Hxx
|
|
|
|
|
CH_10 = 10, // 10Hxx
|
|
|
|
|
CH_11 = 11, // 11Hxx
|
|
|
|
|
CH_12 = 12, // 12Hxx
|
|
|
|
|
CH_13 = 13, // 13Hxx
|
|
|
|
|
CH_14 = 14, // 14Hxx
|
|
|
|
|
CH_15 = 15, // 15Hxx
|
|
|
|
|
CH_16 = 16, // 16Hxx
|
|
|
|
|
CH_17 = 17, // 17Hxx
|
|
|
|
|
CH_18 = 18, // 18Hxx
|
|
|
|
|
CH_19 = 19, // 19Hxx
|
|
|
|
|
CH_20 = 20, // 20Hxx
|
|
|
|
|
CH_21 = 21, // 21Hxx
|
|
|
|
|
CH_22 = 22, // 22Hxx
|
|
|
|
|
CH_23 = 23, // 23Hxx
|
|
|
|
|
};
|
|
|
|
|
enum CLOSE_MINUTE_OF_HOUR
|
|
|
|
|
{
|
|
|
|
|
CLOSE_MINUTE_DISABLED = -1,// Disabled
|
|
|
|
|
CM_0 = 0, // xxH00
|
|
|
|
|
CM_5 = 5, // xxH05
|
|
|
|
|
CM_10 = 10, // xxH10
|
|
|
|
|
CM_15 = 15, // xxH15
|
|
|
|
|
CM_20 = 20, // xxH20
|
|
|
|
|
CM_25 = 25, // xxH25
|
|
|
|
|
CM_30 = 30, // xxH30
|
|
|
|
|
CM_35 = 35, // xxH35
|
|
|
|
|
CM_40 = 40, // xxH40
|
|
|
|
|
CM_45 = 45, // xxH45
|
|
|
|
|
CM_50 = 50, // xxH50
|
|
|
|
|
CM_55 = 55, // xxH55
|
|
|
|
|
CM_60 = 60, // xxH60
|
|
|
|
|
};
|
|
|
|
|
enum CLOSE_DAY_OF_WEEK
|
|
|
|
|
{
|
|
|
|
|
CLOSE_DAY_DISABLED = -1, // Disabled
|
|
|
|
|
CLOSE_MONDAY = 1, // Monday
|
|
|
|
|
CLOSE_TUESDAY = 2, // Tuesday
|
|
|
|
|
CLOSE_WEDNESDAY = 3, // Wednesday
|
|
|
|
|
CLOSE_THURSDAY = 4, // Thursday
|
|
|
|
|
CLOSE_FRIDAY = 5, // Friday
|
|
|
|
|
CLOSE_EVERYDAY, // Every Day
|
|
|
|
|
};
|
|
|
|
|
enum NF_LOOKBACK_PRESETS
|
|
|
|
|
{
|
|
|
|
|
NF_DISABLED = -1, // Disabled
|
|
|
|
|
M5 = 5, // 5 Minutes
|
|
|
|
|
M15 = 15, // 15 Minutes
|
|
|
|
|
M30 = 30, // 30 Minutes
|
|
|
|
|
M45 = 45, // 45 Minutes
|
|
|
|
|
M60 = 60, // 1 Hour
|
|
|
|
|
M120 = 120, // 2 Hours
|
|
|
|
|
M240 = 240, // 4 Hours
|
|
|
|
|
};
|
|
|
|
|
enum NF_IMPACT_PRESETS
|
|
|
|
|
{
|
|
|
|
|
HOLIDAYS = 0, //Holidays
|
|
|
|
|
LOW = 1, // Low Impact News
|
|
|
|
|
MEDIUM = 2, // Medium Impact News
|
|
|
|
|
HIGH = 3, // High Impact News
|
|
|
|
|
};
|
|
|
|
|
enum TRADING_DIRECTION
|
|
|
|
|
{
|
|
|
|
|
BOTH, // Allow both long and short trades
|
|
|
|
|
LONG_ONLY, // Allow only long (buy) trades
|
|
|
|
|
SHORT_ONLY // Allow only short (sell) trades
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum PERCENTAGE_PRESETS
|
|
|
|
|
{
|
|
|
|
|
PCT_10 = 10, // 10%
|
|
|
|
|
PCT_20 = 20, // 20%
|
|
|
|
|
PCT_30 = 30, // 30%
|
|
|
|
|
PCT_40 = 40, // 40%
|
|
|
|
|
PCT_50 = 50, // 50%
|
|
|
|
|
PCT_60 = 60, // 60%
|
|
|
|
|
PCT_70 = 70, // 70%
|
|
|
|
|
PCT_80 = 80, // 80%
|
|
|
|
|
PCT_90 = 90, // 90%
|
|
|
|
|
PCT_100 = 100, // 100%
|
|
|
|
|
};
|
2026-07-26 18:33:12 -04:00
|
|
|
//--- Min_Vote_Close's own scale. Separate from PERCENTAGE_PRESETS above purely so the Disabled entry is
|
|
|
|
|
//--- offered ONLY where it means something - it would be nonsense on Min_Vote_Open, MinRecall or
|
|
|
|
|
//--- OversampleParity, which share that enum.
|
|
|
|
|
//--- DISABLED is 101 rather than a flag or a negative sentinel because 101 is unreachable on BOTH scales
|
|
|
|
|
//--- this one input drives, with no special-case branch anywhere:
|
|
|
|
|
//--- - the rule-based path compares it against an AVERAGE of pattern weights, which cannot exceed 100
|
|
|
|
|
//--- (CExpertSignalCustom::CheckClosePosition -> m_threshold_close);
|
|
|
|
|
//--- - the AI early-exit path compares Min_Vote_Close/100.0 = 1.01 against a softmax confidence
|
|
|
|
|
//--- magnitude, which cannot exceed 1.0 (same function, m_ai_exit_threshold).
|
|
|
|
|
//--- So selecting Disabled switches off vote-driven closing entirely - positions then leave only via
|
|
|
|
|
//--- stop-loss, take-profit, trailing, or the scheduled close-all - and it does so by arithmetic rather
|
|
|
|
|
//--- than by an extra boolean anyone has to keep in sync.
|
|
|
|
|
enum VOTE_CLOSE_PRESETS
|
|
|
|
|
{
|
|
|
|
|
VOTE_CLOSE_10 = 10, // 10%
|
|
|
|
|
VOTE_CLOSE_20 = 20, // 20%
|
|
|
|
|
VOTE_CLOSE_30 = 30, // 30%
|
|
|
|
|
VOTE_CLOSE_40 = 40, // 40%
|
|
|
|
|
VOTE_CLOSE_50 = 50, // 50%
|
|
|
|
|
VOTE_CLOSE_60 = 60, // 60%
|
|
|
|
|
VOTE_CLOSE_70 = 70, // 70%
|
|
|
|
|
VOTE_CLOSE_80 = 80, // 80%
|
|
|
|
|
VOTE_CLOSE_90 = 90, // 90%
|
|
|
|
|
VOTE_CLOSE_100 = 100, // 100%
|
|
|
|
|
VOTE_CLOSE_DISABLED = 101, // Disabled (exit only via SL/TP/trailing)
|
|
|
|
|
};
|
2026-07-23 19:36:34 -04:00
|
|
|
//--- Strength (tau) of the post-hoc logit adjustment / prior correction applied to the AI's 3-class
|
|
|
|
|
//--- decision at inference (see AdjustedSignalFromSoftmax in ExpertSignalAIBase.mqh). The network is
|
|
|
|
|
//--- trained on class-balance-oversampled data, so its raw softmax over-calls the rare Buy/Sell classes;
|
|
|
|
|
//--- re-weighting each class by its measured true base rate (prior^tau) pulls the decision back toward the
|
|
|
|
|
//--- real distribution. 0 = Off (raw argmax, may over-call), 100 = full Bayesian calibration to the true
|
|
|
|
|
//--- base rate. Stored as a percent; divided by 100 to get tau.
|
|
|
|
|
enum LOGIT_PRIOR_STRENGTH_PRESETS
|
|
|
|
|
{
|
|
|
|
|
LOGIT_PRIOR_OFF = 0, // Off (raw argmax - may over-call Buy/Sell)
|
|
|
|
|
LOGIT_PRIOR_25 = 25, // 25% (light correction)
|
|
|
|
|
LOGIT_PRIOR_50 = 50, // 50% (moderate)
|
|
|
|
|
LOGIT_PRIOR_75 = 75, // 75% (strong)
|
|
|
|
|
LOGIT_PRIOR_100 = 100, // 100% (full calibration to true base rate)
|
|
|
|
|
};
|
refactor(ai): derive the first dense layer's width instead of asking for it
InitialNeurons was an input whose only defensible value depends on two
things the user cannot see when picking from a dropdown: how wide the input
vector ended up after feature selection, and how much in-sample data the
study period actually yields. Left to a hand-picked constant it was badly
wrong - 500 units against a 420-wide input is 210,500 weights, 72% of a
292,583-weight model, against ~36,500 training bars of which only ~2,236
are directional. That is 6.6 weights per training bar, and it EXPANDS a set
of highly correlated inputs rather than compressing them.
The symptom was already in the logs and had been read as a depth problem:
the shallowest topology consistently beat the deepest (perceptron 52.7%
balanced, hybrid 41.3%). Over-parameterization predicts that ordering just
as well as covariate shift does, and only one of the two had been addressed.
ComputeFirstLayerWidth() budgets roughly one first-layer weight per
in-sample bar. Measured across the configurations in use:
M15 10y -> 256 units, 129,071 weights, 0.73 per bar
H1 10y -> 64 units, 28,727 weights, 0.65 per bar
H4 10y -> 16 units, 7,559 weights, 0.68 per bar
Two design points that matter:
- It estimates in-sample bars from the STUDY PERIOD and timeframe, not
from Bars(). What is downloaded grows over a terminal's lifetime, and a
topology that widened as history filled in would re-key its own weights
file and discard a trained model.
- The result is snapped down to a coarse power-of-two ladder, so the
estimate would have to be wrong by ~2x to change the answer.
Every field it reads is already part of the weights-filename fingerprint,
so the derived value needs no fingerprint entry of its own. The public
setter is removed - it could only have been called after construction, and
would either be ignored or silently re-key the model mid-run.
Where the data cannot support even the floor (D1 over 10 years is under
2,000 bars) it now says so and names the fixes, rather than quietly
training a model with more weights than examples.
The DB config fingerprint drops the term too, which re-keys existing
pattern databases once - correct, since a model an order of magnitude
smaller should not inherit the old one's win-rate history.
Compiles 0 errors, 0 warnings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 13:01:16 -04:00
|
|
|
//--- FIRST_LAYER_NEURONS removed 2026-07-29. The first dense layer dominates the parameter count -
|
|
|
|
|
//--- it is (inputWidth+1) x width - so its only defensible value is a function of the input width and
|
|
|
|
|
//--- the amount of in-sample data, neither of which the user can see when picking from a dropdown. It
|
|
|
|
|
//--- is now derived: see CExpertSignalAIBase::ComputeFirstLayerWidth().
|
2026-07-28 12:02:58 -04:00
|
|
|
//--- Architecture-aware dense-topology presets are now folded directly into AI_CHOICE so the UI shows
|
|
|
|
|
//--- one coherent selector instead of separate AI and topology choices. The dense taper that follows each
|
|
|
|
|
//--- architecture-specific front-end is chosen by the selected preset itself.
|
2026-07-22 22:51:04 -04:00
|
|
|
//--- LSTM's own recurrent hidden-unit count - previously silently piggybacked on HiddenLayersCount
|
|
|
|
|
//--- (an unrelated dense-taper-depth setting), which meant it could never be tuned independently and
|
|
|
|
|
//--- defaulted to a value (4) nobody actually chose on purpose. Decoupled into its own input.
|
|
|
|
|
enum LSTM_HIDDEN_SIZE_PRESET
|
|
|
|
|
{
|
|
|
|
|
LSTM_HIDDEN_8 = 8, // 8 Units
|
|
|
|
|
LSTM_HIDDEN_16 = 16, // 16 Units
|
|
|
|
|
LSTM_HIDDEN_32 = 32, // 32 Units
|
|
|
|
|
LSTM_HIDDEN_64 = 64, // 64 Units
|
|
|
|
|
LSTM_HIDDEN_128 = 128, // 128 Units
|
|
|
|
|
};
|
|
|
|
|
//--- CONV's own output-filter count for its convolutional layer - previously silently piggybacked on
|
|
|
|
|
//--- HiddenLayersCount too (same bug class as LstmHiddenSize above), defaulting to a bottleneck of 4
|
|
|
|
|
//--- filters/bar. Decoupled into its own input.
|
|
|
|
|
enum CONV_FILTER_COUNT_PRESET
|
|
|
|
|
{
|
|
|
|
|
CONV_FILTERS_8 = 8, // 8 Filters
|
|
|
|
|
CONV_FILTERS_16 = 16, // 16 Filters
|
|
|
|
|
CONV_FILTERS_32 = 32, // 32 Filters
|
|
|
|
|
CONV_FILTERS_64 = 64, // 64 Filters
|
|
|
|
|
CONV_FILTERS_128 = 128, // 128 Filters
|
|
|
|
|
};
|
2026-07-27 22:08:55 -04:00
|
|
|
//--- Shared pooling shape for the Conv front-end used by both CONV and HYBRID. Keeping this
|
|
|
|
|
//--- separate from ConvFilterCount lets the filter-bank width and the downsampling span be tuned
|
|
|
|
|
//--- independently, instead of smuggling one into the other.
|
fix(ai): drop the conv pooling stage - it reduced across filters, not time
FeedForwardConv emits POSITION-MAJOR output, matrix_o[out + window_out * i],
so one bar's window_out filter responses are contiguous and consecutive bars
sit window_out apart. Both pooling implementations (FeedForwardProof and
CPU_FeedForwardProof) slide FLAT over that buffer - pos = i * step, reducing
`window` CONSECUTIVE elements. On a position-major layout those neighbours
are different FILTERS of the same bar, never one filter across time.
At the shipped 3/2 the pool computed max(bar0_f0, bar0_f1, bar0_f2), then
max(bar0_f2, bar0_f3, bar0_f4), with every 8th window straddling a bar
boundary. So it collapsed unrelated feature detectors into whichever fired
hardest, passed gradient to that winner only, and halved the feature map
while doing it - all below every learnable layer, where nothing above can
recover it. The removed inputs' own labels ("3 Bars") show time-axis pooling
was the intent throughout.
Measured cost: CONV sat pinned at ~40% balanced accuracy for 510 eras with
Sell recall 0%, while plain MLPs on the same data reached 57-61%. HYBRID,
which also carried this stage, came second-worst of the batch-norm group.
Not fixable in the topology: pooling one filter across time needs a stride
of window_out BETWEEN samples within a window, which a consecutive-window
kernel cannot express at any window/step. That needs a stride-aware kernel
in Network.cl + WarriorCPU.cpp + WarriorDML.cpp and a DLL rebuild, and is
only worth doing if a conv front-end earns its place without downsampling
first - with 20 sliding positions there is little to gain by halving them.
ConvPoolWindow/ConvPoolStep and their enums are removed with it, along with
the |CP: fingerprint term added earlier today.
Both builds compile 0 errors, 0 warnings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 19:28:44 -04:00
|
|
|
//--- CONV_POOL_WINDOW_PRESET / CONV_POOL_STEP_PRESET removed 2026-07-29 along with the pooling
|
|
|
|
|
//--- stage itself - their "N Bars" labels described time-axis pooling the implementation could
|
|
|
|
|
//--- never perform. See AddConvStage() in Expert\ExpertSignalAIBase.mqh.
|
2026-07-13 03:23:39 -04:00
|
|
|
|
|
|
|
|
enum MIN_NEURONS_COUNT
|
|
|
|
|
{
|
|
|
|
|
MIN_NEURONS_10 = 10, // Min. 10 Neurons per layer
|
|
|
|
|
MIN_NEURONS_20 = 20, // Min. 20 Neurons per layer
|
|
|
|
|
MIN_NEURONS_30 = 30, // Min. 30 Neurons per layer
|
|
|
|
|
MIN_NEURONS_40 = 40, // Min. 40 Neurons per layer
|
|
|
|
|
MIN_NEURONS_50 = 50, // Min. 50 Neurons per layer
|
|
|
|
|
};
|
2026-07-16 00:56:33 -04:00
|
|
|
// Value IS the reduction percentage applied per hidden layer (retention = 100-value), consumed
|
|
|
|
|
// via BuildFreshTopology()'s n = n*((100-value)*0.01) taper - e.g. RF_70 keeps 30% of the previous
|
|
|
|
|
// layer's neurons, i.e. a genuine 70% reduction per layer, matching the label at face value.
|
2026-07-13 03:23:39 -04:00
|
|
|
enum NEURONS_REDUCTION_FACTOR
|
|
|
|
|
{
|
2026-07-16 00:56:33 -04:00
|
|
|
RF_10 = 10, // 10 % Neurons Reduction Per Layer
|
|
|
|
|
RF_20 = 20, // 20 % Neurons Reduction Per Layer
|
|
|
|
|
RF_30 = 30, // 30 % Neurons Reduction Per Layer
|
|
|
|
|
RF_40 = 40, // 40 % Neurons Reduction Per Layer
|
2026-07-13 03:23:39 -04:00
|
|
|
RF_50 = 50, // 50 % Neurons Reduction Per Layer
|
2026-07-16 00:56:33 -04:00
|
|
|
RF_60 = 60, // 60 % Neurons Reduction Per Layer
|
|
|
|
|
RF_70 = 70, // 70 % Neurons Reduction Per Layer
|
|
|
|
|
RF_80 = 80, // 80 % Neurons Reduction Per Layer
|
|
|
|
|
RF_90 = 90, // 90 % Neurons Reduction Per Layer
|
2026-07-13 03:23:39 -04:00
|
|
|
};
|
|
|
|
|
enum OUTPUT_NEURONS_COUNT
|
|
|
|
|
{
|
|
|
|
|
OUTPUT_REGRESSION = 1, // Regression Algorithm
|
|
|
|
|
OUTPUT_CLASSIFICATION = 3, // Classification Algorithm
|
|
|
|
|
};
|
|
|
|
|
enum AI_CHOICE
|
|
|
|
|
{
|
2026-07-28 12:02:58 -04:00
|
|
|
AI_NONE = 0, // Disabled (classic signals only)
|
|
|
|
|
MLP_3L = 1, // MLP: 3 dense hidden layers
|
|
|
|
|
MLP_4L = 2, // MLP: 4 dense hidden layers
|
|
|
|
|
CONV_2L = 3, // CONV: 2 dense hidden layers
|
|
|
|
|
LSTM_2L = 4, // LSTM: 2 dense hidden layers
|
|
|
|
|
HYBRID_2L = 5, // HYBRID: 2 dense hidden layers
|
2026-07-13 03:23:39 -04:00
|
|
|
};
|
|
|
|
|
// Confidence used to scale SL/TP, gate early AI exits, and (Intelligent MM) scale lot size.
|
|
|
|
|
// AI confidence comes from the signal filter's live prediction (0..1); DB confidence comes
|
|
|
|
|
// from the historical time-based win rate of the currently traded patterns (0..1). Blended
|
|
|
|
|
// averages both, so a pattern is only sized up when both the model and its track record agree.
|
|
|
|
|
enum CONFIDENCE_SOURCE
|
|
|
|
|
{
|
|
|
|
|
CONF_AI = 0, // AI signal confidence only
|
|
|
|
|
CONF_DB = 1, // Database win-rate confidence only
|
|
|
|
|
CONF_BLENDED = 2, // Average of AI and database confidence
|
|
|
|
|
};
|
2026-07-16 00:56:33 -04:00
|
|
|
// How many bars to wait, after a candidate ZigZag reversal bar, before trusting the real ADZigZag
|
|
|
|
|
// indicator's verdict on it as a training label - see CExpertSignalAIBase's m_swingConfirmationBars
|
|
|
|
|
// declaration comment. A ZigZag's most recent 1-3 legs can still repaint as new bars arrive, so this
|
|
|
|
|
// must be generous enough to let a leg fully settle (bumped from the old fractal-based system's
|
|
|
|
|
// default of 20 to 100 for exactly that reason). A value of 0 is clamped up to a 1-bar minimum
|
|
|
|
|
// internally, never used to mean "no delay".
|
|
|
|
|
enum SWING_CONFIRMATION_PRESET
|
|
|
|
|
{
|
|
|
|
|
SC_10 = 10, // 10 Bars
|
|
|
|
|
SC_20 = 20, // 20 Bars
|
|
|
|
|
SC_30 = 30, // 30 Bars
|
|
|
|
|
SC_50 = 50, // 50 Bars
|
|
|
|
|
SC_100 = 100, // 100 Bars
|
|
|
|
|
SC_200 = 200, // 200 Bars
|
|
|
|
|
};
|
|
|
|
|
enum MAX_ERAS_PRESET
|
|
|
|
|
{
|
|
|
|
|
ME_100 = 100, // 100 Eras
|
|
|
|
|
ME_200 = 200, // 200 Eras
|
|
|
|
|
ME_300 = 300, // 300 Eras
|
|
|
|
|
ME_500 = 500, // 500 Eras
|
|
|
|
|
ME_1000 = 1000, // 1000 Eras
|
|
|
|
|
};
|
|
|
|
|
enum TUNE_TRIALS_PRESET
|
|
|
|
|
{
|
|
|
|
|
TT_4 = 4, // 4 Trials
|
|
|
|
|
TT_8 = 8, // 8 Trials
|
|
|
|
|
TT_16 = 16, // 16 Trials
|
|
|
|
|
TT_32 = 32, // 32 Trials
|
|
|
|
|
TT_50 = 50, // 50 Trials
|
|
|
|
|
};
|
2026-07-13 03:23:39 -04:00
|
|
|
//--- percentage of the study period held back as out-of-sample data never trained on;
|
|
|
|
|
//--- value is the OOS share, in-sample share is the remainder (e.g. OOS_30 -> 70% IS / 30% OOS)
|
|
|
|
|
enum OOS_SPLIT_PRESET
|
|
|
|
|
{
|
|
|
|
|
OOS_10 = 10, // 90% IS / 10% OOS
|
|
|
|
|
OOS_20 = 20, // 80% IS / 20% OOS
|
|
|
|
|
OOS_30 = 30, // 70% IS / 30% OOS
|
|
|
|
|
OOS_40 = 40, // 60% IS / 40% OOS
|
|
|
|
|
OOS_50 = 50, // 50% IS / 50% OOS
|
|
|
|
|
};
|
2026-07-18 10:03:21 -04:00
|
|
|
//--- Focal loss modulating exponent (Lin et al. 2017) applied on top of the class-balance weight
|
|
|
|
|
//--- above (3-neuron classification only) - see its computation in Train() and
|
|
|
|
|
//--- m_focalGamma's declaration comment. Value is tenths (FG_20 -> gamma=2.0, the paper's default).
|
|
|
|
|
//--- FG_00 disables it (factor stays 1.0, i.e. today's plain class-balanced weighting only).
|
|
|
|
|
enum FOCAL_GAMMA_PRESET
|
|
|
|
|
{
|
feat: add unified MA type support to indicator tuner
Add `MA_TYPE_PRESETS` enum covering advanced (ALMA, DEMA, ZLEMA, T3, Kalman) and standard (SMA, EMA, SMMA, LWMA) moving averages. Integrate `maType` and `bestMaType` into `CADIndicatorTuner` struct, update flatten/unflatten routines, and bump `AD_TUNE_PARAM_COUNT` to 33. This allows the auto-tuner to search over MA type alongside period, improving feature discovery.
2026-07-23 15:02:09 -04:00
|
|
|
FG_00 = 0, // 0.0
|
2026-07-18 10:03:21 -04:00
|
|
|
FG_10 = 10, // 1.0
|
|
|
|
|
FG_15 = 15, // 1.5
|
feat: add unified MA type support to indicator tuner
Add `MA_TYPE_PRESETS` enum covering advanced (ALMA, DEMA, ZLEMA, T3, Kalman) and standard (SMA, EMA, SMMA, LWMA) moving averages. Integrate `maType` and `bestMaType` into `CADIndicatorTuner` struct, update flatten/unflatten routines, and bump `AD_TUNE_PARAM_COUNT` to 33. This allows the auto-tuner to search over MA type alongside period, improving feature discovery.
2026-07-23 15:02:09 -04:00
|
|
|
FG_20 = 20, // 2.0
|
2026-07-18 10:03:21 -04:00
|
|
|
FG_30 = 30, // 3.0
|
feat: add unified MA type support to indicator tuner
Add `MA_TYPE_PRESETS` enum covering advanced (ALMA, DEMA, ZLEMA, T3, Kalman) and standard (SMA, EMA, SMMA, LWMA) moving averages. Integrate `maType` and `bestMaType` into `CADIndicatorTuner` struct, update flatten/unflatten routines, and bump `AD_TUNE_PARAM_COUNT` to 33. This allows the auto-tuner to search over MA type alongside period, improving feature discovery.
2026-07-23 15:02:09 -04:00
|
|
|
FG_50 = 50, // 5.0
|
2026-07-18 10:03:21 -04:00
|
|
|
};
|
2026-07-18 14:56:41 -04:00
|
|
|
//--- SGD's own learning rate/momentum are now direct inputs (SgdLearningRate/SgdMomentum,
|
|
|
|
|
//--- AI\Network.mqh, book defaults) instead of a multiplier on Adam's rate - see those inputs'
|
|
|
|
|
//--- declaration comments.
|
2026-07-13 03:23:39 -04:00
|
|
|
//+------------------------------------------------------------------+
|
2026-07-17 23:21:12 -04:00
|
|
|
//| Market Depth (DOM) confirmation filter presets - see |
|
|
|
|
|
//| Signals\SignalMarketDepth.mqh's class-level comment. |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
enum DOM_DEPTH_LEVELS_PRESET
|
|
|
|
|
{
|
|
|
|
|
DOM_LEVELS_1 = 1, // Top of book only
|
|
|
|
|
DOM_LEVELS_3 = 3,
|
|
|
|
|
DOM_LEVELS_5 = 5,
|
|
|
|
|
DOM_LEVELS_10 = 10,
|
|
|
|
|
};
|
|
|
|
|
enum DOM_IMBALANCE_SCALE_PRESET
|
|
|
|
|
{
|
|
|
|
|
DOM_SCALE_25 = 25, // 25% of full range - light influence
|
|
|
|
|
DOM_SCALE_50 = 50,
|
|
|
|
|
DOM_SCALE_75 = 75,
|
2026-07-18 23:59:40 -04:00
|
|
|
DOM_SCALE_100 = 100, // 100% - a one-sided book can swing composite like AI signal
|
2026-07-17 23:21:12 -04:00
|
|
|
};
|
|
|
|
|
enum DOM_MAX_SPREAD_MULTIPLE_PRESET
|
|
|
|
|
{
|
|
|
|
|
DOM_SPREADMULT_2x = 2,
|
|
|
|
|
DOM_SPREADMULT_3x = 3,
|
|
|
|
|
DOM_SPREADMULT_5x = 5,
|
|
|
|
|
DOM_SPREADMULT_OFF = 0, // Disabled - never veto on spread, only vote on imbalance
|
|
|
|
|
};
|
|
|
|
|
//+------------------------------------------------------------------+
|
2026-07-18 17:29:38 -04:00
|
|
|
//| Account-level risk circuit-breaker thresholds - see |
|
|
|
|
|
//| Signals\SignalRiskGuard.mqh's class-level comment. PERCENTAGE_PRESETS
|
|
|
|
|
//| above steps by 10 starting at 10, too coarse for prop-firm-style
|
|
|
|
|
//| daily-loss/max-drawdown limits, which are commonly single digits.
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
enum RISK_LIMIT_PCT_PRESET
|
|
|
|
|
{
|
|
|
|
|
RISK_LIMIT_DISABLED = 0, // Disabled
|
|
|
|
|
RISK_LIMIT_2 = 2, // 2%
|
|
|
|
|
RISK_LIMIT_3 = 3, // 3%
|
|
|
|
|
RISK_LIMIT_4 = 4, // 4%
|
|
|
|
|
RISK_LIMIT_5 = 5, // 5%
|
|
|
|
|
RISK_LIMIT_8 = 8, // 8%
|
|
|
|
|
RISK_LIMIT_10 = 10, // 10%
|
|
|
|
|
RISK_LIMIT_15 = 15, // 15%
|
|
|
|
|
RISK_LIMIT_20 = 20, // 20%
|
|
|
|
|
};
|
|
|
|
|
//+------------------------------------------------------------------+
|