Seer logo - advanced backtesting for stock, futures and forex trading systems using using technical analysis indicators, charts, money management and position sizing
SID NameDescriptionRating
767 ChandelierExitA simple interpretation of the Chandelier Exit by Chuck Le BeauNot Rated

The logic for this function:

#A simple interpretation of the Chandelier Exit by Chuck Le Beau 

#The Chandelier Exit hangs a trailing stop from the highest high of the position, 
#minus a multiple of the 45 bar Average True Range (ATR). This function simply returns 
#a value that can be used in a stop order. This function can except an optional parameter
#to specify a multiple of ATR to use, a default of 3 is used when nothing is passed. 
#This function assumes the position is long.

my ($atr)=@_;
if (Position) {
  $atr=3 if not defined($atr);
  return (MaxPriceSinceEntry-(Today(ATR(45)) * $atr));
}
#no position, return undefined
return undef;

© 2010 seer trading systems ltd
feedback FAQ legal privacy