Metastock Indicator Formula |
mc - 28/14 breakout + 28/14/1.5 trailing stop corrected! |
Formula: |
28/14/1.5 trailing stop\\\"
System cut off the correct sell signals.
i paste here:
a:=H>Ref(HHV(H,14),-1);
a2:=C>=Ref(HHV(HHV(H,14)-1.5*ATR(14),28),-1);
b:=L
b2:=C
sbuy:=a AND a2;
ssell:=b OR b2;
state1:=If(BarsSince(sbuy)
state2:=If(BarsSince(sbuy)>BarsSince(ssell),1,0);
s2buy:=state1>Ref(state1,-1);
s2sell:=state2>Ref(state2,-1);
s2buy-s2sell {final signal: 1 for buy, -1 for sell} |
|
|