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

Re: McGinley Dynamics



PureBytes Links

Trading Reference Links

Here is a sample of the EasyLanguage you could use to check for division by
zero.

inputs: k( .6 ), period( 9 ) ;
vars: MD( 0 ) ;

if K <> 0 and MD[ 1 ] <> 0 then
  MD = MD[ 1 ] + ( c - MD[ 1 ] ) / K * period * power( ( c / MD[ 1 ] ), 4 )
;

plot1( MD, "MD" ) ;


Best regards,

Benjamin Blanco,
EasyLanguage Specialist
( former TradeStation Technologies, Inc. employee of six years )
http://www.benjaminblanco.com/

EasyLanguage is a registered trademarks of TradeStation Technologies, Inc.

----- Original Message -----
From: "Trey Johnson" <dickjohnson3@xxxxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Thursday, December 05, 2002 11:04 AM
Subject: McGinley Dynamics


The code for this indicator in Kaufman's book, "Trading Systems and
Methods," is the following:

inputs: k(.6),period(9);
vars:MD(0);

MD=MD[1]+(c-MD[1])/K*period*power((c/MD[1]),4);

plot1(MD,"MD");

However, it doesn't work. I keep getting the error message: "attempt to
divide by zero." I tried a couple of different things and still can't get it
to work. Any suggestions?
Thanks in advance,
Trey Johnson