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

Re: [amibroker] Workspace (Markets) problem



PureBytes Links

Trading Reference Links

Gary,

this example below placed the composites into Group 6.....also, by default in to Market 253.

So, Market 253 is the General Holding area for all composites, but you could place your composites in any

  • categoryMarket
  • categoryGroup
  • categorySector
  • categoryIndustry
  • categoryWatchlist
  • sym = "~" + IndustryID(1);

    AddToComposite( L, sym,"L",1+2+8+16);

    AddToComposite( O, sym,"O",1+2+8+16 );

    AddToComposite( H, sym,"H",1+2+8+16 );

    AddToComposite( C, sym,"C",1+2+8+16 );

    AddToComposite( V, sym, "V",1+2+8+16);

    CategoryAddSymbol(sym,categoryGroup,6);

    Buy=0;

     

    Anthony

    ----- Original Message -----
    From: Dan Clark
    Sent: Sunday, November 20, 2005 10:18 AM
    Subject: RE: [amibroker] Workspace (Markets) problem

    Gary,

     

    Below is the key code that I use to load ATCs.   I use CategoryAddSymbol()to add symbols to a wide variety of Watchlists for different purposes.   Also, you could use the Broker.Application object to remap things.  I use it below to reset the FullName of my ATCs. (The ATC symbol is short and cryptic with the FullName carrying the descriptive info.)

     

    Regards,

     

    Dan.

     

    // Instantiate Broker.Application
    AB =
    CreateStaticObject("Broker.Application");

    //Watchlist Numbers
    WL_NO_WATCHLIST         =
    0   ;
    WLUSStock               =
    20  ;
    WLUSTradable            =
    1   ;
    WLADRTradable           =
    2   ;

    WLKeyIndexes            =
    9   ;

    WLUSSectorIndex         =
    3   ;
    WLUSSectorCapIndex      =
    30  ;
    WLUSSectorHiLow         =
    34  ;
    WLUSSectorCapHilow      =
    35  ;

    WLUSIndustryIndex       =
    4   ;
    WLUSIndustryCapIndex    =
    31  ;
    WLUSIndustryHiLow       =
    38  ;
    WLUSIndustryCapHilow    =
    39  ;

    WLADRSectorIndex        =
    5   ;
    WLADRIndustryIndex      =
    24  ;
    WLADRIndustryByCapIndex =
    23  ;
    WLAllIndexes            =
    49  ;
    WLMktAndSectorIndexes   =
    46  ;


    procedure CompositeLoad(Sym, SymName, CloseVal, OpenVal, HighVal, LowVal, VolVal, OpenIntVal, ATCFlags, TargetWLNbr, AllIndexWLNbr)
       {
       
    //Add To Composite
       
    AddToComposite(CloseVal,   Sym,   "C", ATCFlags);
       
    AddToComposite(OpenVal,    Sym,   "O", ATCFlags);
       
    AddToComposite(HighVal,    Sym,   "H", ATCFlags);
       
    AddToComposite(LowVal,     Sym,   "L", ATCFlags);
       
    AddToComposite(VolVal,     Sym,   "V", ATCFlags);
       
    AddToComposite(OpenIntVal, Sym,   "I", ATCFlags);
      
      
    //Modify Names
       cs          = AB.Stocks(Sym)   ;                    
       cs.FullName = SymName         ;                 

       
    // Add to Watchlists
       
    if (TargetWLNbr == 0)
          
    CategoryAddSymbol(Sym, categoryWatchlist, TargetWLNbr);

       
    if(StrLeft(Sym, 6) == "~Index")
          
    CategoryAddSymbol(Sym, categoryWatchlist, AllIndexWLNbr);  

       
    // Add key Market and Sector Indices to a special Watchlist

       // Note that WLMktAndSectorIndexes is a Global variable to the procedure.
       
    if (   StrLeft(Sym, 15) == "~Index_ADR_Sec_"
          OR
    StrLeft(Sym, 13) == "~Index_ADRMkt"
          OR
    StrLeft(Sym, 16) == "~Index_NasdaqMkt"
          OR
    StrLeft(Sym, 14) == "~Index_NYSEMkt"
          OR
    StrLeft(Sym, 12) == "~Index_USMkt"
          OR
    StrLeft(Sym, 12) == "~Index_USSec"
          )
          
    CategoryAddSymbol(Sym, categoryWatchlist, WLMktAndSectorIndexes);  
       }

     


    From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Gary
    Sent: Friday, November 18, 2005 9:21 AM
    To: amibroker@xxxxxxxxxxxxxxx
    Subject: [amibroker] Workspace (Markets) problem

     

    I had a whole bunch of different AddToComposite calculations (sector
    performance calculations, my personalized composite calculations, etc).

    Everything seems to be piling up on Market253, I tried to make them
    more organized by naming them with the same in the first couple of
    letters so then they will be grouped together, but still, as my ideas
    are growing, now Market253 looks like a garbage can to me.
    It seems that AmiBroker was not designed very well to handle this
    situation.

    Is there a way to direct ATC calculation into different place other
    than Market253?
    Any ideas will be appreciated!


    Thanks,

    Gary.






    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