this is the powerpivots plus version of Chaos Balance lines from Profitunity by Bill Williams
Indicator
factor:=Input("TFactor", 0, 1000, 1);
offset:=Input("Offset", 0, 1000, 0);
HD:=ExtFml("PowerPivots.TDataCreate",1, factor);
LD:=ExtFml("PowerPivots.TDataCreate",2, factor);
ChaosBlueBL:=
{Alligator Blue Balance Line - Jaw}
{13 bar smoothed average offset 8 bars}
Ref(Wilders((HD+LD)/2,13),-8);
ChaosRedBL:=
{Alligator Red Balance Line - Teeth}
{8 bar smoothed average offset 5 bars}
Ref(Wilders((HD+LD)/2,8),-5);
ChaosGreenBL:=
{Alligator Green Balance Line - Lip}
{5 bar smoothed average offset 3 bars}
Ref(Wilders((HD+LD)/2,5),-3);
ChaosBlueBL:=ExtFml("PowerPivots.TDataLocalize", ChaosBlueBL, factor, offset);
ChaosRedBL:=ExtFml("PowerPivots.TDataLocalize", ChaosRedBL, factor, offset);
ChaosGreenBL:=ExtFml("PowerPivots.TDataLocalize", ChaosGreenBL, factor, offset);
ChaosGreenBL;
ChaosRedBL;
ChaosBlueBL;
Long entry for expert
factor:=1;
offset:=0;
HD:=ExtFml("PowerPivots.TDataCreate",1, factor);
LD:=ExtFml("PowerPivots.TDataCreate",2, factor);
A3:=
{Alligator Blue Balance Line - Jaw}
{13 bar smoothed average offset 8 bars}
Ref(Wilders((HD+LD)/2,13),-8);
A2:=
{Alligator Red Balance Line - Teeth}
{8 bar smoothed average offset 5 bars}
Ref(Wilders((HD+LD)/2,8),-5);
A1:=
{Alligator Green Balance Line - Lip}
{5 bar smoothed average offset 3 bars}
Ref(Wilders((HD+LD)/2,5),-3);
UCloud:=Max(A1,Max(A2,A3));
LCloud:=Min(A1,Min(A2,A3));
UCloud:=ExtFml("PowerPivots.TDataLocalize", UCloud, factor, offset);
A3:=ExtFml("PowerPivots.TDataLocalize", A3, factor, offset);
A2:=ExtFml("PowerPivots.TDataLocalize", A2, factor, offset);
A1:=ExtFml("PowerPivots.TDataLocalize", A1, factor, offset);
LCloud:=ExtFml("PowerPivots.TDataLocalize", LCloud, factor, offset);
Z:=If(C>Ucloud,1,If(C<LCloud,-1,0));
Z=1 AND Ref(Z,-1)<1{Long entry} just change this line with one of the below lines
Z=-1 AND Ref(Z,-1)>-1{Short entry}
Z=0 AND Ref(Z,-1)=1{Long exit}
Z=0 AND Ref(Z,-1)=-1{Short exit}
Same indicator without Power Pivots Plus
ChaosBlueBL:=
{Alligator Blue Balance Line - Jaw}
{13 bar smoothed average offset 8 bars}
Ref(Wilders((H+L)/2,13),-8);
ChaosRedBL:=
{Alligator Red Balance Line - Teeth}
{8 bar smoothed average offset 5 bars}
Ref(Wilders((H+L)/2,8),-5);
ChaosGreenBL:=
{Alligator Green Balance Line - Lip}
{5 bar smoothed average offset 3 bars}
Ref(Wilders((H+L)/2,5),-3);
ChaosGreenBL;
ChaosRedBL;
ChaosBlueBL;
Long entry for Expert
A3:=
{Alligator Blue Balance Line - Jaw}
{13 bar smoothed average offset 8 bars}
Ref(Wilders((H+L)/2,13),-8);
A2:=
{Alligator Red Balance Line - Teeth}
{8 bar smoothed average offset 5 bars}
Ref(Wilders((H+L)/2,8),-5);
A1:=
{Alligator Green Balance Line - Lip}
{5 bar smoothed average offset 3 bars}
Ref(Wilders((H+L)/2,5),-3);
UCloud:=Max(A1,Max(A2,A3));
LCloud:=Min(A1,Min(A2,A3));
Z:=If(C>Ucloud,1,If(C<LCloud,-1,0));
Z=1 AND Ref(Z,-1)<1{Long entry} just change this line with one of the below lines
Z=-1 AND Ref(Z,-1)>-1{Short entry}
Z=0 AND Ref(Z,-1)=1{Long exit}
Z=0 AND Ref(Z,-1)=-1{Short exit}