2025-12-13 12:04:25 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| Base.mqh |
|
| | | //| Copyright 2025, Niquel Mendoza. |
|
| | | //| https://www.mql5.com/es/users/nique_372/news |
|
| | | //+------------------------------------------------------------------+
|
| | | #property copyright "Copyright 2025, Niquel Mendoza."
|
| | | #property link "https://www.mql5.com/es/users/nique_372/news"
|
| | | #property strict
|
| | |
|
| | | #ifndef MQLARTICLES_POSMGMT_CONDPART_COND_IND_BASE_MQH
|
| | | #define MQLARTICLES_POSMGMT_CONDPART_COND_IND_BASE_MQH
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Include |
|
| | | //+------------------------------------------------------------------+
|
| | | #include "..\\..\\Base\\Defines.mqh"
|
2026-01-02 17:52:04 -05:00 | | | #include "..\\..\\..\\..\\IndicatorsCts\\Main.mqh"
|
2025-12-13 12:04:25 -05:00 | | |
|
2026-09-13 08:47:52 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | namespace TSN
|
| | | {
|
2025-12-13 12:04:25 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| Base class to implement partial close condition |
|
| | | //| with indicators (ema, rsi, supertrend, etc.). |
|
| | | //+------------------------------------------------------------------+
|
2026-09-13 08:47:52 -05:00 | | | template <typename TBufferSize>
|
2025-12-13 12:04:25 -05:00 | | | class CConditionalPartialsInd : public IConditionPartial
|
| | | {
|
| | | protected:
|
2026-09-13 08:47:52 -05:00 | | | CiIndicatorSimple<TBufferSize>* m_ind;
|
2025-12-13 12:04:25 -05:00 | | | string m_name;
|
| | |
|
| | | public:
|
2026-01-31 19:44:40 -05:00 | | | CConditionalPartialsInd() : m_ind(NULL), m_name(NULL) { }
|
2025-12-13 12:04:25 -05:00 | | | ~CConditionalPartialsInd() { if(CheckPointer(m_ind) == POINTER_DYNAMIC) delete m_ind; }
|
| | | string Name() const override final { return m_name; }
|
2026-09-13 08:47:52 -05:00 | | | CiIndicatorSimple<TBufferSize>* GetIndicatorPtr() { return m_ind; }
|
2025-12-13 12:04:25 -05:00 | | | };
|
2026-09-13 08:47:52 -05:00 | | | }
|
| | | #endif
|
| | | //+------------------------------------------------------------------+
|