PureBytes Links
Trading Reference Links
|
Better trick than using arrays...
I have not verified, but you got the idea ( tmp var will never overload the
Float precision)
I guess that this one will still have the correct price precision even with
more than 1000 bars back
{Float Precision average
Dumb code by PO}
inputs: price( numericseries, length(numeric);
Var:tmp(0)
tmp=0;
if length<>0 begin
for k=0 to length-1 begin
tmp=tmp+price[k]/length;
end;
F_average=tmp;
Sincerely,
Pierre Orphelin
www.sirtrade.com
TradeStation Technologies representative in France
|