PureBytes Links
Trading Reference Links
|
As a rule of thumb, always avoid to do calculations inside of a plot statement.
Sincerely,
Pierre Orphelin
www.sirtrade.com
Tradestation 2000i, TradeStation 7 sales and support
Safir-X, neurofuzzy logic trading system builder
To subscribe to our FREE trading system newsletter:
http://www.sirtrade.com/newsletter.htm
-----Message d'origine-----
De : Ian Waugh [mailto:ianwaugh@xxxxxxxxx]
Envoye : mercredi 9 juillet 2003 14:16
A : omega-list@xxxxxxxxxx
Cc : ianwaugh@xxxxxxxxxxxxxxxxxxx
Objet : Not Average
I'm having trouble with Average. Probably just not got my head around
something but would appreciate a pointer...
I'm calculating the difference between this bar's close and the previous
bar's close and trying to plot the 3-bar average but I get different
results depending on when the Average is taken. For example:
diff=c-c[1];
plot1(average(diff,3),"diff");
produces a different plot to:
diff=c-c[1];
diff=average(diff,3);
plot1(diff,"diff");
I would have assumed they'd plot the same plot. Where am I going wrong?
Ian
|