Discussion of article "Cross-Platform Expert Advisor: The CExpertAdvisor and CExpertAdvisors Classes" - page 3

 

I managed to create a custom MM class, thanks.

How do I get the order close reason? How do I know it's closed due stop (any virtual or broker)?

How to use CEventAggregator class? Do you have any examples?

 
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool CCandleManagerBase::Add(const string symbol,const int period)
  {
   if(CheckPointer(m_symbol_man))
     {
      CSymbolInfo *instrument=m_symbol_man.Get(symbol);
      if(CheckPointer(instrument))
        {
         instrument.Name(symbol);
         instrument.Refresh();
         CCandle *candle=new CCandle();
         candle.Init(instrument,period);
         return Add(/*instrument*/candle);
        }
     }
   return false;
  }
There is error. I commented the wrong value.
 
Juer:
There is error. I commented the wrong value.

I see. Thank you for this. It is now corrected. You can see the latest version here:

https://github.com/iceron/MQLx/commits/master

 
May I ask the moderator, for the time of major news, volatility is intense, when a new candle can be both long and short, which for this one k line bar can only be placed once the order will conflict? A new candlestick can only be placed once order means only a total of one order or that long orders can be placed once, short orders can also be placed a single order a total of two orders?