2026-02-15 05:13:55 +00:00 | | | #ifndef NN_FEATURES_MQH
|
| | | #define NN_FEATURES_MQH
|
| | |
|
| | | double NN_Clamp(const double x, const double lo, const double hi)
|
| | | {
|
| | | return MathMax(lo, MathMin(hi, x));
|
| | | }
|
| | |
|
| | | int BuildNNFeatures(double &feat[])
|
| | | {
|
| | | ArrayResize(feat, 0);
|
| | |
|
| | | double close0 = iClose(_Symbol, PERIOD_CURRENT, 0);
|
| | | if(close0 <= 0.0)
|
| | | return 0;
|
| | |
|
| | | // MA spread and slopes.
|
| | | ArrayResize(feat, 12);
|
| | | feat[0] = (MA_Current[0] - MA_Current[1]) / _Point;
|
| | | feat[1] = (MA_Current[1] - MA_Current[2]) / _Point;
|
| | | feat[2] = (MA_Current[2] - MA_Current[3]) / _Point;
|
| | | feat[3] = (MA_Current[3] - MA_Current[4]) / _Point;
|
EA: sync live build (Jul-Nov 2026) — trade report direction/setup fix, VZ indicators, risk modules
- AIGateway/profitgtx: report_trade takes direction and setup from the position's
opening deal ("dir_src":"entry"); the closing deal inverted every direction and
restarts lost the setup (99% "auto")
- add MATheory, RiskGuards, RiskSizing, TradePolicy (setup blocklist, strict AI gate)
- add VZ_Core + VZ_Features/MFIB/Regime/Setups/Sessions indicators, VZ_FeaturesExport
service, VZ_DumpMA, VZ_TogglePause
- margin-aware sizing, news, labels and session updates since 2026-07-14
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 13:48:22 -06:00 | | | // Model was trained on (closed bar - live bar); buffer order was fixed 2026-09-17, so keep the
|
| | | // sign the model expects (VZ_Core ea_compat does the same for the exporter).
|
| | | feat[4] = (MA_Previous[0] - MA_Current[0]) / _Point;
|
| | | feat[5] = (MA_Previous[1] - MA_Current[1]) / _Point;
|
2026-02-15 05:13:55 +00:00 | | |
|
| | | // Oscillator/volatility/trend features.
|
| | | feat[6] = Stoch_K_Current;
|
| | | feat[7] = Stoch_D_Current;
|
| | | feat[8] = Current_ADX;
|
| | | feat[9] = (Current_ATR > 0.0) ? (Current_ATR / close0) * 10000.0 : 0.0;
|
| | |
|
| | | // Fib distances.
|
| | | feat[10] = (close0 - MFIB_Level_382) / _Point;
|
| | | feat[11] = (close0 - MFIB_Level_618) / _Point;
|
| | |
|
| | | return ArraySize(feat);
|
| | | }
|
| | |
|
| | | #endif
|