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

Re: [amibroker] Alertif problem



PureBytes Links

Trading Reference Links

Traderix2003:

You can implement the Chandelier exit in one line of code in AB. Just use:

ApplyStop(stoptypeTrailing, stopmodePoint, x*ATR(y), true, true);

This works both in long and short mode. The x and y parameters are
optimizable. The multiple ATR hangs down from the highest high (if long)
since the trade was initiated or from the lowest low if short. Read the help
file on ApplyStop.

Good luck.

Al Venosa


----- Original Message ----- 
From: "traderix2003" <d.adam@xxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, February 22, 2004 4:53 AM
Subject: [amibroker] CHANDELIER EXIT


I´m experimenting with the Chandeler Exit but I only can use it for
long positions.
How can I adapt this formula for SHORT positions??

/* Chandelier Exit */
/* Geoff Mulhall 25-May-2002 */
/* Modified 18-Jan-2003 to take advantage of Ami 2.5 Param
Functionality */

/* The Chandelier Exit is a Volatility based exit. */
/* Refer to  http://www.traderclub.com/discus/board.html
/* Bulletin 35 Trailing Stops - The Chandelier Exit for more detail
*/


/* Setting the HighCloseSwitch to 1 hangs the Chandelier Exit from
the High */
/* Setting the HighCloseSwitch to 0 hangs the Chandelier Exit from
the Close */

/* Set Scaling to Automatic, Set Gridlines as follows Level 0 On,
Show dates On, Middle On */
/* Right Click anywhere in the Chart, Select Parameters to get the
Param Dialogue and move the slides to */
/* see the effect of changing ATRMultiplier ATRRange & HHVRange */


/* Plot the Chart */

Title = "Chandelier";
GraphXSpace =  2;

/* Candle chart */

Plot(Close,"",1,64);
Plot(WMA(Close,30),"",4,1);
/* Chandelier Exit */

/* Param( "ATRMultiplier", default, Min, Max, step ); */

HighCloseSwitch = Param( "High/Close Switch",1,0,1,1);

ATRMultiplier = Param( "ATRMultiplier", 3, 1, 4, 0.1);
ATRRange = Param( "ATRRange", 10, 2, 30, 1);
HHVRange = Param( "HHVRange", 10, 2, 30, 1);

ExitHungExHigh = HHV(High - AtrMultiplier * ATR(AtrRange),HHVRange);
ExitHungExClose = HHV(Close - AtrMultiplier * ATR
(AtrRange),HHVRange);

Exit = IIf(HighCloseSwitch == 1, ExitHungExHigh,ExitHungExClose);

Plot(Exit,"Chandelier",colorBlue,styleLine);





Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links







---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 2/20/2004



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/