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

Re: [amibroker] Tradestation language ??



PureBytes Links

Trading Reference Links

Thanks Tomasz! :)
----- Original Message -----
Sent: Saturday, October 08, 2005 2:09 AM
Subject: Re: [amibroker] Tradestation language ??

Hello,
 
ProjMA[1] is previous value and code
does simply exponential smoothing.
 
This
ProjMA = Mid - (DampFactor * (Mid - ProjMA[1])) ;
 
can be rewritten to:
 
ProjMA = Mid - DampFactor * Mid + DampFactor * ProjMA[ 1 ];
 
and then to:
 
ProjMA = Mid * ( 1 - DampFactor ) + DampFactor * ProjMA[ 1 ];
 
AFL equivalent of such statement is:
 
ProjMA = AMA( Mid, 1 - DampFactor );
 
 
Entire code:
 
DampFactor = 0.3;

MALength =
5
;

ProjMA =
0
;

Mid =
0
;

MAs =
0
;

Mid = (
High + Low)/2
;

ProjMA =
AMA( Mid, 1
- DampFactor );

MAs =
MA(Close
, MALength) ;

Plot (ProjMA, "ProjMA" ,colorDefault
) ;

Plot (MAs, "Avg", colorYellow
) ;
 

Best regards,
Tomasz Janeczko
amibroker.com


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS