Hi all,

I use interactive brokers intraday quotes on my computer at work. I 
would like to save a copy of the S&P 500 1 minute bars and accumulate 
them. There is a JS script which we can run to export quotes from 
Amibroker to a CSV format. However it works fine for EOD data but 
when I export the intraday data no time data is added to each row.

Question 1: Does anyone know how to add the time to the existing JS 
script? see below for extract of amibroker supplied export.js script

Question 2: Does anyone know if there is a free source for 1 minute 
bars for S&P 500, russell 2000, DJI.

Thank you advance for your help...

Regards, Tony

// extract from standard export.js script supplied by amibroker.
// no timestamp on date
f.WriteLine("$SEPARATOR ,");
f.WriteLine("$FORMAT Ticker,Date_YMD,Open,High,Low,Close,Volume")

for( i = 0; i < Qty; i++ )
{
        oQuote = oStock.Quotations( i );

        var oDate = new Date( oQuote.Date );

        f.WriteLine(    oStock.Ticker + "," + 
                        oDate.getFullYear() + "-" + (oDate.getMonth()
+1) + "-" + oDate.getDate() + "," + 
                        FormatFloat( oQuote.Open ) + "," + 
                        FormatFloat( oQuote.High ) + "," +
                        FormatFloat( oQuote.Low ) + "," +
                        FormatFloat( oQuote.Close ) + "," + 
                        Math.round( oQuote.Volume )  );
}



Reply via email to