I want to add additional Periods and Plots to the TRIX indicator as included in the NT 6.5. System Indicators. I figured out how to add the add the additional Plots to the 'stock' indicator code but I can't absolutely determine what portion of the code calculates the Periods and Input. I believe this is the portion of the code that calculates the Periods:
if (CurrentBar == 0)
{
Value.Set(Input[0]);
return;
}
EMA tripleEma = EMA(EMA(EMA(Input, period), period), period);
double trix = 100 * ((tripleEma[0] - tripleEma[1]) / tripleEma[0]);
Default.Set(trix);
Signal.Set(EMA(Default, signalPeriod)[0]);
}
Can anyone offer any guidance on how I would modify this code to indicate FOUR TRIX Periods and FOUR TRIX Plots?
Many thanks!!
JSB
Comment