Notes:
column A = long or short
column b = buy stop
column c = profit target
Column A: L/S
Formula:
If((C<Ref(C,-1) AND C>Mov(C,13,S)),1,-1)
Column B: Buy Stop
Formula:
r:=.5*(H-L);
If((C<Ref(C,-1) AND C>Mov(C,13,S)),C+r,C-r)
Column C: target
Formula:
If((C<Ref(C,-1) AND C>Mov(C,13,S)),H,L)
Filter:
(C<Ref(C,-1) AND C>Mov(C,13,S)) OR
(C>Ref(C,-1) AND C<Mov(C,13,S))