Chicago
Posts: 3 since Nov 2014
Thanks Given: 0
Thanks Received: 0
|
Hello. I am trying to add an additional exit rule to the classic MA cross over price system. Maybe an example can clarify this exit rule (I've chosen 3 days, but the idea should be adaptable to x days):
day 0 (signal): high 11, low 8.5, close 9.5, MA 9 open long (because close>MA)
day 1: high 10.5, low 7.5, close 8.8, MA 8.5 keep long position (because close>MA)
day 2: high 10.7, low 8, close 9, MA 8.8 keep long position (because close>MA)
day 3: high 10.2, low 7.8, close 9.5, MA 9 close position (because higher from day 1 to day 3 is lower than high of day 0).
On day 3, altough close is ABOVE MA, I would like to EXIT position (sell), because higher from day 1 to day 3 (10.7) is LOWER than high of day 0 (11).
I only need help on coding the lower higher exit rule (time out exit rule).
Thank you.
|