log in     sign up for free
 
Winning streaks lead to complacency, and complacency leads to sloppy trading.
Jack D. Schwager
 
 
Home
systems (285)
 
 
Special offer: buy AmiBroker and EOD+Real-Time Data
 

Buy

AmiBroker

     (special offer)
 
 
 

Buy

EOD data for AmiBroker

     (special offer)
 
 
 

Buy

Realtime data for AmiBroker

     (special offer)
 
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Chandelier Exit

System for: MetaStock

 

 

Views:  2123

Added: January 26, 2007
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 
 

email this link

 
 
Tags: MetaStock, system
 


The exit system you use is at least as important as the entry system.

Below is the code for Chuck LeBeau's Chandelier Exit. The Chandelier Exit is a volatility based exit (it uses average true range) that works quite well on trend following systems. It lets "... profits run in the direction
of a trend while still offering some protection against any reversal in trend."

The theory is quite simple, but because of the awkwardness of defining the entry price, its implementation in MetaStock takes some work. The theory is: exit a long position at either the highest high since entry minus 3
ATRs, or at the highest close since entry minus 2.5 ATRs.

The exit is descibed more fully in the Trader's Toolkit section at Chuck LeBeau's site -- http://traderclub.com/

 

 



Code:

Chandelier 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




Chandelier 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

 


 




 

Code to difficult? Find somebody to help you with coding here.

 


Source: http://www.guppytraders.com

 

View similar:

StoRSI Trading System
Dynamic BreakOut System I
Bollinger Band Volatility Trading System
Displaced Moving Average
MetaStock System Test 03 - Tema PDI - MDI, ADX (Vol Req.)
Forecast Oscillator System Alternative
PLdot H-L Price's
Fazola MAROC System
MACDhistogram Trading
Genesis of a Simple Futures Trading System
...
 
 
all systems for MetaStock
all systems

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009