Experts: VR---Moving

 

VR---Moving:

An Expert Advisor based on indicator iMA (Moving Average, MA) and implemented as a class.


Author: Vladimir Karputov

 
Hi,
In the installation of VR --- Moving.mq5 (codebase) is reporting error in two lines of file Moving.mqh.

Thanks
Files:
Erro.jpg  273 kb
 
Sergio Dutra Veiga:
Hi,
In the installation of VR --- Moving.mq5 (codebase) is reporting error in two lines of file Moving.mqh.

Thanks

Trading forum, automated trading systems and testing trading strategies

Experts: ZigZag EA

Vladimir Karputov, 2019.11.22 19:10

The MQL5 language has become more rigorous - so only now has this error occurred.

The workaround was this:

         if(!m_money.Init(GetPointer(m_symbol),Period(),m_symbol.Point()*digits_adjust))
            return(INIT_FAILED);
         m_money.Percent(risk);
        }
      else
        {
         Print(__FUNCTION__,", ERROR: Object CMoneyFixedMargin is NULL");
         return(INIT_FAILED);
        }
     }
//---
   return(true);
  }
//+------------------------------------------------------------------+ 
//| Create the horizontal line| 
//+------------------------------------------------------------------+ 

do the following:

         if(!m_money.Init(GetPointer(m_symbol),Period(),m_symbol.Point()*digits_adjust))
            return(false);
         m_money.Percent(risk);
        }
      else
        {
         Print(__FUNCTION__,", ERROR: Object CMoneyFixedMargin is NULL");
         return(false);
        }
     }
//---
   return(true);
  }
//+------------------------------------------------------------------+ 
//| Create the horizontal line| 
//+------------------------------------------------------------------+ 

 
Thank you so much friend
 

When I Compile Header File "Moving.mph"

It has error

'INIT_FAILED' - expression not boolean Moving.mqh 213 20

Also When I compile the Expert File "VR--Moving.mph"

It has error also.

'm_moving' - undeclared identifier VR---Moving.mq5 66 4


Can You Please help me to solve this issue.

Thanks Very Much

 
Dhimasyashin Dhimasyashin :

When I Compile Header File " Moving .mph"

It has error

'INIT_FAILED' - expression not boolean Moving.mqh 213 20

Also When I compile the Expert File "VR--Moving.mph"

It has error also.

'm_moving' - undeclared identifier VR---Moving.mq5 66 4


Can You Please help me to solve this issue.

Thanks Very Much

In the above line, replace 'INIT_FAILED' with 'false'.

 

Hello, please check the EA, it 's not working for me.

Files:
1.jpg  89 kb