mql5/Include/MasterOfPuppetsLib/TraderContext.mq5
2026-03-06 19:04:08 +03:00

77 lines
3 KiB
MQL5

//+------------------------------------------------------------------+
//| TraderContext.mq5 |
//| Copyright 2026, MasterOfPuppets |
//| https://forge.mql5.io/masterofpuppets/mql5 |
//+------------------------------------------------------------------+
#ifndef MASTER_OF_PUPPETS_LIB_TRADER_CONTEXT_MQ5
#define MASTER_OF_PUPPETS_LIB_TRADER_CONTEXT_MQ5
#include <MasterOfPuppetsLib\TraderContext.mqh>
#property copyright "Copyright 2026, MasterOfPuppets"
#property link "https://forge.mql5.io/masterofpuppets/mql5"
//+------------------------------------------------------------------+
//| Trader context initialization function |
//+------------------------------------------------------------------+
void TraderContext::Init(const double contracts, const bool soundEnabled, const string soundFileName,
const double stopLoss, const double takeProfit, ulong magic)
{
m_contracts = contracts;
m_soundEnabled = soundEnabled;
m_soundFileName = soundFileName;
m_stopLoss = stopLoss;
m_takeProfit = takeProfit;
m_magic = magic;
}
//+------------------------------------------------------------------+
//| Get contracts function |
//+------------------------------------------------------------------+
const double TraderContext::GetContracts() const
{
return m_contracts;
}
//+------------------------------------------------------------------+
//| Get sound enabled function |
//+------------------------------------------------------------------+
const bool TraderContext::GetSoundEnabled() const
{
return m_soundEnabled;
}
//+------------------------------------------------------------------+
//| Get sound file name function |
//+------------------------------------------------------------------+
const string TraderContext::GetSoundFileName() const
{
return m_soundFileName;
}
//+------------------------------------------------------------------+
//| Get stop loss function |
//+------------------------------------------------------------------+
const double TraderContext::GetStopLoss() const
{
return m_stopLoss;
}
//+------------------------------------------------------------------+
//| Get take profit function |
//+------------------------------------------------------------------+
const double TraderContext::GetTakeProfit() const
{
return m_takeProfit;
}
//+------------------------------------------------------------------+
//| Get magic function |
//+------------------------------------------------------------------+
const ulong TraderContext::GetMagic() const
{
return m_magic;
}
#endif
//+------------------------------------------------------------------+