log in     sign up for free
 
When I became a winner I went from 'I figured it out, therefore it can't be wrong' to 'I figured it out, but if I'm wrong, I'm getting the hell out, because I want to save my money and go on to the next trade.'
Marty Schwartz
 
 
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 - Improved

System for: MetaStock

 

 

Views:  2560

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
 



A few weeks ago when the Chandelier Exit was posted to on our board board, I asked if there was a faster version of it. On my (slowpoke) 200 Mhz PC at home, it took about 1 to 2 minutes to calculatethe formula on a single stock.

Anyway, I did not hear of any feasible solutions. Last night, upon reading about the 25X25 system on this site , it struck me that the original Chandelier Exit (see below) had a whole bunch of PREV statements in it. I'm
sure everyone knows where I'm going with this by now.

Anyway, here is how the code (at least this iteration) should be modified to speed up the calculation by a factor of 5. Basically, we move PREV into a variable vPREV prior to using it (so that it is only calculate once) in the
long and short exits. Here is the code for the long exit. I tested it with the sample Entry Rule and receive the same results in 1/5th the time. Just modify the SHORT exit in the same way. Hope this helps everyone using it.

Chandelier Exit - Improved

{DEFINE ENTRY PRICE, WITH EXIT BEING -- ENTRY PRICE AND NO TRADE BEING 0}
{Move PREV into a variable to speed things up - DB 2/17/00}
vPREV:=PREV;
EntryPrice:= If(vPREV <= 0,
{Trade entered today?}
If(LongEntry, CLOSE, 0),
{Trade entered before today. Stopped today?}
If(LOW <= vPREV - MoneyMgmtStop, -vPREV,
If(LOW <= HighestSince(1,vPREV=0, HIGH) - 3 * ATR(10), -vPREV,
If(LOW <= HighestSince(1,vPREV=0, CLOSE) - 2.5 * ATR(10), -vPREV, vPREV))));


David Bozkurtian 2/17/00


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

Work as:

 

 



Code:

Chandelier Exit - Improved
LongEntry:={Tu wstaw kryterium otwarcia pozycji};
MoneyMgmtStop:=(Tu wstaw maksymalnš stratê w punktach);
vPREV:=PREV;
EntryPrice:= If(vPREV <= 0,
{Trade entered today?}
If(LongEntry, CLOSE, 0),
{Trade entered before today. Stopped today?}
If(LOW <= vPREV - MoneyMgmtStop, -vPREV,
If(LOW <= HighestSince(1,vPREV=0, HIGH) - 3 * ATR(10), -vPREV,
If(LOW <= HighestSince(1,vPREV=0, CLOSE) - 2.5 * ATR(10), -vPREV, vPREV))));


 




 

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

 


Source: http://www.guppytraders.com

 

View similar:

Bollinger Band Volatility Trading System
MetaStock System Test 03 - Tema PDI - MDI, ADX (Vol Req.)
Marking High / Low
SeqSETUP & SeqINTERSECTION
Candle - 3 Crows & Soldiers & CCI
MetaStock System Test 01 - R2, S/C, MFI (Vol Required)
Ultimate Signal Generator
RSI Divergence Trading System
Stock Rhythm System
RS System No.1
...
 
 
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