PureBytes Links
Trading Reference Links
|
Greetings!
I know this is probably as simple as it gets, but I don't know Easy
Language, and am trying to get the Chandelier Exit to work again. I tried
changing the Date format to YYYYMMDD from YYMMDD, but that didn't work.
As an aside, it's easy to vary your timeframe by changing the Fac
length. FWIW, I've found 4 to be long enough to keep me in but short
enough to not give back too much (but that's simply my comfort
level). Those interested, once the code is corrected, might try going back
over some trades and compare your exits with the Chandelier (could vary Fac
lengths from 3 to 4 to 5). I did my own and the Chandelier won, which not
only saves me money, but time and energy too.
I'm still on TS4 (although I purchased TS2K years ago):
Here's the code:
{Chandelier Exit Disc - TT 12/10/98}
{ This version is for discretionary trading - input starting date/time}
{Suggested settings - ShortExit: cyan, LongExit: red, style: point,
weight: medium}
Input: StrtDate(0), {Date you want plot to start, YYMMDD format}
StrtTime(0), {Optional time to start if intraday data, HHMM 24 hour format}
Pos("L"), {Position - use "L" for Long "S" for Short (including quotes)}
Fac(3), {True range multiplier}
ATRLen(10); {Length of average}
Vars:
MaxChand(-999999), {Chandelier exit var}
MinChand(999999) {Chandelier exit var};
If Pos="L" then begin {Long Trade}
if Time>=StrtTime and Date>=StrtDate then begin
If (H -Fac*Average(TrueRange,ATRLen)) > MaxChand then
MaxChand= (H -Fac*Average(TrueRange,ATRLen));
Plot1(MaxChand,"LongExit");
end;
end;
If Pos="S" then begin {Short Trade}
if Time>=StrtTime and Date>=StrtDate then begin
if (L +Fac*Average(TrueRange,ATRLen)) < MinChand then
MinChand= (L +Fac*Average(TrueRange,ATRLen));
Plot2(MinChand,"ShortExit");
end;
end;
Thanks!
FPI
|