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

Re: Bug report & fix for Xaverage function



PureBytes Links

Trading Reference Links

Ok, the 2nd time I cc'ed myself to be able to see what
is going on.  ELA files go though Eskimo's server, as
I've seen them many times on this list.  The new
format Tradestation Pro uses is the ELD format.  (No
ELA/S exporting is possible.)  The maintainer of this
lists needs to make a new entry to allow ELD files
through. 

Until then, here is the ascii version:

Old version of Xaverage:

{ Exponential average }

inputs: 
	Price( numericseries ), 
	Length( numericsimple ) ;

variables: 
	SmoothingFactor( 2 / ( Length + 1 ) ) ;

if CurrentBar = 1 then
	XAverage = Price
else
	XAverage = XAverage[1] + SmoothingFactor * ( Price -
XAverage[1] ) ;


{ *** Copyright (c) 1991-2000 TradeStation. All rights
reserved. *** }


DEBUGGED VERSION:

{ Exponential average }

inputs: 
	Price( numericseries ), 
	Length( numericsimple ) ;

variables: 
	SmoothingFactor(0) ;

if CurrentBar = 1 then begin
	XAverage2 = Price;
	SmoothingFactor= ( 2 / ( Length + 1 ) ) ;	
end else begin
	XAverage2 = XAverage2[1] + SmoothingFactor * ( Price
- XAverage2[1] ) ;
end;


{ *** Copyright (c) 1991-2000 TradeStation. All rights
reserved. *** }


I'd like to hear if this is a problem with TS Pro's
method of computing variables or if it is was "bad"
code.

Jack




--- Jack Griffin <jack_2231@xxxxxxxxx> wrote:
> Sorry, it seems I failed to attach the Xaverage
> Easylanguage Document file "Xaverage2.ELD" to my
> recent e-mail.  I have attached it to this one.
> 
> Jack
> 
> 
>