Johnan Prathap’s article, “Three-Bar Inside Bar Pattern,” presents
a pattern based trading system.
To create a system test:
- Tools > the New
- Buy Order tab and enter the
following formula.
con1:= C > Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
el:=con1 AND Ref(con1, -2) AND Ref(con2, -1);
Ref(el,-1)
- Sell Order tab and enter
the following formula.
con1:= C > Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
el:=con1 AND Ref(con1, -2) AND Ref(con2, -1);
H>=ValueWhen(1,Ref(el,-1),O*1.0075) OR
L<=ValueWhen(1,Ref(el,-1),O*0.9925)
- Order Type to Limit or Stop Price and
enter the following formula:
con1:= C > Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
el:=con1 AND Ref(con1, -2) AND Ref(con2, -1);
pt:=ValueWhen(1,Ref(el,-1),O*1.0075);
sl:=ValueWhen(1,Ref(el,-1),O*0.9925);
If(L<= sl, sl, pt)
- Sell Short Order tab and
enter the following formula.
con1:= C < Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
es:=con1 AND Ref(con1, -2) AND Ref(con2, -1);
Ref(es, -1)
- Buy to Cover Order tab and
enter the following formula.
con1:= C < Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
es:=con1 AND Ref(con1, -2) AND Ref(con2, -1);
H>=ValueWhen(1,Ref(es,-1),O*1.0075) OR
L<=ValueWhen(1,Ref(es,-1),O*0.9925)
- Order Type to Limit or Stop Price and
enter the following formula:
con1:= C < Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
es:=con1 AND Ref(con1, -2) AND Ref(con2, -1);
pt:=ValueWhen(1,Ref(es,-1),O*0.9925);
sl:=ValueWhen(1,Ref(es,-1),O*1.0075);
If(H>= sl, sl, pt)
- OK to close the system editor.
When running the test, set the Order Execution options to
use the Opening prices with zero trade delay.
The system test formulas trigger on the bar after the
pattern so the system tester will enter on the open of the next bar.
Buy signal:
con1:= C > Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
con1 AND Ref(con1, -2) AND Ref(con2, -1)
Sell Short signal:
con1:= C < Ref(C, -1);
con2:= H < Ref(H, -1) AND L > Ref(L, -1);
con1 AND Ref(con1, -2) AND Ref(con2, -1)