Using ATR as hard stop

StrataSearch has many powerful features, with many techniques and approaches to explore. Here we discuss the things we've done, and the things we'd like to do.

Using ATR as hard stop

Postby rjay » Fri May 29, 2015 2:45 pm

When I enter a position I like the idea of using ATR as a hard stop. Say 3 * ATR(20). But the problem is that if have an exit rule of close < ($entryprice - atr(20) * 3) (I believe) that ATR figure is being recalculated every day meaning that my stop would actually be moved further away in the event of increased volatility.

That's not what I want - how can I reference the ATR(20) value on the entry date ? Would close < ($entryprice - ref(atr(20), -$daysheld) * 3) work ?
rjay
 
Posts: 116
Joined: Wed Jul 26, 2006 6:51 am

Re: Using ATR as hard stop

Postby Overload » Fri May 29, 2015 5:13 pm

Yes, I believe your solution should work:

close < ($entryprice - ref(atr(20), -$daysheld) * 3)

Normally $daysheld is not allowed in formulas, but an enhancement was made to ref() to specifically allow it to be used in that formula. So, yes, I believe that should work.

Pete
Overload
 
Posts: 2246
Joined: Wed Nov 30, 2005 12:14 pm


Return to General Discussion

cron