2026-02-06 08:24:12 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| Defines.mqh |
|
| | | //| Copyright 2025, Niquel Mendoza. |
|
| | | //| https://www.mql5.com/es/users/nique_372 |
|
| | | //+------------------------------------------------------------------+
|
| | | #property copyright "Copyright 2025, Niquel Mendoza."
|
| | | #property link "https://www.mql5.com/es/users/nique_372"
|
| | | #property strict
|
| | |
|
2026-09-16 10:10:34 -05:00 | | | #ifndef SCALERBYLEO_SRC_SCALER_DEFINES_MQH
|
| | | #define SCALERBYLEO_SRC_SCALER_DEFINES_MQH
|
2026-02-06 08:24:12 -05:00 | | |
|
2026-09-14 08:09:32 -05:00 | | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
2026-10-09 13:48:41 -05:00 | | | #include <TSN\\Std\\Errors\\Try.mqh>
|
2026-09-14 08:09:32 -05:00 | | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | namespace TSN
|
| | | {
|
2026-09-15 11:21:44 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | // si m_i_count es menor a 0 se lo linega y se lo resta.. en caso haya underflow se vuele enorme... lueog se normaliz..
|
| | | // por lo contraio si es positivo entonces exacamtneem esos lementos se toman en caso haya mas lemntos de los diposibels se normaliza
|
| | |
|
| | | //---
|
| | | #define SCALERBYLEO_SIZE_CALC_S(vs) (m_i_count<0?(vs-ulong(-m_i_count)):(m_i_count))
|
| | | #define SCALERBYLEO_SIZE(vs) (fmin(SCALERBYLEO_SIZE_CALC_S(vs), vs))
|
| | |
|
2026-02-06 08:24:12 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | enum ENUM_SCALERBYLEO_TYPE
|
| | | {
|
2026-09-16 10:10:34 -05:00 | | | SCALERBYLEO_SCALER_TYPE_MINMAX,
|
| | | SCALERBYLEO_SCALER_TYPE_MINMAX_CL,
|
| | | SCALERBYLEO_SCALER_TYPE_STANDART,
|
| | | SCALERBYLEO_SCALER_TYPE_STANDART_CL,
|
| | | SCALERBYLEO_SCALER_TYPE_ROBUST,
|
| | | SCALERBYLEO_SCALER_TYPE_ROBUST_CL
|
2026-02-06 08:24:12 -05:00 | | | };
|
| | |
|
2026-09-15 11:21:44 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | enum ENUM_SCALERBYLEO_ERROR
|
| | | {
|
| | | SCALERBYLEO_ERR_NONE = 0, // Sin error
|
| | | SCALERBYLEO_ERR_NOT_TRAINED, // Transform/InverseTransform sin FitTransform ni Load previo
|
| | | SCALERBYLEO_ERR_EMPTY_INPUT, // vector/matrix vacío
|
| | | SCALERBYLEO_ERR_INVALID_RANGE, // m_i_start/m_i_count fuera de rango
|
| | | SCALERBYLEO_ERR_SIZE_MISMATCH, // columnas/tamaño no coincide con lo entrenado
|
| | | SCALERBYLEO_ERR_DEGENERATE_SCALE, // std/iqr/rango demasiado pequeño (< SCALER_BASE_MIN_VALUE)
|
| | | SCALERBYLEO_ERR_FILE_OPEN, // FileOpen devolvió INVALID_HANDLE
|
| | | SCALERBYLEO_ERR_INVALID_DATA, // array/string malformado en LoadByArr/LoadByStr
|
2026-09-15 22:45:34 -05:00 | | | SCALERBYLEO_ERR_IN_OPENCL,
|
| | | SCALERBYLEO_ERR_IN_CTX_MANAGER_CL,
|
2026-09-15 11:21:44 -05:00 | | | };
|
2026-09-14 08:09:32 -05:00 | | | }
|
2026-02-06 08:24:12 -05:00 | | | #endif
|
| | | //+------------------------------------------------------------------+
|