39 lines
1.6 KiB
MQL5
39 lines
1.6 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| TradeContext.mqh |
|
|
//| Copyright 2026, MasterOfPuppets |
|
|
//| https://forge.mql5.io/masterofpuppets/mql5 |
|
|
//+------------------------------------------------------------------+
|
|
#ifndef MASTER_OF_PUPPETS_LIB_TRADE_CONTEXT_MQH
|
|
#define MASTER_OF_PUPPETS_LIB_TRADE_CONTEXT_MQH
|
|
|
|
#include <Trade\OrderInfo.mqh>
|
|
#include <Trade\PositionInfo.mqh>
|
|
#include <Trade\SymbolInfo.mqh>
|
|
#include <Trade\Trade.mqh>
|
|
|
|
#property copyright "Copyright 2026, MasterOfPuppets"
|
|
#property link "https://forge.mql5.io/masterofpuppets/mql5"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| Trade context class |
|
|
//+------------------------------------------------------------------+
|
|
class TradeContext
|
|
{
|
|
private:
|
|
COrderInfo *m_orderInfo;
|
|
CPositionInfo *m_positionInfo;
|
|
CSymbolInfo *m_symbolInfo;
|
|
CTrade *m_trade;
|
|
public:
|
|
TradeContext() : m_orderInfo(NULL), m_positionInfo(NULL), m_symbolInfo(NULL), m_trade(NULL) {}
|
|
void Init(COrderInfo *srcOrderInfo, CPositionInfo *srcPositionInfo, CSymbolInfo *srcSymbolInfo, CTrade *srcTrade);
|
|
COrderInfo* GetOrderInfo() const;
|
|
CPositionInfo* GetPositionInfo() const;
|
|
CSymbolInfo* GetSymbolInfo() const;
|
|
CTrade* GetTrade() const;
|
|
};
|
|
|
|
#include <MasterOfPuppetsLib\TradeContext.mq5>
|
|
|
|
#endif
|
|
//+------------------------------------------------------------------+
|