Hello,
Could I prevent auto download quotes when run auto update quotes , and skip zero volume quotes
from yahoo data source
Hello,
Could I prevent auto download quotes when run auto update quotes , and skip zero volume quotes
from yahoo data source
Your questions falls under category of "SMS style" and is unclear. Please follow this: How to ask a good question
If I were to answer it as it is now, I would say: if you don't want to download quotes, don't run auto-update. Because auto-update actually means download and import.
I believe I know what chunwai is asking. Let me try (since this bothers me as well): Whenever I select Tools>Auto-update quotes ...., it immediately begins downloading quotes for all equities in my active watchlist. This will happen even after I have already downloaded all the quotes I desire, except for one or a few equities that I have just now added by placing them in the equity bar at the top of the AB window. I would much rather Tools>Auto-update quotes patiently wait for me to tell it exactly what I want it to do. If I do want all files to be updated, it takes only one more simple mouse click on my part, GreenArrow.
If I add a new symbol. I simply open amiquote separately. Could keep it as shortcut or a simple windows key+amiquote search gets me going then I manually add symbol.
Could save the list as a .tls file and load it manually into amiquote and use it that way.
I write a js script can remove all zero volume quotes from yahoo database. But it is little slow.
//db_path == "c:\\Program Files (x86)\\AmiBroker\\YahooHK"
//AB.LoadDatabase("c:\\Program Files (x86)\\AmiBroker\\YahooHK"
AB = new ActiveXObject("Broker.Application");
db_path = AB.DatabasePath;
if (db_path == "c:\\Program Files (x86)\\AmiBroker\\yahoohk_adj"){
var tickerList = AB.Stocks.GetTickerList(1);
var arr = tickerList.split(',')
for (var j= 0;j < arr.length;j++){
Stk = AB.Stocks( arr[j] );
Quotes = Stk.Quotations;
iQty = Quotes.Count;
cnt = 0;
for( i = iQty - 1; i >= 0; i-- )
{
qt = Quotes.Item( i );
if( qt.Volume == 0 || qt.Low > qt.Close)
{
cnt++;
Quotes.Remove( i );
}
}
if (j == arr.length-1)
WScript.Echo ( "Removed " + arr[j] + " quotes with zero volume" );
}
AB.RefreshAll();
}else{
WScript.Echo ( "Database is not YahooHK" );
}
Or you can help me improve these code.