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

[amibroker] How to use AddToComposite to save Highest values ??



PureBytes Links

Trading Reference Links


I'm using the following scan in an effort to save the highest Volume 
of a small group of symbols in a composite ticker (in other words: 
within that group determine the symbol with the highest Volume and 
save that particular Volume value in the "V" field of ~MyIndex):

AddToComposite(0,"~MyIndex","V");
AddToComposite(IIf(V>Foreign("~MyIndex","V"),V-Foreign
("~MyIndex","V"),0),"~MyIndex","V");

My non-programmer step-by-step logic tells me this should work but 
the result is not the Highest volume but instead the SUM of all 
Volumes. 

Anybody knows what's wrong and/or a different scan to accomplish this?

Thanks in advance!!

-treliff





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/