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

Phi Lane's System with Cuck Lebeau's Chandelier Exits



PureBytes Links

Trading Reference Links


Here's Phil Lane's system, again, with Chuck Lebeau's Chandelier exits.
Previously, I used the Percentage of Entry Price as a trailing stop since I
wanted the stops to increase or decrease in size as the prices changes
(i.e., a 20 point stop in the S&P today may be considered by some to be
tight, whereas in 1994, it would be considered as generous.). But an
factor*Avg True Range would work as well.

For those who weren't paying attention or too quick with their delete
buttons, MaxTradeHigh is a function that was provided to us previously by
John of joachim@xxxxxxxxxxxxx (??). It's not a built in function inside
TradeStation.
The code for the function is provided below, as well as its opposite,
MinTradeLow.

Thanks should go out to Phil Lane, Chuck LeBeau and Joachim.

{System: Phil Lane's System}
Inputs: ATRLen(10),Lvl(10),Fac(2.5);
Vars: Atr(0),Eb(0),LStop(0),Mp(0);

Atr=Average(TrueRange,ATRLen);
Mp=MarketPosition;
If Mp<>1 and c[1]<o[1] and c[2]<o[2] and c[3]<o[3] and H<Highest(H[1],3) and
O>L[1] and Atr>Lvl    then  begin
  buy on close;
  Eb=currentbar;
  LStop=0;
 end;
If MP=1 and currentbar<>eb then begin
 LStop=Maxlist(LStop,MaxTradeHigh-Fac*ATR);
 exitlong Lstop stop;
 end;

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

{Function: MaxTradeHigh}
if marketposition = 1 then begin
if h > MaxTradeHigh[1] then
MaxTradeHigh = h;
end else
MaxTradeHigh = -999999;
------------------------------------
{Function: MinTradeLow}
if marketposition = -1 then begin
if l < MinTradeLow[1] then
MinTradeLow = l;
end else
MinTradeLow = 999999;