2026-03-06 03:09:30 +03:00
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| TraderContext.mqh |
|
|
|
|
|
//| Copyright 2026, MasterOfPuppets |
|
|
|
|
|
//| https://forge.mql5.io/masterofpuppets/mql5 |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
#ifndef MASTER_OF_PUPPETS_LIB_TRADER_CONTEXT_MQH
|
|
|
|
|
#define MASTER_OF_PUPPETS_LIB_TRADER_CONTEXT_MQH
|
|
|
|
|
|
|
|
|
|
#property copyright "Copyright 2026, MasterOfPuppets"
|
|
|
|
|
#property link "https://forge.mql5.io/masterofpuppets/mql5"
|
|
|
|
|
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Trader context class |
|
|
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
class TraderContext
|
|
|
|
|
{
|
|
|
|
|
private:
|
2026-03-06 09:09:20 +03:00
|
|
|
double m_contracts;
|
|
|
|
|
bool m_soundEnabled;
|
|
|
|
|
string m_soundFileName;
|
|
|
|
|
double m_stopLoss;
|
|
|
|
|
double m_takeProfit;
|
2026-03-06 19:04:08 +03:00
|
|
|
ulong m_magic;
|
2026-03-06 03:09:30 +03:00
|
|
|
public:
|
|
|
|
|
void Init(const double contracts, const bool soundEnabled, const string soundFileName,
|
2026-03-06 19:04:08 +03:00
|
|
|
const double stopLoss, const double takeProfit, ulong m_magic);
|
2026-03-06 03:09:30 +03:00
|
|
|
const double GetContracts() const;
|
|
|
|
|
const bool GetSoundEnabled() const;
|
|
|
|
|
const string GetSoundFileName() const;
|
|
|
|
|
const double GetStopLoss() const;
|
|
|
|
|
const double GetTakeProfit() const;
|
2026-03-06 19:04:08 +03:00
|
|
|
const ulong GetMagic() const;
|
2026-03-06 03:09:30 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#include <MasterOfPuppetsLib\TraderContext.mq5>
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
//+------------------------------------------------------------------+
|