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

[amibroker] Re: create custom weighted index



PureBytes Links

Trading Reference Links

Thanks Brian, I will try working with that!


--- In amibroker@xxxxxxxxxxxxxxx, "brian_z321" <brian_z321@xxx> wrote:
>
> --- In amibroker@xxxxxxxxxxxxxxx, "carlacash26" <carlacash26@> 
> wrote:
> >
> > Hi, hope you could help me in creating my own custom index.
> > 
> > I have 8 stocks that I would like to include in the index, and each 
> > of the stocks have their own weighting in the index;
> 
> Hello carlacash,
> 
> Tomasz provided some code that makes a good starting point at 
> message #92589.
> 
> Weigted composite:
> 
> weight = IIF( Name() == "MSFT", 5,
>                 IIF( Name() == "INTC", 4,
>                 IIF( Name() == "AAPL", 6,
>                 IIF( Name() == "GOOG", 7,
>                                                            0 ) ) ) );
> 
> AddToComposite( weight * array, "~COMPNAME", "X" );
> AddToComposite( weight , "~COMPNAME", "V" );
> 
> Regards,
> 
> Brian_Z
>




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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/