ADX Directional Movement


System Description:

This system generates a signal in the direction of the current trend when a certain level of directional movement is present in the market. It exits the market when a counter trend starts to develop.
Long Entry Code(copy and paste into the Enhanced System Tester):
LE:=Cross(ADX(14),24) AND PDI(14)>MDI(14); SE:=Cross(ADX(14),24) AND PDI(14)<MDI(14); LX:= Cross(MDI(14),PDI(14)); SX:=Cross(PDI(14),MDI(14)); State:=If(Cum(1)=1,0,If(LE,1,If(SE,-1,If((LX AND PREV=1) OR (SX AND PREV=-1),0,PREV)))); State=1 AND Ref(State,-1)<1{LE}
Long Exit Code(copy and paste into the Enhanced System Tester):
LE:=Cross(ADX(14),24) AND PDI(14)>MDI(14); SE:=Cross(ADX(14),24) AND PDI(14)<MDI(14); LX:= Cross(MDI(14),PDI(14)); SX:=Cross(PDI(14),MDI(14)); State:=If(Cum(1)=1,0,If(LE,1,If(SE,-1,If((LX AND PREV=1) OR (SX AND PREV=-1),0,PREV)))); State=0 AND Ref(State,-1)=1{LX}
Short Entry Code(copy and paste into the Enhanced System Tester):
LE:=Cross(ADX(14),24) AND PDI(14)>MDI(14); SE:=Cross(ADX(14),24) AND PDI(14)<MDI(14); LX:= Cross(MDI(14),PDI(14)); SX:=Cross(PDI(14),MDI(14)); State:=If(Cum(1)=1,0,If(LE,1,If(SE,-1,If((LX AND PREV=1) OR (SX AND PREV=-1),0,PREV)))); State=-1 AND Ref(State,-1)>-1{SE}
Short Exit Code(copy and paste into the Enhanced System Tester):
LE:=Cross(ADX(14),24) AND PDI(14)>MDI(14); SE:=Cross(ADX(14),24) AND PDI(14)<MDI(14); LX:= Cross(MDI(14),PDI(14)); SX:=Cross(PDI(14),MDI(14)); State:=If(Cum(1)=1,0,If(LE,1,If(SE,-1,If((LX AND PREV=1) OR (SX AND PREV=-1),0,PREV)))); State=0 AND Ref(State,-1)=-1{SX}