PureBytes Links
Trading Reference Links
|
Glen,
I have read the Tharp book and am very interested in this. I always seem to
leave money on the table. Anyone else?
David
From: "Glen Wallace" <gcwallace@xxxxxxxx>
Reply-To: metastock@xxxxxxxxxxxxx
To: "MetaStock listserver" <metastock@xxxxxxxxxxxxx>
Subject: Re: Formula Question - Chandelier Exit
Date: Tue, 1 Feb 2000 09:14:33 -0800
Andrew:
Below is the code I posted for the Chandelier exit back in October. The
trick is to define the entry date/price as the point at which your system
triggered the entry, not by using the date functions. A side benefit is
that you can also use it to implement a fixed dollar, or money management,
stop.
The more time I spend with the Chandelier exit, the more I admire its
strength as an exit and its simplicity. Because exits tend to be the
weakest part of a system, I would urge everyone to spend some time with it.
And Chuck LeBeau gets credit for the MetaStock code, not me. I just took
his framework and applied it to his exit.
{LONG EXIT}
LongEntry:= {this your entry system, eg. Cross(CLOSE, Mov(C,20,E))};
MoneyMgmtStop:= {this is your maximum loss, in points};
{DEFINE ENTRY PRICE, WITH EXIT BEING -ENTRY PRICE AND NO TRADE BEING 0}
EntryPrice:= If(PREV <= 0,
{Trade entered today?}
If(LongEntry, CLOSE, 0),
{Trade entered before today. Stopped today?}
If(LOW <= PREV - MoneyMgmtStop, -PREV,
If(LOW <= HighestSince(1,PREV=0, HIGH) - 3 * ATR(10), -PREV,
If(LOW <= HighestSince(1,PREV=0, CLOSE) - 2.5 * ATR(10), -PREV,
PREV))));
{EXIT IF ENTRY PRICE < 0 (MEANING EXIT)}
EntryPrice < 0
{SHORT EXIT}
ShortEntry:= {this your entry system, eg. Cross(Mov(C,20,E), CLOSE)};
MoneyMgmtStop:= {this is your maximum loss, in points};
{DEFINE ENTRY PRICE, WITH EXIT BEING -ENTRY PRICE AND NO TRADE BEING 0}
EntryPrice:= If(PREV <= 0,
{Trade entered today?}
If(ShortEntry, CLOSE, 0),
{Trade entered before today. Stopped today?}
If(HIGH >= PREV + MoneyMgmtStop, -PREV,
If(HIGH >= LowestSince(1,PREV=0, LOW) + 3 * ATR(10), -PREV,
If(HIGH >= LowestSince(1,PREV=0, CLOSE) + 2.5 * ATR(10), -PREV,
PREV))));
{EXIT IF ENTRY PRICE < 0 (MEANING EXIT)}
EntryPrice < 0
----- Original Message -----
From: Kornberg Family
To: Metastock List
Sent: February 1, 2000 04:57
Subject: Formula Question
Hi,
There has been soem discussion on an Australian tech analysis forum about a
formula for an ATR Chandelier stop. Essentially Tharp and Le Beau give this
exit a big wrap.
Someone (Randy aka yankeetrader) on the forum has a function for a
chandelier stop/exit as follows:
atrperiods:=Input("Enter ATR periods",1,39,18);
multiplier:=Input("Enter ATR multiplier",1,10,3);
(HIGH-ATR(atrperiods)*multiplier)
This is OK but as the highs are used to "hang" the Chandelier as the highs
fall then the line drawn using the formula also fall. As we never move our
stops down in a long trade, we must always remember that the highest
Chandelier stop is our stop. The way around this is to do one of two
things - both which have me stumped.
1. Only plot the Chandelier stop from the entry date. Thus the above
formula should prompt for a date and the line should be plotted from that
date with the Stop calculated as exit at the highest high since entry minus
3 ATR's.
I have used a variety of dayofmonth(), month() year() functions to no avail.
Also it appears that a line like this cannot be plotted from a particular
date.
2. Plot the Chandelier Stop after prompting for the entry with the Stop
calculated as exit at the highest high since entry minus 3 ATR's. Thus, the
stop line would never be lowered.
Can the bar of the entry date be painted another color automatically after
prompting?
Any help would be greatly appreciated.
Andrew
PS: A chart base on a template Randy posted is shown to demonstrate how the
Chandelier stop moves up and down.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
|