Big dummy me keeps overlaying my intraday data base with daily data. 
I am writing a script to delete the quotes that are day only. I have 
the script written to the point where I can tell which bar is a day 
only bar,  hour, min or sec are all 0. But when I try to remove the 
quote I can't figure the syntax of the command. This is where I am 
now - 

for( i = 0; i < numStocks;  i++ )
{
        oStock = oStocks( i );
        WScript.Echo(oStock.Ticker);
        var qty = oStock.Quotations.Count;
        for(j = 0; j < qty; j++)
        {
            oQuote = oStock.Quotations( j );
            var oDate = new Date( oQuote.Date ); // create date object
            WScript.Echo("This is the date "+ oDate);
            hour = oDate.getHours(); // get hour
            min  = oDate.getMinutes(); // get minute
            sec  = oDate.getSeconds(); // get second
            WScript.Echo("This is the hour " + hour +" min " + min 
+ " sec "+sec );
            // if hour min and sec are 0 delete bar
            if (hour == "0" && min == "0" && sec == "0" )
            {
                     oQuote.Remove(); // this is where it fails
            }
  }
}

oQuote shows the correct quote data and the date is correct. But when 
I try to use oQuote.Remove() the script host says there is no such 
function. What is the correct syntax for the Remove() statement?

Or if there is an easier way please let me know, especially if this 
can be done in  Scan or an indicator. Scripts are sloooo.

Thanks,
Barry

Reply via email to