PureBytes Links
Trading Reference Links
|
I have duplicate tickers symbols in my database and am trying to
modify a clean-up script to correct this. The code does not recognize
when the two symbols are equivalent. Can someone tell me where I am
going wrong in this code:
___________________________________________________
var oAB = new ActiveXObject("Broker.Application");
var oStocks = oAB.Stocks;
var StockQty = oStocks.Count;
WScript.echo("Total stocks = " + StockQty);
for( i = 0; i < StockQty; i++)
{
ostock = oStocks(i);
ostock1 = oStocks(i+1);
WScript.Echo("stock 1 = " + ostock.Ticker + ", stock 2 = " +
ostock1.Ticker ); /*This works fine shows ticker ostock == ostock1 */
if(ostock.Ticker == ostock1.Ticker) /*this never returns true??*/
{
WScript.Echo("About to delete " + ostock1.Ticker);
oStocks.Remove.ostock1.Ticker;
}
}
WScript.Echo("Cleanup script finished" );
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/
|