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

[amibroker] help with weighted index



PureBytes Links

Trading Reference Links

Hi all
can any one please tell me what is wrong withe wight part in this code

weight = IIf( Name() == "elsh", 5,
IIf( Name() == "unit", 4,
IIf( Name() == "elka", 6,
IIf( Name() == "ocdi", 7,
IIf( Name() == "arei", 3,
IIf( Name() == "mnhd", 3,
IIf( Name() == "heli", 2,
0 ) ) ) ))));

AddToComposite( Close, "~housing", "X" );
AddToComposite( V , "~housing", "V" );
AddToComposite( 1, "~housing", "I" );

Buy = 0;
Graph0 = Foreign( "~housing", "C" )/Foreign( "~housing", "I" );

this code produces zero , but when i remove the weight part everything 
is ok and i get my curve
thanks in advance
Waleed


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/