in Search

Using ATR as an exit criteria

Last post 03-09-2005, 0:30 by jerome. 2 replies.
Sort Posts: Previous Next
  •  02-17-2005, 21:35 498

    Using ATR as an exit criteria

    Hi,

    I am writing a system test. I have my long entry working but I am having trouble coming up with a way code my exit.

    I normally set my loss stop to be a multiple of the Average True Range on the day I enter (actually it is ATR(x)).

    So I would need to store off that value upon entry, so that I can determine if the price has dropped below my ATR multiple (or be able to re-calculate it at any given point).

    Any pointers would be appreciated!

    BT
  •  02-17-2005, 22:12 499 in reply to 498

    Re: Using ATR as an exit criteria

    I would do something like :

    BuyCondition:={your buy condition};
    StopAtr:=Valuewhen(1,BuyCondition,ATR(X))*{Your Multiplier};
    EntryPrice:=Valuewhen(1,BuyCondition,C);
    Cross((EntryPrice-StopAtr),C)

    Hope this helps.
    My Site
  •  03-09-2005, 0:30 591 in reply to 498

    Re: Using ATR as an exit criteria

    unfortunately if the buy condition happens after you are in the trade then patrick's code will not give you the same atr stop.

    have a look at the plugin http://www.tradernexus.com/ which gets around this problem.

    i use it all the time and its great - you can define your own atr multiples and it plots the stop on the chart really well

    jer
View as RSS news feed in XML