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

RE: McGinley Dynamics



PureBytes Links

Trading Reference Links

Thank you Dennis

Spot on with your debugging skills :O)
many thanks
cameron

Here is the full code if anyone wants to use it







{MD or McGinleyDynamcMA

k is a constant , included here as input for later optimization in a
function standard is .6
}

inputs: price(close),
	 period( 10 ),
	 k( .06 ) ;

	 vars:McGinleyDynamcMI(close),
  MD(	 0 ) ,
  		yestvalue(0);

if K <> 0 {and McGinleyDynamcMI[ 1 ] <> 0}  and currentbar > 50 then begin
	if McGinleyDynamcMI[ 1 ] = 0 then yestValue = 1;
	if McGinleyDynamcMI[ 1 ] <> 0 then yestValue = McGinleyDynamcMI[ 1 ];

  McGinleyDynamcMI = yestvalue + ( price - yestvalue) / (K * period *
power( ( price / yestvalue ), 4 ));
plot1(McGinleyDynamcMI,"MDMA");
end;

-----Original Message-----
From: DH [mailto:catapult@xxxxxxxxxxxxxxxxxx]
Sent: Wednesday, February 04, 2004 8:05 PM
To: Omega List
Subject: Re: McGinley Dynamics


> here is the exerpt/formula out of the book......
> MD=MD[1]+(close-MD[1]/(k*P*@power((close/MD[1],4)));

I don't have Kaufman's book handy but that has the look of one where MD
should be initialized to the close rather than to zero.

var: MD(close);

not

var: MD(0);

--
  Dennis


---
---