About error : 'Name of EA' is not expert and cannot be executed

 

Hello

I'm mql4 beginner.

Now I'm studying about indicator.

But I have an error while learning to watch a movie.

Error comment is  " 'Temp2' is not expert and cannot be executed ".

How can i fix it?

+) movie link is https://www.youtube.com/watch?v=1C52a0B2sVE and I saw until 17:40

+) Code

#property indicator_separate_window

#property indicator_buffers 2  // up arrow, down arrow

#property indicator_color1 clrGreen

#property indicator_color2 clrRed



extern int FastEMA=12;

extern int SlowEMA=26;

extern int SignalSMA=9;



input double bmi=25.;

double up[];

double down[];



int OnInit()

{  

   SetIndexBuffer(0,up);

   SetIndexStyle(0,DRAW_ARROW);

   SetIndexArrow(0,233);//wingdings charactor

   

   SetIndexBuffer(1,down);

   SetIndexStyle(1,DRAW_ARROW);

   SetIndexArrow(1,234);

   

   return(INIT_SUCCEEDED);

}



int OnCalculate(){

//skip ( default code )

  }


Thank you in advance :)



 

Please use the </> button to insert your above code.


 
Eleni Anna Branou:

Please use the </> button to insert your above code.


I try it. Thank you :)

 
I am sure you are using this indicator from the expert's folder.
Move it to the indicator's folder then open it as an indicator not as an expert.
 
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime& time[],
                const double& open[],
                const double& high[],
                const double& low[],
                const double& close[],
                const long& tick_volume[],
                const long& volume[],
                const int& spread[])
  {

//skip ( default code )
   return(0);

  }
 

It speaks for itself.

The code that you have posted is an indicator so will not be executed as an expert.

Remove the file from your Experts folder and place it in the indicators file.

 
Mohammad Soubra:
I am sure you are using this indicator from the expert's folder.
Move it to the indicator's folder then open it as an indicator not as an expert.

Oh It was fixed.

Thank you very much!!!

 
Konstantin Nikitin:

That was skip. But Thank you ! :)

 
Keith Watford:

It speaks for itself.

The code that you have posted is an indicator so will not be executed as an expert.

Remove the file from your Experts folder and place it in the indicators file.

That was right. 

Thank you for your answer!

Reason: