----- Original Message -----
Sent: Friday, April 06, 2007 3:12
PM
Subject: [amibroker] programming ?
I have a system where there tends to be whipsaws at
transition points between Long and Short. If there has been an uptrend
and the system is long when a change occurs where it should go short there are
a few bars of confusion where the system goes short/long/short/long and the
finally short again for the move down. A similar thing is happening when
the system need to transition from short back to long.
The first thing
I thought of is to suppress new trades for a few bars after the first trade of
these little groups of whipsaws. Some sort of BarsSince last trade as a
filter. That may work, but I am not sure how to code that as there seems
to be 4 cases of possible transitions, also multiple buys/sells tend to
confuse the picture. How would I code that?
Is there a better way
to accomplish the task?
Any help is appreciated
Sid