# Afl for pivot breaking candle

##### New Member red and blue ones  ##### New Member
yes thanks TJ i got the AFL and thanks to vijay brother
HiVolume = IIf(V > (2 * MA(V,15)), True, False);
PlotShapes(shapeSmallCircle * HiVolume, IIf(C > O, colorRed, colorBlue), 0, (O+C)/2, 0);

##### New Member
Pls Help me to plot circles in this code instead of HH,HL,LH,LL afl ploting now tis instead of that how to plot Small circles with green(HH,LH) and red (HL,LL)

_SECTION_BEGIN("Plot-Pivots");
change = Param("% change",0.05,0.1,25,0.05);
ZigZArray = Zig(C, change);
j = k = PH = PL = 0;
for( i = 1; i < BarCount-1; i++ )
{
if (ZigZArray < ZigZArray[i-1] AND ZigZArray < ZigZArray[i+1])
{
if (PL[k] > ZigZArray)
{
PlotText("LL",i, L-5, colorLime);
}
else
{
PlotText("HL",i, L-5, colorBlueGrey);
}
k = k + 1;
PL[k] = ZigZArray;
}
if (ZigZArray > ZigZArray[i-1] AND ZigZArray > ZigZArray[i+1])
{
if (PH[j] < ZigZArray)
{
PlotText("HH", i, H+5, colorBlueGrey);
}
else
{
PlotText("LH", i, H+5, colorLime);
}
j = j + 1;
PH[j] = ZigZArray;
}
}
_SECTION_END();

##### New Member
or an AFL which can plot swing high and low pls seniors help me.... #### Happy_Singh

##### Happy
change color yourself . . .

Find & replace First occurrence of Lime and BlueGrey to Red
Find & replace Sceond occurrence of Lime and BlueGrey to Green Happy

Code:
``````change = Param("% change",0.15,0.1,25,0.05);
Z = Zig(C, change);
PlotShapes(IIf(Z < Ref(Z,-1) AND Z < Ref(Z,1),shapeSmallCircle,shapeNone),colorRed,0,L,-20);
PlotShapes(IIf(Z > Ref(Z,-1) AND Z > Ref(Z,1),shapeSmallCircle,shapeNone),colorGreen,0,H,20);``````

Last edited:

##### New Member
change color yourself . . .

Find & replace First occurrence of Lime and BlueGrey to Red
Find & replace Sceond occurrence of Lime and BlueGrey to Green Happy

Code:
``````change = Param("% change",0.15,0.1,25,0.05);
Z = Zig(C, change);
PlotShapes(IIf(Z < Ref(Z,-1) AND Z < Ref(Z,1),shapeSmallCircle,shapeNone),colorRed,0,L,-20);
PlotShapes(IIf(Z > Ref(Z,-1) AND Z > Ref(Z,1),shapeSmallCircle,shapeNone),colorGreen,0,H,20);``````
Thank you very much brother .... ##### New Member
Happy brother thanks a lot this is the afl
_SECTION_BEGIN("Plot-Pivots");
change = Param("% change",0.15,0.1,25,0.05);
Z = Zig(C, change);
j = k = PH = PL = 0;
for( i = 1; i < BarCount-1; i++ )
{
if (Z < Z[i-1] AND Z < Z[i+1])
{
if (PL[k] > Z)
{
PlotShapes(IIf(Z < Ref(Z,-1) AND Z < Ref(Z,1),shapeSmallCircle,shapeNone),colorRed,0,L,-20);
}
else
{
PlotShapes(IIf(Z > Ref(Z,-1) AND Z > Ref(Z,1),shapeSmallCircle,shapeNone),colorGreen,0,H,20);
}
k = k + 1;
PL[k] = Z;
}
if (Z > Z[i-1] AND Z > Z[i+1])
{
if (PH[j] < Z)
{
PlotShapes(IIf(Z > Ref(Z,-1) AND Z > Ref(Z,1),shapeSmallCircle,shapeNone),colorGreen,0,H,20);
}
else
{
PlotShapes(IIf(Z < Ref(Z,-1) AND Z < Ref(Z,1),shapeSmallCircle,shapeNone),colorRed,0,L,-20);
}
j = j + 1;
PH[j] = Z;
}
}
_SECTION_END();

i got it..... 