forked from nique_372/MQLArticles
54 lines
2 KiB
MQL5
54 lines
2 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| PoolDef.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_INDICATORSCTS_POOLDEF_MQH
|
|
#define MQLARTICLES_INDICATORSCTS_POOLDEF_MQH
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| Include |
|
|
//+------------------------------------------------------------------+
|
|
#include "Main.mqh"
|
|
#include "..\\Utils\\Bits\\Hash.mqh"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
namespace TSN
|
|
{
|
|
//+------------------------------------------------------------------+
|
|
//| Struct base |
|
|
//+------------------------------------------------------------------+
|
|
struct IndicatorCacheExtraData : public CBitBuffer
|
|
{
|
|
public:
|
|
IndicatorCacheExtraData(int reserve) : CBitBuffer(reserve), ref_count(0) {}
|
|
IndicatorCacheExtraData(const string& e, int rc) : ref_count(rc) {}
|
|
IndicatorCacheExtraData() : ref_count(0) {}
|
|
|
|
//--- numero de referncias
|
|
int ref_count;
|
|
|
|
//--- ocutamos el del padre
|
|
void RobarDe(IndicatorCacheExtraData& v)
|
|
{
|
|
CBitBuffer::RobarDe(v); // al del base
|
|
ref_count = v.ref_count;
|
|
}
|
|
|
|
//--- copia a
|
|
void CopyTo(CBitBuffer& v)
|
|
{
|
|
v = this;
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
#endif // MQLARTICLES_INDICATORSCTS_POOLDEF_MQH
|
|
//+------------------------------------------------------------------+
|