help on new file .mqh

 

Writing a new Signal file the "compile" module gives to me the following errors:

  Cihilo            m_ma;             // object-indicator    "DECLARATION WITHOUT TYPE"

  double            MA(int ind)                         { return(m_ma.Main(ind));  " UNDECLARED IDENTIFIER"

  if(!indicators.Add(GetPointer(m_ma)))  3 ERRORS "UNDECLARED IDENTIFIER" "PARAMETER CONVERSION NOT ALLOWED" "CLASS TYPE EXPECTED"

 

anyone can help me? 

 
Rosiman:

Writing a new Signal file the "compile" module gives to me the following errors:

  Cihilo            m_ma;             // object-indicator    "DECLARATION WITHOUT TYPE"

  double            MA(int ind)                         { return(m_ma.Main(ind));  " UNDECLARED IDENTIFIER"

  if(!indicators.Add(GetPointer(m_ma)))  3 ERRORS "UNDECLARED IDENTIFIER" "PARAMETER CONVERSION NOT ALLOWED" "CLASS TYPE EXPECTED"

 

anyone can help me? 

Show your code.
 

I have solved   some errors it compares now only one shown in bold:

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

//| Create MA indicators.                                            |

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

bool CSignalhilo::InitMA(CIndicators *indicators)

  {

//--- check pointer

   if(indicators==NULL)

      return(false);

//--- add indicator to collection

   if(!indicators.Add(GetPointer(m_close)))

     {

      printf(__FUNCTION__+": error adding object");

      return(false);

     }

//--- initialize indicator

   if(!m_ma.Create(m_symbol.Name(),m_period,m_ma_period,m_ma_shift,m_ma_applied))    "UNDECLARED IDENTIFIER"

     {

      printf(__FUNCTION__+": error initializing object");

      return(false);

     }

//--- ok

   return(true);

  }
 
Please edit your post and use SRC button when you post code.
 
angevoyageur:
Please edit your post and use SRC button when you post code.
ok
 
Rosiman:
ok
Why are you replying "ok" and don't do what I ask you ?
 
angevoyageur:
Why are you replying "ok" and don't do what I ask you ?
because I want to learn about rules and SRC button and source code,I don't have any idea and need some little time to do it, but first I need to spend time with my kids on this sunday. excuse me again.
	          
 
//+------------------------------------------------------------------+
//| Create MA indicators.                                            |
//+------------------------------------------------------------------+
bool CSignalhilo::InitMA(CIndicators *indicators)
  {
//--- check pointer
   if(indicators==NULL)
      return(false);
//--- add indicator to collection
   if(!indicators.Add(GetPointer(m_close)))
     {
      printf(__FUNCTION__+": error adding object");
      return(false);
     }
//--- initialize indicator
   if(!m_ma.Create(m_symbol.Name(),m_period,m_ma_period,m_ma_shift,m_ma_applied)) 
     {
      printf(__FUNCTION__+": error initializing object");
      return(false);
     }
//--- ok
   return(true);

the error message:

'm_ma' - undeclared identifier hilo.mqh 148 8

 


 
Rosiman:
because I want to learn about rules and SRC button and source code,I don't have any idea and need some little time to do it, but first I need to spend time with my kids on this sunday. excuse me again.
Ok, not a problem. Seems you don't understand what I mean. I asked you to EDIT your previous message, anyway I edited it for you.
 
angevoyageur:
Ok, not a problem. Seems you don't understand what I mean. I asked you to EDIT your previous message, anyway I edited it for you.

So SRC button is used all the times we need to insert external parameters such as scripts? 

 
Rosiman:

So SRC button is used all the times we need to insert external parameters such as scripts? 

SRC button is used when you need to post any  SouRCe code . . .  How to use the SRC button.
Reason: