Home Shop

Selected System


Price breakout of yesterdays range


This system works best with 5 minute data. A buy signal is generated the first time a close lies above yesterdays high and a sell is generated the first time a close lies under the previous days low. A moving average crossover closes out open positions.

Long Entry Code(copy and paste into the Enhanced System Tester):
MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1); yestHi:= Ref(HighestSince(1,MktStart,H),-1); yestLo:= Ref(LowestSince(1,MktStart,L),-1); avg := 55; FTMA1:= Tema((H+L+C)/3,avg); FTMA2:= Tema(FTMA1,avg); Diff:= FTMA1 - FTMA2; fma:= FTMA1 + Diff; haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2; haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min(L,haOpen))/4; STMA1:= Tema(haC,avg); STMA2:= Tema(STMA1,avg); Diff:= STMA1 - STMA2; sma:= STMA1 + Diff; LE:=Cross(C,ValueWhen(1,MktStart,yestHi)); SE:= Cross(ValueWhen(1,MktStart,yestLo),C); LX:= Cross(sma,fma); SX:=Cross(fma,sma); 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
Long Exit Code(copy and paste into the Enhanced System Tester):
MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1); yestHi:= Ref(HighestSince(1,MktStart,H),-1); yestLo:= Ref(LowestSince(1,MktStart,L),-1); avg := 55; FTMA1:= Tema((H+L+C)/3,avg); FTMA2:= Tema(FTMA1,avg); Diff:= FTMA1 - FTMA2; fma:= FTMA1 + Diff; haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2; haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min(L,haOpen))/4; STMA1:= Tema(haC,avg); STMA2:= Tema(STMA1,avg); Diff:= STMA1 - STMA2; sma:= STMA1 + Diff; LE:=Cross(C,ValueWhen(1,MktStart,yestHi)); SE:= Cross(ValueWhen(1,MktStart,yestLo),C); LX:= Cross(sma,fma); SX:=Cross(fma,sma); 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
Short Entry Code(copy and paste into the Enhanced System Tester):
MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1); yestHi:= Ref(HighestSince(1,MktStart,H),-1); yestLo:= Ref(LowestSince(1,MktStart,L),-1); avg := 55; FTMA1:= Tema((H+L+C)/3,avg); FTMA2:= Tema(FTMA1,avg); Diff:= FTMA1 - FTMA2; fma:= FTMA1 + Diff; haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2; haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min(L,haOpen))/4; STMA1:= Tema(haC,avg); STMA2:= Tema(STMA1,avg); Diff:= STMA1 - STMA2; sma:= STMA1 + Diff; LE:=Cross(C,ValueWhen(1,MktStart,yestHi)); SE:= Cross(ValueWhen(1,MktStart,yestLo),C); LX:= Cross(sma,fma); SX:=Cross(fma,sma); 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
Short Exit Code(copy and paste into the Enhanced System Tester):
MktStart:=DayOfWeek()<>Ref(DayOfWeek(),-1); yestHi:= Ref(HighestSince(1,MktStart,H),-1); yestLo:= Ref(LowestSince(1,MktStart,L),-1); avg := 55; FTMA1:= Tema((H+L+C)/3,avg); FTMA2:= Tema(FTMA1,avg); Diff:= FTMA1 - FTMA2; fma:= FTMA1 + Diff; haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2; haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min(L,haOpen))/4; STMA1:= Tema(haC,avg); STMA2:= Tema(STMA1,avg); Diff:= STMA1 - STMA2; sma:= STMA1 + Diff; LE:=Cross(C,ValueWhen(1,MktStart,yestHi)); SE:= Cross(ValueWhen(1,MktStart,yestLo),C); LX:= Cross(sma,fma); SX:=Cross(fma,sma); 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