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

Updating Chandelier Exit indicator



PureBytes Links

Trading Reference Links

Dear List:

Below is the code for Chuck LeBeau's Chandelier Exit. It's not plotting if
I use anything beyond 991231 as the entry date for a trade.

I've tried various combinations, including 100 for 2000 for the year.

I've also changed the format to YYYMMDD. No luck.

Since I know almost nothing about EL, the solution is probably obvious to
those who do know EL & before contacting OR, if someone has a solution, I'd
appreciate it.

Much appreciated,

FPI



********

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;

********