15min MA and 30min MA at the same EA help

 

I want to use a 15min MA and a 30 MA and do back testing but it doesnt work, this is my code

BigMA=iMA(NULL,PERIOD_M15, PerBig,0,0,0,0);

BigMAShort=iMA(NULL,PERIOD_M30, PerBigShort,0,0,0,0);

Short_MA9 =iMA(NULL,PERIOD_M30, Short_Per9,0, Short_MA_MODE, S_appliedTo, shift_s);

MA9=iMA(NULL,PERIOD_M15, Per9,0, Long_MA_MODE, L_appliedTo, shift);

Thanks for your help


 
That's not code. Attach a complied version of your code. And tell us what does-not work on it.
 
birendorf:
I want to use a 15min MA and a 30 MA and do back testing but it doesnt work, this is my code

BigMA=iMA(NULL,PERIOD_M15, PerBig,0,0,0,0);

BigMAShort=iMA(NULL,PERIOD_M30, PerBigShort,0,0,0,0);
  1. The call is
    double iMA(string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)
    
    7 parameters. Your call 8 parameters - invalid call.
  2. Write self documenting code, don't use just numbers
    BigMA=iMA(NULL,PERIOD_M15, PerBig, MODE_SMA, PRICE_CLOSE, 0);

  3. Tester limitation You CAN NOT get bar zero data for other timeframes/pairs. Don't use a shift of zero.
  4. and stop shouting

 
WHRoeder:
  1. The call is 7 parameters. Your call 8 parameters - invalid call.
  2. Write self documenting code, don't use just numbers
  3. Tester limitation You CAN NOT get bar zero data for other timeframes/pairs. Don't use a shift of zero.
  4. and stop shouting


I do use 7 parameters not 8, however I changed it as you said, but it still doesnt work, im doing back testing with this

BigMA=iMA(NULL,PERIOD_M15,PerBig,0,0,PRICE_CLOSE,1);

MA9=iMA(NULL,PERIOD_M15,Per9,0,Long_MA_MODE,Long_applied_price_to,shift);


and right after im doing with this MA and getting defferents results

 BigMA=iMA(NULL,0,PerBig,0,0,0,0);

MA9=iMA(NULL,0,Per9,0,Long_MA_MODE,Long_applied_price_to,shift);