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

Re: [amibroker] Sector A/D lines



PureBytes Links

Trading Reference Links

Hi - Here is code that I use for TC2K to create industry, sector and market 
composites. Maybe you can modify it for your needs? You can just plot cum of 
( advancess - declines ) to create the line.

Steve

// Filename: IndSecMkt AdvDecUnc Composites - Universe.afl

// Task: Calculate advanced/declined/unchanged composites for all markets, 
sectors and industries using my universe of tradable stocks.

// AA Settings:

// -Apply To: use filter > watchlist > EOD Universe CEF's Stocks

// -Range: n last quotations > n = 1

// -Button: scan

// Notes: Need to rescan every day to update composites.

Buy = 0; // required for scan

YestClose = Ref( Close, -1 );

Advanced = Close > YestClose;

Declined = Close < YestClose;

Unchanged = Close == YestClose;

Industry = GetBaseIndex();

Sector = StrLeft( Industry, 4 ) + "0";

Market = MarketID( 1 );

AddToComposite( Advanced, "~I " + Industry + " U" + " Adv", "H" );

AddToComposite( Declined, "~I " + Industry + " U" + " Dec", "L" );

AddToComposite( Unchanged, "~I " + Industry + " U" + " Unc", "O" );

AddToComposite( Advanced, "~S " + Sector + " U" + " Adv", "H" );

AddToComposite( Declined, "~S " + Sector + " U" + " Dec", "L" );

AddToComposite( Unchanged, "~S " + Sector + " U" + " Unc", "O" );

AddToComposite( Advanced, "~M " + Market + " U" + " Adv", "H" );

AddToComposite( Declined, "~M " + Market + " U" + " Dec", "L" );

AddToComposite( Unchanged, "~M " + Market + " U" + " Unc", "O" );


----- Original Message ----- 
From: "Bill" <zim630@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 08, 2006 10:30 AM
Subject: [amibroker] Sector A/D lines


> Hello,
> I would like to create an A/D line for groups or sectors,i.e. A/D line
> for the XOI or the XAU or for my defined sector categories.
> Any help will be greatly appreciated, Thanks
>
> Bill
>
>
>
>
>
>
> 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
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

 
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:
    http://docs.yahoo.com/info/terms/