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

Chandelier Exit (Cross Posting)



PureBytes Links

Trading Reference Links

I am guilty of cross posting.  I was answering a question on the TradersClub
boards, and I thought this might be of interest to this list:

-----------------------------------------------------

There are quite a few variations to this exit.  Below are just a couple of
the approaches.  

Since the Chandelier exit is built from the highest high or lowest low since
your entry, the key to implementing this in MetaStock is to carefully design
or identify your entry.  For example, let's say you are trading the
stochastic--basically, going long when the stochastic moves up through an
threshold or short when the stochastic moves down through a threshold.  This
is just one example of a slightly better than even entry, at least for the
first few days.  (55% profitable in a 5 day time frame, 33 trades, one
sample market).

So your entry condition looks like this:
---Please note: I've just typed in the comments without the bracket
symbol....for some reason that symbol shows up as &#123 on the
website...----

SIGNAL:=Stoch(24,3); 
I've chosen a longer Stochastic period because I'm looking for a longer term
price move
ENTLONG:=Cross(Signal,20); 
ENTSHORT:=Cross(80,Signal); 

Now that you have entered the trade, you can define the exit.  I am going to
use the ATR() to make the stop adaptive to volatility.  You can use standard
deviation, a fixed point value, or any number of other choices here.

--Chandelier Long Exit--
HV:=HighestSince(1,EntLong,H);  
Again, the High is one choice, the CLOSE might be another
FacL:=If(Barssince(EntLong=1)<3,3,If(Barssince(EntLong=1)>15,1,2.5));
The multiplying factor for ATR() is variable depending on the length that
you are in the trade.  You could just make this a single number like 2.5, if
you prefer, ...See Bulletin 33
LongStop:=Ref(HV-(FacL*(Mov(ATR(1),20,S))),-1);
ExitLong:=C<=LongStop;

--Chandelier Short Exit--
LV:=LowestSince(1,EntShort,L); 
FacS:=If(Barssince(EntShort=1)<3,3,If(Barssince(EntShort=1)>15,1,2.5));
ShortStop:=Ref(LV+(FacS*(Mov(ATR(1),20,S))),-1);
ExitShort:=C>=ShortStop;

>From here, you can put these all in a Custom Formula and run it through the
MetaStock system tester, or you can create an equity line (and lots of other
stats like Win/Loss Pct, etc.) in a separate Indicator.

In the MetaStock system tester, just enter the following:
 ENTER LONG TAB:
FmlVar("Your Custom Indicator Name","EntLong")=1

 CLOSE LONG TAB:
FmlVar("Your Custom Indicator Name","ExitLong")=1

 ENTER SHORT TAB:
FmlVar("Your Custom Indicator Name","EntShort")=1

 EXIT SHORT TAB:
FmlVar("Your Custom Indicator Name","ExitShort")=1

I tested this out, and it's clear that it's no complete system.  My intent
is to show some of the ways that you could code and use a Chandelier Exit in
MetaStock.

Dave Nadeau
Fort Collins, CO


Attachment: Description: "winmail.dat"