parameter conversion not alowed.. trying to get the datas of to have MA of RSI

 

Hi, 

I'm stuck with a problem for days and i have no clue what i made wrong. Please help me if you can. 


so under the start() I have the following code:

void CalculateCurrencySlopeStrengthMA(int tf, int shift)
{
   int i;
   // Get Slope for all symbols and totalize for all currencies   
   for ( i = 0; i < symbolCount; i++)
   {
      double RSI = GetSlope(symbolNames[i], tf, shift);
      //double MA = iMAOnArray(RSI,0,MAPeriod,0,MAMethod,shift);
      
      currencyValues3[GetCurrencyIndex(StringSubstr(symbolNames[i], 0, 3))] += RSI;
      currencyValues3[GetCurrencyIndex(StringSubstr(symbolNames[i], 3, 3))] += 100 - RSI;
   } 
   } 
   for ( i = 0; i < CURRENCYCOUNT; i++ )
   {
      // average
      currencyValues3[i] /= currencyOccurrences[i];
   }
}

This works fine. However when I erase // from MA and modify RSI to MA at currencyValues3 I get the "RSI - parameter conversion not allowed" message. What can be the problem? How can I get the MA instead of RSI?


notice: the indi computes the RSIs of each crosses of the 8 major currencies and makes an avg of them.


thank you very much

csibiri 

 
csibiri_cse: I get the "RSI - parameter conversion not allowed" message. What can be the problem? How can I get the MA instead of RSI?
  1. MT5 doesn't have a iMAOnArray. Why did you post your MT4 question in the Root / MT5 Indicators section instead of the MQL4 section (bottom of the Root page?)
  2. As the function name suggests and the documentation states, the first parameter is an array. RSI is not an array. Set the array asSeries or use a buffer, populate it, then call the function.
 
whroeder1:
  1. MT5 doesn't have a iMAOnArray. Why did you post your MT4 question in the Root / MT5 Indicators section instead of the MQL4 section (bottom of the Root page?)
  2. As the function name suggests and the documentation states, the first parameter is an array. RSI is not an array. Set the array asSeries or use a buffer, populate it, then call the function.


Thank you very much for your response. You are right, I've made a mistake, I haven't noticed, that it is a MQL5 section, if I know that I wouldn't post it here. I'm really sorry.

Reason: