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

Re: tasc article 09.98 on atr



PureBytes Links

Trading Reference Links

On Mon, 27 Dec 1999 08:22:54 +0100, mensur  wrote:

>does anyone have the codes for the atr, used on the article from andrew abraham?

>From my archives.  This was originally written by Harvey Pearce, a
contributor to this SIG.   FWIW, I've not tested it.

-= Chris ß =-
Using MetaStock/FastTrack/FastRUBE/FastTools/EZPnF/TC2000/PSM
===============================================
Trading the Trend (TTT) - by Andrew Abraham, TASC 9/1998, was about
one form of stoploss exit: subtract some manipulation of the true
range from the highest high (or add it to the lowest low) and exit
when the close crosses that.  Members of Chuck LeBeau's Traders Club
will recognise the "Chandelier Exit".

THE CHANDELIER EXIT:  The exit stop is placed at a multiple of average
true ranges from the highest high or highest close since the entry of
the trade. As the highs get higher the stop moves up but it never
moves downward.

In MS 6.5 as a variable or custom indicator :
DaysinTrade:= Barssince(previous composite entry criteria = 1)

THE YO YO EXIT: This exit is very similar to the Chandelier Exit
except that the ATR stop is always pegged to the most recent close
instead of the highest high. Since the closes move higher and lower,
the stop also moves up and down (hence the Yo Yo name).

Name: Trading the Trend

Pds:=21;
Mult:=3;
TruRan:=Mov(ATR(1),Pds,W)*Mult;
HiLimit:=HHV(H,Pds)-TruRan;
LoLimit:=LLV(L,Pds)+TruRan;
If(C>HiLimit,HiLimit,LoLimit)

1.  After closing the Indicator Builder click on the Expert Advisor
(the guy in the bowler/derby hat).
2.  Click on New, then the Name tab, type in Trading the Trend.
3.  Click on the Highlights tab, select the first line so that it is
highlighted, click Edit, type in the name Uptrend, select Colour Blue,
select Condition, type in C>FmlVar("Trading the
Trend","HiLimit"),click OK,
4.  Still on the Highlights tab, select the second line, click Edit,
type in the name Downtrend, select Color Red, select Condition, type
in C<=FmlVar("Trading the Trend","HiLimit"), click OK, click OK again.
5.  If you have a chart open that you want to use this on, click
Attach, otherwise click Close.  In the latter case, when you open a
chart and plot the trendline, click on the Expert Advisor, select
Trading the Trend, and click on Attach.

I've given the Expert steps in detail for any who may not be familiar
with its use.  To experiment with variations in the lookback periods
and the multiplier you can do so in either the Indicator Builder, or
right-click the indicator on the chart, select Properties, then the
Formula tab, and make the changes (e.g. try a lookback period of 10,
and a multiplier of 2.5).  As implemented above, the Expert should
change accordingly.  This shows the trade-offs that have to be made
between near and distant stops.  This is too rudimentary to be traded
as a system - the whipsaws would chop you to pieces - but the exits
should help to limit drawdowns.

A very similar stoploss is given in Chande & Kroll "The New Technical
Trader", pp.167 - 169, "Volatility-Based Trailing Stops".  My
preference is to plot both the high and the low exit lines in
contrasting colours, dispensing with the switch between them, and
dispensing with the Expert.  If anyone wants help with the code, just
say so.  And if I've screwed something up again, say so.

Assuming you entered everything exactly in both the Indicator Builder
and the Expert Advisor, one question comes to mind.  Did you decide to
adapt the formula to MS v.6.5 and use an Input function for Pds and
Mult?  It seems like a logical thing to do, and in fact I coded it
that way at first.  The problem is that the Expert Advisor always
reverts to the default value (the System Tester does the same thing).
Thus if you used something like:

Pds:=Input("Lookback Periods?",1,1000,20)

and then when you applied it you changed the periods to 15, the Expert
Advisor will still read 20.  I hard-coded the Pds and Mult parameters
for that reason.

From: Harvey Pearce <hhp@xxxxxxxx>
===============================================