Warrior_EA/Mind/Modality.mqh
AnimateDread e9c562b39f Add Feature Scaling and Regime Math Classes; Implement Mind Trading Logic
- Introduced `FeatureScale.mqh` with `FeatSquash` function for stateless feature scaling.
- Added `RegimeMath.mqh` class for regime arithmetic, including efficiency and variance calculations.
- Documented the Mind trading logic in `MIND.md`, detailing the trading process and modes.
- Created `VOLNORM_PLAN.md` and `VOLNORM_RESULTS.md` for tick-volume normalization testing.
- Implemented `read_book.py` for analyzing trade book data and correlations.
- Developed `volnorm.py` for testing tick-volume normalization with new and old methods.
2026-09-30 18:36:33 -04:00

44 lines
2.1 KiB
MQL5

//+------------------------------------------------------------------+
//| Modality.mqh |
//| AnimateDread |
//| |
//| ONE WAY OF LOOKING AT THE CHART. |
//| |
//| A discretionary Wyckoff trader does not read one number. They read |
//| the structure, the volume behind it, how volatile the tape is, |
//| what the neighbouring markets are doing and what day it is - and |
//| only then decide how much to trust the setup. Each of those is a |
//| MODALITY: a class that turns the same closed bar into its own |
//| slice of an SMarketContext and knows nothing about the others. |
//| |
//| Open/closed: a new way of looking is a new subclass registered in |
//| CWarriorMind::Init(); the mind, the book and the reviewer do not |
//| change, because they only ever see the context's field indices. |
//| |
//| Every Read() sees CLOSED bars only (bar.shift >= 1 at decision |
//| time), so a row it writes could have been written live. |
//| A modality that cannot answer returns false and leaves its fields |
//| at CTX_NA; the mind carries on without it. A modality must never |
//| be the reason a trade does not happen. |
//+------------------------------------------------------------------+
#ifndef WARRIOR_MODALITY_MQH
#define WARRIOR_MODALITY_MQH
#include "MarketContext.mqh"
//--- Which bar is being read: its slot in the bar cache, its stdlib series shift, its open time.
struct SBarRef
{
int idx;
int shift;
datetime time;
};
class CModality
{
public:
virtual ~CModality(void) {}
virtual string Name(void) const = 0;
virtual bool Read(const SBarRef &bar, SMarketContext &ctx) = 0;
};
#endif // WARRIOR_MODALITY_MQH