hi
I am trying to port over the naningbob's TMA-RSI indicator to zorro.

I am having trouble in TMA-RSI calculation.
The the indicator was supposed to used the arrays of TMASlope to calculate the RSI and the TMASlope is recalculated all the time.
Any suggestion to fix this?

lite-c
var TMA_Slope_RSI ( int period, int shift) {
var *TMA_Slope_Values = malloc((shift+period + 10 ) * sizeof(var));
int i =0;
for ( i = shift; i < (shift+period + 10); i++ ){
TMA_Slope_Values[i] = TMASlope(i) ;
}
var cur_rsi = RSI(TMA_Slope_Values,period);
printf( "\n tmarsi1 = %.4f" , cur_rsi );
free(TMA_Slope_Values);
return cur_rsi;
}

Mt4
double GetSlopeRSI(string symbol, int tf, int shift)
{
//We could cut these calculation dramatically as we only need the
//set of bars necessary to run the calc. Make slick later.
double curRSI;

//Get our values to calc RSI on.
//fill the array not sure how small this can be.
//but we have to call a slope for every value. This works and only makes
//12 calls instead of 200 or 2000
for ( int i = shift; i < shift+RSIPeriod + 10; i++ )
{
TMA_Slope_Values[i] = GetSlope(symbol,tf,i) ;
}

curRSI = iRSIOnArray(TMA_Slope_Values,ArraySize(TMA_Slope_Values),RSIPeriod,shift);
//Print("curRSI " + curRSI + " TF: " +tf + " Shift: " + shift);
return(curRSI);

}

BTW, i am wondering if the TriMA in the indicator is having the same calculation of NaningBob's TMA ?