Have you checked the Zig fn and AFLs based on the ZigZag indicator?
One very good advantage is that you can set it percentage, say 0.5 for intra, so its able to filter all the noise out.
One very good advantage is that you can set it percentage, say 0.5 for intra, so its able to filter all the noise out.
Code:
_SECTION_BEGIN("Zig");
SetChartOptions(2,chartShowArrows | chartShowDates | chartWrapTitle );
ZigPC = 0.5;
ZZ = Zig(C,LastValue(ZigPC));
PivotLow = Ref(IIf(Ref(ROC(ZZ,1),-1) < 0 AND ROC(ZZ,1) > 0, 1, Null),1);
PivotHigh = Ref(IIf(Ref(ROC(ZZ,1),-1) > 0 AND ROC(ZZ,1) < 0, 1, Null),1);
PlotShapes( IIf(PivotLow,shapeHollowSmallCircle,Null), colorGreen,0, L, -15);
PlotShapes( IIf(PivotHigh,shapeHollowSmallCircle,Null),colorRed,0, H, 15);
BarColors = colorDefault;
Plot(C, " ", BarColors, styleCandle ) ;
Plot(ZZ," ", colorLightGrey,styleLine);
Plot(ZZ," ", BarColors,styleDots|styleNoLine);
_SECTION_END();