[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

atr trailing stop



PureBytes Links

Trading Reference Links

Hello all,

I am trying to code an atr based trailing stop and have been flailing.  
Perhaps those better at this than I could assist.

The english language version would read something like this:

For long positions the trailing stop would be:  

Current price minus 2 times the highest value of a 5 period moving average of 
a 5 period atr since the position was initated.  

Perhaps a custom  indicator could be created which behaved as above, and the 
exit could be entered as a cross of the price with the indicator.  

Obviously, the inverse would be true for short positions:  lowest value 
since, etc.

Thanks to anyone who is able to assist.

Sincerely,

K. Miles