2026-09-03 18:43:26 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| Def.mqh |
|
| | | //| Copyright 2026, Niquel Mendoza |
|
| | | //| https://www.mql5.com |
|
| | | //+------------------------------------------------------------------+
|
| | | #property copyright "Copyright 2026, Niquel Mendoza"
|
| | | #property link "https://www.mql5.com"
|
| | | #property strict
|
| | |
|
| | | #ifndef MQLARTICLES_UTILS_BITS_DEF_MQH
|
| | | #define MQLARTICLES_UTILS_BITS_DEF_MQH
|
| | |
|
2026-09-03 19:55:19 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | #include <TSN\\Tables\\Main.mqh>
|
| | | #include <TSN\\BInt\\NUtils.mqh>
|
| | |
|
2026-09-03 18:43:26 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | //---
|
| | | // funcion princiapl que cheka m_w
|
| | | // aparte de que cheka la reserva si se requiere aumentar o no
|
| | | #define MQLARTICLES_KEYBYTES_CHECK_RES(TO_RESERVE) \
|
2026-09-03 19:55:19 -05:00 | | | if(m_w >= 64) \
|
| | | { \
|
| | | m_s++; \
|
| | | m_w = 0; \
|
| | | if(m_s+(TO_RESERVE)>=m_r) \
|
| | | { \
|
| | | m_r+=((TO_RESERVE)<<1) + 1; \
|
| | | ArrayResize(m_bits,m_r,m_r); \
|
| | | } \
|
| | | m_bits[m_s]=0ULL; \
|
| | | } \
|
| | | else if(m_s+(TO_RESERVE)>=m_r) \
|
| | | { \
|
| | | m_r+=((TO_RESERVE)<<1) + 1; \
|
| | | ArrayResize(m_bits,m_r,m_r); \
|
2026-09-03 18:43:26 -05:00 | | | }
|
| | |
|
2026-09-03 19:55:19 -05:00 | | |
|
2026-09-03 18:43:26 -05:00 | | | //---
|
| | | // conviertes bytes a bits
|
| | | #define MQLARTICLES_BITBUFFER_BITS_SIZE(V) (sizeof(v)<<3)
|
| | | //+------------------------------------------------------------------+
|
| | | #endif // MQLARTICLES_UTILS_BITS_DEF_MQH
|