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

Totally bizarre xAverage results



PureBytes Links

Trading Reference Links

I'm completely mystified.  I wonder if anyone else has ever observed
this with TS2000i.  Here's what happened.

Situation: e-mini contract, day session only, 3-minute bars.

I plot the built-in "Moving Average Exponential" indicator with the
parameters (close,90,0), and I check the value of a specific bar.
Say it's 934.21.

I write my own rather complex indicator, which, among other things,
has a statement MA=xAverage(c,90).  The value of MA on the same
bar is 934.04.  Different, but close.  Still within a tick.  They
shouldn't be different though.  Both my indicator and TS's use the
xAverage() function as the underlying calculation.

Then I paste my indicator code into a signal, comment out all the
plot statements, and append a couple buy and sell conditions.
Otherwise the signal code is identical to my indicator code.  The
value of MA on the same bar is now 931.56 - several points different
from the other two results!

Has anyone noticed such dramatic inconsistencies from the same
calculation between indicators and signals?  From code that's
essentially identical?

-- 
  ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
 // +__>   Director of Research and Development
 //  \ 
 // __)    Unicorn Research Corporation -- http://unicorn.us.com