I need help with my expert advisor code

 
#include <Trade/Trade.mqh>

CTrade trade;

int OnInit(){
   return(INIT_SUCCEEDED);
}
void OnTick(){

      static datetime timestamp;
      datetime time = iTime(_Symbol,PERIOD_CURRENT,0);
      if(timestamp != time)
      {
      timestamp = time;
         
            //Array for Close Price
            
            //Array for EMA10
            static int handleEMA10 = iMA(_Symbol,PERIOD_CURRENT,10, 0, MODE_EMA, PRICE_CLOSE);
            double EMA10Array[];
            CopyBuffer(handleEMA10,0,1,2,EMA10Array)
            ArraySetAsSeries(EMA10Array,true);      
             
            //Array for MA20
            static int handleMA20 = iMA(_Symbol,PERIOD_CURRENT,20,0,MODE_SMA,PRICE_CLOSE);
            double MA20Array[];
            CopyBuffer(handleMA20,0,1,2,MA20Array);
            ArraySetAsSeries(MA20Array,true);
            
            //Array for MA50
            static int handleMA50 = iMA(_Symbol,PERIOD_CURRENT,50,0,MODE_SMA,PRICE_CLOSE);
            double MA50Array[];
            CopyBuffer(handleMA50,0,1,2,MA50Array);
            ArraySetAsSeries(MA50Array,true);
            
            //Array for MA200
            static int handleMA200 = iMA(_Symbol,PERIOD_CURRENT,200,0,MODE_SMA,PRICE_CLOSE);
            double MA200Array[];
            CopyBuffer(handleMA200,0,1,2,MA200Array);
            ArraySetAsSeries(MA200Array,true);   
            
         //MA50 MA20 crossover above
         if(MA20Array[0] && EMA10Array[0] > MA50Array[0] && MA50Array[1] < MA20Array[1] && EMA10Array[1])
            {
            Print("MA20, EMA0 are now above MA50");
            double ask = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
            double sl = ask - 100 * SymbolInfoDouble(_Symbol,SYMBOL_POINT);
            double tp = ask + 100 * SymbolInfoDouble(_Symbol,SYMBOL_POINT);
            trade.Buy(0.01,_Symbol,ask,sl,tp,"Buy Trade");
            }
         //MA50 MA20 crossover below
         if(EMA10Array[0] && MA20Array[0] < MA50Array[0] && MA50Array[1] > MA20Array[1] && EMA10Array[1])
            {
            Print("MA20, EMA10 are now below MA20");
            double bid  = SymbolInfoDouble(_Symbol,SYMBOL_BID);
            double sl = bid + 100 * SymbolInfoDouble(_Symbol,SYMBOL_POINT);
            double tp = bid - 100 * SymbolInfoDouble(_Symbol,SYMBOL_POINT);
            trade.Sell(0.01,_Symbol,bid,sl,tp,"Sell Trade");
            }      
            
          
            }
            }   
          
         
    

Following error is displayed for this code in line 22:

ArraySetAsaSeries - some operator expected

Started coding recently and got a ton of errors for this code. I was able to fix all of them except for this compiling error. I hope you guys have some advice for me.

Thanks!

 
Neganer Müller: Following error is displayed for this code in line 22: ArraySetAsaSeries - some operator expected

Started coding recently and got a ton of errors for this code. I was able to fix all of them except for this compiling error. I hope you guys have some advice for me.

You are missing a semi-colon in the previous line to terminate the CopyBuffer function:

CopyBuffer(handleEMA10,0,1,2,EMA10Array); // <- You were missing a ";"
ArraySetAsSeries(EMA10Array,true);      
 
It should now compile once you add the missing semi-colon, but I am not so sure it will function as you expect! But since your did not explain what you are trying to do with the code, I can only speculate.
 
Fernando Carreiro:
It should now compile once you add the missing semi-colon, but I am not so sure it will function as you expect! But since your did not explain what you are trying to do with the code, I can only speculate.

Yess thanks a lot. I just saw it myself. It does compile now. This code is only a part of a strategy which i am trying to automate. Seems like a have a long way to go... Wish me luck. Have a nice day Mr. Carreiro!

 
Neganer Müller: Yess thanks a lot. I just saw it myself. It does compile now. This code is only a part of a strategy which i am trying to automate. Seems like a have a long way to go... Wish me luck. Have a nice day Mr. Carreiro!
You are welcome and good luck!