Help AFL

#1
Hello
AFL need to apply this in a 5-minute chart, but applied as if in a graph of 30 minutes.
With other indicators, such as stocastico I can solve it, but not with this. Someone can help me. Thank you very much.

Regards,


_SECTION_BEGIN("Ergodic TSI Blau");
/* Ergodic TSI Blau */
// The TSI is a smoothed True Strength indicator and the SMI is a smoothed Stochastic Momentum indicator.

Len1 = Param(" Long MA",8,1,200,1);; // Long MA
Len2 = Param("Short MA",5,1,200,1);; // Short MA
Len3 = Param("Smoothing",1,1,200,1); // Smoothing

Fac1 = 2 / (Len1 + 1); Fac2 = 2 / (Len2 + 1); Fac3 = 2 / (Len3 + 1);

ROCx = C - Ref(C, -1);
ROCy = abs(ROCx);

Value1 = 100 * AMA(AMA(AMA(ROCx, Fac1), Fac2), Fac3);
Value2 = 100 * AMA(AMA(AMA(ROCy, Fac1), Fac2), Fac3);

TSI = IIf(Value2 == 0, 0, Value1 / Value2);
Sig = AMA(TSI, Fac2);

PlotErgodicSignalLineTSI =ParamToggle("Ergodic TSI SignalLine ","No|Yes",1);
Color =IIf (Sig> Ref (Sig, -1), colorWhite, colorBlack);
if (PlotErgodicSignalLineTSI ==1) Plot(Sig, "TSI Sig",Color,styleLine|styleLeftAxisScale|styleThick);
PlotErgodicTSI =ParamToggle("Ergodic TSI","No|Yes",1);
if (PlotErgodicTSI ==1) Plot(TSI, "TSI",colorBlack,styleLine|styleLeftAxisScale);
 

Similar threads