//+------------------------------------------------------------------+
//|                                                 OpenPosition.mqh |
//|                        Copyright 2021, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, iPayDNA"
#property link      "http://ipaydna.biz"
#property version   "1.00"
#property strict

#include "..\iForexDNA\ExternVariables.mqh"
#include "..\iForexDNA\hash.mqh"
#include "..\iForexDNA\MiscFunc.mqh"
#include "..\iForexDNA\Enums.mqh"
#include "..\iForexDNA\AccountManager.mqh"
#include "..\iForexDNA\IndicatorsHelper.mqh"
#include "..\iForexDNA\AdvanceIndicator.mqh"
#include "..\iForexDNA\Strategy\BaseStrategy.mqh"
#include "..\Telegram\TelegramBot.mqh"

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

class OpenPosition
{
   private:      
        IndicatorsHelper        *m_Indicators;
        AdvanceIndicator        *m_AdvIndicators;
        AccountManager          *m_AccountManager;     
        CandleStickArray        *m_CandleStick;
        TelegramBot             *m_TelegramBot;

   public:
                                 OpenPosition(IndicatorsHelper *pIndicators, AccountManager *pAccountManager, AdvanceIndicator *pAdvIndicators, CandleStickArray *pCandleStick
                                 , TelegramBot *pTelegramBot);
                                 ~OpenPosition();
                                 
        bool                     Init();
        void                     OnUpdate();

};

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

OpenPosition::OpenPosition(IndicatorsHelper *pIndicators ,AccountManager *pAccountManager, AdvanceIndicator *pAdvIndicators, CandleStickArray *pCandleStick, TelegramBot *pTelegramBot)
{
   m_Indicators=NULL;
   m_AdvIndicators=NULL;
   m_AccountManager=NULL;
   m_TelegramBot=NULL;

   if(pAccountManager==NULL)
      LogError(__FUNCTION__,"AccountManager pointer is NULL");
   else
      m_AccountManager=pAccountManager;
      
   if(pIndicators==NULL)
      LogError(__FUNCTION__,"IndicatorHelper pointer is NULL");
   else
      m_Indicators=pIndicators;
   
   if(pAdvIndicators==NULL)
      LogError(__FUNCTION__,"AdvIndicators pointer is NULL");
   else
      m_AdvIndicators=pAdvIndicators;
      
   if(pAdvIndicators==NULL)
      LogError(__FUNCTION__,"CandleStickArray pointer is NULL");
   else
      m_CandleStick=pCandleStick;

   if(pTelegramBot==NULL)
      LogError(__FUNCTION__,"TelegramBot pointer is NULL");
   else
      m_TelegramBot=pTelegramBot;
      
}

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

OpenPosition::~OpenPosition()
{

}

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

bool OpenPosition::Init()
{
   return true;
}

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

void OpenPosition::OnUpdate()
{
   return;
}

//+------------------------------------------------------------------+