2026-08-22 00:30:14 -04:00 | | | #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
|