PureBytes Links
Trading Reference Links
|
A similar problem was discussed on this list recently and we determined that
two different functions are being called. The Average has both a Series and
a Simple variation that give different results. It is not clear to me that
your code would call the different functions, but you could track down the
problem by saving the two average functions to different names and rewriting
your code below to call the new functions. Then you could put print
statements in the new functions to see which ones are called.
Even if this is the reason, it would seem to be inappropriate to have two
functions that return different values if they are supposed to be the same
thing. Mike gossland is correct in stating that you should never put the
Data2 statement inside parenthesis. Always put it outside the function.
At 01:15 PM 7/10/98 +0100, you wrote:
>Can someone tell me what is the matter with this ShowMe?
>
>input: P2 (c data2), Length(20);
>
>print("Average: ", Average(P2, Length), Average(c data2, Length));
>print("StdDev: ", StdDev(P2, Length), StdDev(c data2, Length));
>
>if 1=2 then plot1(0, "plot");
>
>The two averages differ and the two stddev's also differ. Why?
>
>
Best Regards,
William Brower
Publisher of TS Express
The Journal for Informed Users of TradeStation
Free Sample Available (Send Mail Address)
Email: 1000mileman@xxxxxxxxxxxxxx
Web: http://www.insideedgesystems.com
Tel: 203-454-2754 Fax: 203-221-9195
|