[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Export help



PureBytes Links

Trading Reference Links

hello,

i use the following modified for-loop.
you find it at the end of export.js file.
it produces the following output:

$SEPARATOR ,
$FORMAT Ticker,Date_YMD,Open,High,Low,Close,Volume
NDX.X,2002-6-3,093500,1205.2,1205.2,1200.49,1205.15,0
NDX.X,2002-6-3,094000,1205.18,1205.850,1202.63,1205.850,0
...

hope this helps
cheers
BM

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() + "," +

// additional lines
    ((oDate.getHours()  <10) ? "0" : "") + oDate.getHours()   +
    ((oDate.getMinutes()<10) ? "0" : "") + oDate.getMinutes() +
    ((oDate.getSeconds()<10) ? "0" : "") + oDate.getSeconds() + "," +
// end of additional lines

     FormatFloat( oQuote.Open ) + "," +
     FormatFloat( oQuote.High ) + "," +
     FormatFloat( oQuote.Low ) + "," +
     FormatFloat( oQuote.Close ) + "," +
     Math.round( oQuote.Volume )  );

}


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/