PureBytes Links
Trading Reference Links
|
Hello all,
Please help me with this stop placement. It works for long trades, when I merely reversed it for short trades, the stops were exiting at teh close of evry entrybar, producing zero P/L.I just want to exit at the entry price plus a multiple of the ATR if the trade is less than a certain number of days old:
If barrsinceentry <stopdays and high > (entryprice + ATR_Mult1 * Avgtruerange(ATR))
then exitshort 10 contracts;
stopdays is just an input for the number of days, ATR_Mult1 is just a certain multiple appplied to the ATR. While ATR in the brackets is just an input giving the number of days for the Average true Range.
I am very frustrated by this simple piece of programming. I would really appreciate anyone who is able to shed any light on this.
Cheers
Paul
|