using 2 differents simplemoving average

2359  
 #include <Trade\Trade.mqh>

   //Create an instance of Ctrade
  CTrade trade;
  
void OnTick()
  {
  //we calculate the ask price
  double Ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
  
  //we calculate the Bid price
  double Bid= NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);
  
  //we create an array for the prices
  MqlRates PriceInfo[];
  
  //we fill the array with the pricedata
  int PriceData=CopyRates(_Symbol,_Period,0,3,PriceInfo);
  
  //Creating a string for the signal
  string signal="";
  
  //Creating an array for several prices
  double myBigMMA[];
  double myShortMMA[];
  
  
  //define the property for the moving average
  int BigMADefinition=iMA(_Symbol,_Period,50,MODE_SMA,PRICE_CLOSE);

  int ShortMADefinition=iMA(_Symbol,_Period,10,MODE_SMA,PRICE_CLOSE); ,


i have errors like: iMA wrong parameters count and PRICE_CLOSE improper parameter can t be used.

How can i fix that

William Roeder  
2359: i have errors like: iMA wrong parameters count and PRICE_CLOSE improper parameter can t be used. How can i fix that

Perhaps you should read the manual and call with the correct parameter count.

Your code
Documentation
int BigMADefinition=iMA(
_Symbol,
_Period,
50,
                         
MODE_SMA,
PRICE_CLOSE
); 
int  iMA(
   string             symbol,       // symbol name
   ENUM_TIMEFRAMES    period,       // period
   int                ma_period,    // averaging period
   int                ma_shift,     // horizontal shift
   ENUM_MA_METHOD     ma_method,    // smoothing type
   ENUM_APPLIED_PRICE applied_price // type of price or handle
   );
2359  
William Roeder:

Perhaps you should read the manual and call with the correct parameter count.

Your code
Documentation
ok thanks i will try it
Reason: