| 
 PureBytes Links 
Trading Reference Links 
 | 
I have a tradestation formula for an indicator called the
Trend Intensity Indicator.
I am aware there is an indicator called the Trade Intensity Index that
has already been covered in the mailing list, but I am led to understand
that this indicator is different.
I am wondering if someone could please translate the code to
AFL?
inputs:
        AvgLength(
60 ), 
        DevCalcLength(
30 ) ;
variables:
        Avg( 0 ),
        SDPlus( 0
), 
        SDMinus( 0
), 
        Dev( 0 ),
        Offset( 0
), 
        TII( 0 )
;
Avg = Average( Close, AvgLength ) ;
SDPlus = 0 ;
SDMinus = 0 ;
for Offset = 0 to DevCalcLength - 1
        begin
        Dev =
Close[Offset] - Avg ;
        if Dev
> 0 then
                SDPlus
= SDPlus + Dev
        else
                SDMinus
= SDMinus - Dev ;
        end 
;
TII = SDPlus / ( SDPlus + SDMinus ) * 100 ;
Plot1(TII,"TrendInten");
Arthur
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
  ADVERTISEMENT 
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 |