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

RE: Dennis Meyers' Recursive JY code



PureBytes Links

Trading Reference Links

> -----Original Message-----
> From: Brian [mailto:brian.meads@xxxxxxxxxx]
> Sent: Thursday, January 07, 1999 7:50 PM
> Subject: Dennis Meyers' Recursive JY code
>
> Has anyone got TS code for the Dennis Meyers' article 'The Yen,
> Recursed' from December TASC?

Brian,

I worked up this code several days ago for an indicator and system but haven't
had the chance to post it.  The formulas were derived mostly from the Excel
sidebar, but there were cell reference errors that needed correction.

http://www.empire-systems.com/files/jy_rmtl.ela

Paul


{Recursive Moving Trendline Indicator}

inputs: ndays(25);

vars:	alpha(0),
	bo(0),
	bo1(c),
	xest(0),
	xest1(c),
	ema(0),
	ema1(c);

alpha = 2 / (ndays + 1);
bo = (1 - alpha) * bo1 + close;
ema = ema1 + alpha * (close - ema1);
xest = (1 - alpha) * xest1 + alpha * (close + bo - bo1);
bo1 = bo;
xest1 = xest;
ema1 = ema;

if barnumber > 50 then begin
	plot1(xest,"Xest");
	plot2(ema,"EMA");
end;


{Recursive Moving Trendline System}

inputs: ndays(25);

vars:	alpha(0),
	bo(0),
	bo1(c),
	xest(0),
	xest1(c),
	ema(0),
	ema1(c),
	tosc(0);

alpha = 2 / (ndays + 1);
bo = (1 - alpha) * bo1 + close;
ema = ema1 + alpha * (close - ema1);
xest = (1 - alpha) * xest1 + alpha * (close + bo - bo1);
bo1 = bo;
xest1 = xest;
ema1 = ema;
tosc = xest - ema;

if barnumber > 50 then begin
	if tosc > 0 then buy close;
	if tosc < 0 then sell close;
end;