Warrior_EA/Enumerations/GlobalEnums.mqh
AnimateDread b91c7b1f7a refactor(comments): box headers to stdlib length
The //| box blocks were excluded from 0b06f8e and 5efdb48 and were what
remained: 160 of them ran to 10+ lines, the longest to 88. Compressed to their
leading topic sentences - 5 lines for a function header, 8 for a file header -
keeping the box format and the standard MQL5 name/author lines verbatim.

Verified at the BYTE level this time, across every in-scope file: the list of
non-comment lines is byte-identical to HEAD and braces balance. The first check
compared a locale-decoded 'git show' against a UTF-8 read and flagged 25 files
that had not changed at all - every BOM and every non-ASCII line mismatched.

47,696 -> 40,665 lines in scope; comment share 38% -> 26%.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 00:30:14 -04:00

66 lines
2.6 KiB
MQL4

#ifndef WARRIOR_GLOBAL_ENUMS_MQH
#define WARRIOR_GLOBAL_ENUMS_MQH
enum ENUM_SIGNAL
{
Buy,
Sell,
Neutral,
Undefine
};
//+------------------------------------------------------------------+
//| CONTROL-PANEL VOCABULARY. |
//| |
//| Lives here rather than in Panel\ControlPanel.mqh because the |
//| Expert base classes have to name these types, and the panel is |
//| included long after them in Warrior_EA.mq5's include order. |
//+------------------------------------------------------------------+
//--- The BUTTONS. One action per click; the EA consumes it right after ExtPanel.ChartEvent().
enum ENUM_CP_ACTION
{
CP_ACTION_NONE,
CP_ACTION_TOGGLE_SIGNALS,
CP_ACTION_TOGGLE_PAUSE,
CP_ACTION_TOGGLE_STOP,
//--- one button, both directions: deploy the trained model as final, or put an already-deployed
//--- model back into training (the EA decides which from the signals' own state - see
//--- HandleControlPanelAction/RefreshControlPanelLabels in Warrior_EA.mq5)
CP_ACTION_TOGGLE_DEPLOY,
CP_ACTION_SAVE,
CP_ACTION_LOAD,
CP_ACTION_RESET,
CP_ACTION_REPORT,
CP_ACTION_RESET_DB
};
//--- What a SIGNAL is told to do, which is deliberately not the same list as the buttons above. Three
//--- of those buttons are TOGGLES whose direction depends on the current aggregate state; resolving
//--- that once in the EA and then telling every signal plainly what to do is what stops each signal
//--- re-deriving the direction from its own local state and reaching a different answer.
enum ENUM_SIGNAL_COMMAND
{
SIGCMD_PAUSE_TRAINING,
SIGCMD_RESUME_TRAINING,
SIGCMD_STOP_TRAINING,
SIGCMD_START_TRAINING,
SIGCMD_DEPLOY,
SIGCMD_RETRAIN_DEPLOYED,
SIGCMD_SAVE_WEIGHTS,
SIGCMD_LOAD_WEIGHTS,
SIGCMD_RESET_WEIGHTS,
SIGCMD_RESCAN_SIGNALS,
//--- Diagnostic: print one identity line each. The census before a destructive action has to
//--- describe the SAME population the action will reach, so it walks the same tree.
SIGCMD_REPORT_IDENTITY
};
//--- What the panel needs to ASK of the signal tree to label its buttons. Counted, never assumed:
//--- "all paused" is only meaningful against how many signals could be paused at all.
enum ENUM_SIGNAL_TRAIT
{
SIGTRAIT_TRAINABLE, // this signal owns a model that trains - the denominator
SIGTRAIT_TRAINING_PAUSED,
SIGTRAIT_TRAINING_STOPPED,
SIGTRAIT_TRAINING_COMPLETE,
SIGTRAIT_DEPLOY_SKIPS_RECALL, // deploying now would ship a model that ignores Buy or Sell
SIGTRAIT_RESCAN_PENDING
};
#endif