Download MetaTrader 5

Why did not assign value to these parameters?

To add comments, please log in or register
MQL5 library has more than 1500 apps already. Contribute your own one!
Kevin
44
Kevin 2011.02.02 11:23 

Hi Guys,

 Why did not assign value to these parameters (double   price,sl,tp) in the functions CheckOpenLong() and CheckOpenShort? 

 

 //+------------------------------------------------------------------+
//|                                                       Expert.mqh |
//|                      Copyright ?2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net/ |
//|                                              Revision 2010.10.08 |
//+------------------------------------------------------------------+

 Line:574-617

 //+------------------------------------------------------------------+
//| Check for long position open or limit/stop order set             |
//| INPUT:  no.                                                      |
//| OUTPUT: true-if trade operation processed, false otherwise.      |
//| REMARK: no.                                                      |
//+------------------------------------------------------------------+
bool CExpert::CheckOpenLong()
  {
   double   price,sl,tp;
   datetime expiration=TimeCurrent();
//--- check signal for long enter operations
   if(m_signal.CheckOpenLong(price,sl,tp,expiration))
     {
      if(!m_trade.SetOrderExpiration(expiration))
        {
         m_expiration=expiration;
        }
      return(OpenLong(price,sl,tp));
     }
//--- return without operations
   return(false);
  }
//+------------------------------------------------------------------+
//| Check for short position open or limit/stop order set            |
//| INPUT:  no.                                                      |
//| OUTPUT: true-if trade operation processed, false otherwise.      |
//| REMARK: no.                                                      |
//+------------------------------------------------------------------+
bool CExpert::CheckOpenShort()
  {
   double   price,sl,tp;
   datetime expiration=TimeCurrent();
//--- check signal for short enter operations
   if(m_signal.CheckOpenShort(price,sl,tp,expiration))
     {
      if(!m_trade.SetOrderExpiration(expiration))
        {
         m_expiration=expiration;
        }
      return(OpenShort(price,sl,tp));
     }
//--- return without operations
   return(false);
  }

MetaTrader 5 Trading Platform / MetaQuotes Software Corp.
  • www.metaquotes.net
MetaTrader 5 trading platform designed to arrange brokerage services in Forex, CFD, Futures, as well as equity markets
Ilyas
1206
Ilyas 2011.02.02 16:16  
Thank you for your message. It will be fixed.
Stephen Njuki
5179
Stephen Njuki 2011.02.03 22:43  
mql5:
Thank you for your message. It will be fixed.
I thought these parameters were assigned in the signal script of the EA?
Kevin
44
Kevin 2011.02.08 07:08  
mql5:
Thank you for your message. It will be fixed.

 

Hi Mql5, May i know if the bug fix fixed? when can i get the updates for this?  thank you very much. 

Kevin
44
Kevin 2011.02.17 16:48  
ssn:
I thought these parameters were assigned in the signal script of the EA?

 

yes, thank you very much, ssn. 

To add comments, please log in or register