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

Re:ADX jumps



PureBytes Links

Trading Reference Links

Gary:

It looks like some parameter (variable) in the calculation is retaining
a past value when a new tick or bar occurs. This has happened to me even
though the calculation at the new bar should replace the old value it
does not. In the code I have to set (reinitialize) the variable to zero
at the start of each new calculation.

 Try this. At the start of each new tick or bar set DMI+ and DMI- to
zero in their functions at (from TS2K)

.............
End
Else 
	If CurrentBar > 1 Then Begin

     DMIPlus=0;	   <-------{ADD AT THIS POINT}

		If High[0] - High[1] < 0 Then 
			PlusDM = 0

.............

wayne



> 
> For some reason ADX (and possibly others, I don't know) doesn't act 
> like that.  It locks at one value for a long time, makes occasional 
> rapid moves, and makes large JUMPS immediately after the bar closes.
>