PureBytes Links
Trading Reference Links
|
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
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|