Delete Quotes that have time-seconds value of 00
-------------------------------------------------------
Can anyone help in modifying below script (by Ami's TJ), to delete only those quotes that have time-seconds value = 00.
Example,
if time value = 12:31:59, correct value
if time value = 12:31:00, WRONG value --- Delete this quote but not the above one.
Some one who knows scripting could please help..
-------------------------------------------------------
Can anyone help in modifying below script (by Ami's TJ), to delete only those quotes that have time-seconds value = 00.
Example,
if time value = 12:31:59, correct value
if time value = 12:31:00, WRONG value --- Delete this quote but not the above one.
Some one who knows scripting could please help..
PHP:
// THIS IS NOT AFL
// This is Windows script to be run from the outside of AmiBroker
function RemoveQuotesWithZeroVolume( Name )
{
AB = new ActiveXObject("Broker.Application");
Stk = AB.Stocks( Name );
Quotes = Stk.Quotations;
iQty = Quotes.Count;
cnt = 0;
for( i = iQty - 1; i >= 0; i-- )
{
qt = Quotes.Item( i );
if( qt.Volume == 0 )
{
cnt++;
Quotes.Remove( i );
}
}
AB.RefreshAll();
return cnt;
}
n = RemoveQuotesWithZeroVolume("MSFT");
WScript.Echo ( "Removed " + n + " quotes with zero volume" );