forked from animatedread/Warrior_EA
- 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.
18 lines
895 B
MQL5
18 lines
895 B
MQL5
//+------------------------------------------------------------------+
|
|
//| FeatureScale.mqh |
|
|
//| AnimateDread |
|
|
//| |
|
|
//| THE ONE SCALING FUNCTION FOR FEATURES WITH NO NATURAL RANGE. |
|
|
//| v / (1 + |v|) is monotone, bounded to (-1, 1) and STATELESS: it |
|
|
//| needs no training-set mean or variance, so there is nothing to |
|
|
//| store in a model file, nothing to keep in step with it, and no |
|
|
//| way for one fold's scale to leak into another. |
|
|
//+------------------------------------------------------------------+
|
|
#ifndef WARRIOR_FEATURESCALE_MQH
|
|
#define WARRIOR_FEATURESCALE_MQH
|
|
|
|
double FeatSquash(const double v)
|
|
{
|
|
return v / (1.0 + MathAbs(v));
|
|
}
|
|
#endif // WARRIOR_FEATURESCALE_MQH
|