Warrior_EA/Enumerations/InputEnums.mqh
AnimateDread 3fbe16127e docs: simplify comments and enum descriptions across AI and Enums
Remove overly verbose explanations in Network.mqh comments and InputEnums.mqh enum values. Shorten descriptions to improve readability without losing essential information.
2026-07-18 23:59:40 -04:00

434 lines
13 KiB
MQL5

//+------------------------------------------------------------------+
//| CustomEnums.mqh |
//| AnimateDread |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "AnimateDread"
#property link "https://www.mql5.com"
//--- custom enumerations for certain settings, minimizes overfitting
enum IND_PERIODS_PRESETS
{
PERIOD_5 = 5, // 5 Periods
PERIOD_10 = 10, // 10 Periods
PERIOD_14 = 14, // 14 Periods
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
};
enum ATR_MULTIPLIER
{
DISABLED = 0, // Disabled
ATR_x1 = 1, // ATR * 1
ATR_x2 = 2, // ATR * 2
ATR_x3 = 3, // ATR * 3
};
enum THRESHOLDS_PRESET
{
T5 = 5, // 5
T10 = 10, // 10
T15 = 15, // 15
T20 = 20, // 20
T25 = 25, // 25
T30 = 30, // 30
T35 = 35, // 35
T40 = 40, // 40
T45 = 45, // 45
T50 = 50, // 50
T55 = 55, // 55
T60 = 60, // 60
T65 = 65, // 65
T70 = 70, // 70
T75 = 75, // 75
T80 = 80, // 80
T85 = 85, // 85
T90 = 90, // 90
T95 = 95, // 95
T100 = 100 // 100
};
enum RISK_REWARD_RATIO
{
RR_1x1 = 1, // 1:1 RR
RR_1x2 = 2, // 1:2 RR
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
{
RISK_PCT_1 = 1, // 1
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
};
enum ENTRY_MULTIPLIER
{
MARKET = 0, // Market order
LIMIT_1xATR = -1, // Limit order with 1x ATR
LIMIT_2xATR = -2, // Limit order with 2x ATR
LIMIT_3xATR = -3, // Limit order with 3x ATR
STOP_1xATR = 1, // Stop order with 1x ATR
STOP_2xATR = 2, // Stop order with 2x ATR
STOP_3xATR = 3, // Stop order with 3x ATR
};
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
};
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%
};
enum FIRST_LAYER_NEURONS
{
NEURONS_500 = 500, // 500 Neurons
NEURONS_1000 = 1000, // 1000 Neurons
NEURONS_2000 = 2000, // 2000 Neurons
NEURONS_3000 = 3000, // 3000 Neurons
NEURONS_5000 = 5000, // 5000 Neurons
};
enum HIDDEN_LAYERS_COUNT
{
LAYERS_0 = 0, // No Hidden Layers
LAYERS_1 = 1, // 1 Hidden Layer
LAYERS_2 = 2, // 2 Hidden Layers
LAYERS_3 = 3, // 3 Hidden Layers
LAYERS_4 = 4, // 4 Hidden Layers
LAYERS_5 = 5, // 5 Hidden Layers
LAYERS_6 = 6, // 6 Hidden Layers
LAYERS_7 = 7, // 7 Hidden Layers
LAYERS_8 = 8, // 8 Hidden Layers
LAYERS_10 = 10, // 10 Hidden Layers
};
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
};
// 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.
enum NEURONS_REDUCTION_FACTOR
{
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
RF_50 = 50, // 50 % Neurons Reduction Per Layer
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
};
enum OUTPUT_NEURONS_COUNT
{
OUTPUT_REGRESSION = 1, // Regression Algorithm
OUTPUT_CLASSIFICATION = 3, // Classification Algorithm
};
enum AI_CHOICE
{
MLP = 0, // Perceptron Neural Network
CONV = 1, // Convolutional Neural Network
LSTM = 2, // LSTM Neural Network
HYBRID = 3, // Hybrid Neural Network
};
enum SL_TP_SOURCE
{
SLTP_RULE_BASED = 0, // Rule-based (ATR distance + swing structure)
SLTP_AI_CONFIDENCE = 1, // Confidence-scaled (tighter SL, wider TP as confidence rises)
};
// 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
};
// 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 RETRY_COOLDOWN_PRESET
{
RC_30 = 30, // 30 Seconds
RC_60 = 60, // 60 Seconds
RC_120 = 120, // 2 Minutes
RC_300 = 300, // 5 Minutes
RC_600 = 600, // 10 Minutes
};
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
};
//--- 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
};
//--- Formerly a ceiling on the class-balance loss-weight multiplier applied to rare-class (Buy/Sell)
//--- training examples - currently has no effect, see CExpertSignalAIBase's m_maxClassSampleWeight
//--- declaration comment (class-balance correction is now data-level oversampling only). Value is
//--- tenths (CSW_15 -> 1.5x); kept for a possible future supplemental loss weight on top of oversampling.
enum CLASS_SAMPLE_WEIGHT_PRESET
{
CSW_10 = 10, // 1.0x - no class-balance oversampling
CSW_15 = 15, // 1.5x
CSW_20 = 20, // 2.0x
CSW_25 = 25, // 2.5x
CSW_30 = 30, // 3.0x - old hardcoded default, insufficient in practice
};
//--- 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
{
FG_00 = 0, // 0.0 - disabled (class-balance weighting only)
FG_10 = 10, // 1.0
FG_15 = 15, // 1.5
FG_20 = 20, // 2.0 - standard default (Lin et al. 2017)
FG_30 = 30, // 3.0
FG_50 = 50, // 5.0 - aggressive: near-zero weight above ~90% confidence
};
//--- 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.
//+------------------------------------------------------------------+
//| 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,
DOM_SCALE_100 = 100, // 100% - a one-sided book can swing composite like AI signal
};
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
};
//+------------------------------------------------------------------+
//| 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%
};
//+------------------------------------------------------------------+