Invalid pointer access need help

 

Hello, I am new to OPP the MQL5 and I am going to convert my ea from MT4 to MT5.

I start with testing the function from the standard OPP and have the error. "Invalid pointer access need" in runtime.

the code that return code as follows.

 set up..

 CExpertMoney     *m_money;                    // money manager object

 double price,sl;

result from..

//+------------------------------------------------------------------+

//| Method of getting the lot for open long position.                |

//+------------------------------------------------------------------+

double CSympleExpert::LotOpenLong(double price,double sl

{   

return(m_money.CheckOpenLong(price,sl)); <-----  invalid pointer access in 'Expert.mqh' (517,11)

}

//+------------------------------------------------------------------+

Do some one advise to use this correctly, what need to set?

Chaiya



 
Chaiya Srisawat:

Hello, I am new to OPP the MQL5 and I am going to convert my ea from MT4 to MT5.

I start with testing the function from the standard OPP and have the error. "Invalid pointer access need" in runtime.

the code that return code as follows.

 set up..

 CExpertMoney     *m_money;                    // money manager object

 double price,sl;

result from..

//+------------------------------------------------------------------+

//| Method of getting the lot for open long position.                |

//+------------------------------------------------------------------+

double CSympleExpert::LotOpenLong(double price,double sl

{   

return(m_money.CheckOpenLong(price,sl)); <-----  invalid pointer access in 'Expert.mqh' (517,11)

}

//+------------------------------------------------------------------+

Do some one advise to use this correctly, what need to set?

Chaiya



 CExpertMoney     m_money;                    // money manager object
 
Please post in the appropriate section.
Reason: