<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to export quotations from AmiBroker to CSV file ?</title>
	<atom:link href="http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/</link>
	<description>Providing you with tips &#038; tricks for everyday AmiBroker use</description>
	<lastBuildDate>Tue, 29 Mar 2011 08:43:54 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tomasz Janeczko</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-1597</link>
		<dc:creator>Tomasz Janeczko</dc:creator>
		<pubDate>Sun, 30 Sep 2007 07:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-1597</guid>
		<description>The line has lost original formatting, there should be one backslash before &#039;n&#039;,
as follows:
StrFormat(&quot;,%06.0f,%06.0f,%g,%g,%g,%g,%g,%g\\n&quot;,</description>
		<content:encoded><![CDATA[<p>The line has lost original formatting, there should be one backslash before &#8216;n&#8217;,<br />
as follows:<br />
StrFormat(&#8221;,%06.0f,%06.0f,%g,%g,%g,%g,%g,%g\n&#8221;,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram vilas</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-1595</link>
		<dc:creator>Ram vilas</dc:creator>
		<pubDate>Sat, 29 Sep 2007 17:20:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-1595</guid>
		<description>The above (2nd one) code is giving out a csv file for every symbol separately, and also when i open a file in excel i can see all the data in a single row.can you please help me by correcting this code.</description>
		<content:encoded><![CDATA[<p>The above (2nd one) code is giving out a csv file for every symbol separately, and also when i open a file in excel i can see all the data in a single row.can you please help me by correcting this code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AFL</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-1573</link>
		<dc:creator>AFL</dc:creator>
		<pubDate>Sun, 26 Aug 2007 07:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-1573</guid>
		<description>How to separate day/time column to day column and time column? eg. 10-10-07 10:30 to 10/10/07 and 10:30</description>
		<content:encoded><![CDATA[<p>How to separate day/time column to day column and time column? eg. 10-10-07 10:30 to 10/10/07 and 10:30</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AmiBroker Knowledge Base &#187; How to combine two databases into one</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-87</link>
		<dc:creator>AmiBroker Knowledge Base &#187; How to combine two databases into one</dc:creator>
		<pubDate>Mon, 16 Oct 2006 10:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-87</guid>
		<description>[...] 1) Export quotations from one database to the ASCII files and reimport quotes from another database (export procedure is described in the following article in the Knowledge Base http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/ ) [...]</description>
		<content:encoded><![CDATA[<p>[...] 1) Export quotations from one database to the ASCII files and reimport quotes from another database (export procedure is described in the following article in the Knowledge Base <a href="http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/ )" rel="nofollow">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/ )</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomasz Janeczko</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-54</link>
		<dc:creator>Tomasz Janeczko</dc:creator>
		<pubDate>Thu, 06 Jul 2006 08:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-54</guid>
		<description>You can not export to Metastock directly, but you can export to text file and later use Equis Downloader to import text files to Metastock.</description>
		<content:encoded><![CDATA[<p>You can not export to Metastock directly, but you can export to text file and later use Equis Downloader to import text files to Metastock.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-53</link>
		<dc:creator>jim</dc:creator>
		<pubDate>Thu, 06 Jul 2006 03:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-53</guid>
		<description>is there anyway to export all datas to Metastock format ?</description>
		<content:encoded><![CDATA[<p>is there anyway to export all datas to Metastock format ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomasz Janeczko</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-5</link>
		<dc:creator>Tomasz Janeczko</dc:creator>
		<pubDate>Tue, 07 Mar 2006 00:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-5</guid>
		<description>Yes that&#039;s true, this code sample was designed to be easy and output was not intended to be re-imported to AmiBroker. There are other ways to export of course, including using file functions as shown in the code below that does what you asked for (exports date in fixed YYMMDD format and times in HHMMSS 24-hour format).
&lt;br&gt;

&lt;afl&gt;
fh = fopen( &quot;DataFor&quot;+Name()+&quot;.csv&quot;, &quot;w&quot; );
if( fh )
{
  fputs(&quot;Symbol,Date,Time,Open,High,Low,Close,OpenInt,Volume\\n&quot;, fh );

  dn = DateNum();
  tn = TimeNum();
 
  for( i = 0; i &lt; BarCount; i++ )
  {
   Line = Name() +
   StrFormat(&quot;,%06.0f,%06.0f,%g,%g,%g,%g,%g,%g\\n&quot;,
   dn[ i ] % 1000000,
   tn[ i ],
   Open[ i ],
   High[ i ],
   Low[ i ],
   Close[ i ],
   OpenInt[ i ],
   Volume[ i ] );
  
   fputs( Line, fh );
  }
 
  fclose( fh );
}

Buy=Sell=0; // for scan
Filter = Status(&quot;lastbarinrange&quot;);
AddTextColumn(&quot;Export done&quot;, &quot;Status&quot;);
&lt;/afl&gt;</description>
		<content:encoded><![CDATA[<p>Yes that&#8217;s true, this code sample was designed to be easy and output was not intended to be re-imported to AmiBroker. There are other ways to export of course, including using file functions as shown in the code below that does what you asked for (exports date in fixed YYMMDD format and times in HHMMSS 24-hour format).<br />
</p>
<p><code><span>fh&nbsp;</span><span style="color: #000000">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #000000">(&nbsp;</span><span style="color: #DD0000">&quot;DataFor&quot;</span><span style="color: #000000">+</span><span style="color: #0000BB">Name</span><span style="color: #000000">()+</span><span style="color: #DD0000">&quot;.csv&quot;</span><span style="color: #000000">,&nbsp;</span><span style="color: #DD0000">&quot;w&quot;&nbsp;</span><span style="color: #000000">);<br />
if(&nbsp;</span><span style="color: #0000BB">fh&nbsp;</span><span style="color: #000000">)<br />
{<br />
&nbsp;&nbsp;</span><span style="color: #0000BB">fputs</span><span style="color: #000000">(</span><span style="color: #DD0000">&quot;Symbol,Date,Time,Open,High,Low,Close,OpenInt,Volume\n&quot;</span><span style="color: #000000">,&nbsp;</span><span style="color: #0000BB">fh&nbsp;</span><span style="color: #000000">);</p>
<p>&nbsp;&nbsp;</span><span style="color: #0000BB">dn&nbsp;</span><span style="color: #000000">=&nbsp;</span><span style="color: #0000BB">DateNum</span><span style="color: #000000">();<br />
&nbsp;&nbsp;</span><span style="color: #0000BB">tn&nbsp;</span><span style="color: #000000">=&nbsp;</span><span style="color: #0000BB">TimeNum</span><span style="color: #000000">();<br />
&nbsp;<br />
&nbsp;&nbsp;for(&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #000000">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">&lt;&nbsp;</span><span style="color: #0000BB">BarCount</span><span style="color: #000000">;&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #000000">++&nbsp;)<br />
&nbsp;&nbsp;{<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Line&nbsp;</span><span style="color: #000000">=&nbsp;</span><span style="color: #0000BB">Name</span><span style="color: #000000">()&nbsp;+<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">StrFormat</span><span style="color: #000000">(</span><span style="color: #DD0000">&quot;,%06.0f,%06.0f,%g,%g,%g,%g,%g,%g\n&quot;</span><span style="color: #000000">,<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">dn</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">]&nbsp;%&nbsp;</span><span style="color: #0000BB">1000000</span><span style="color: #000000">,<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">tn</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">],<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Open</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">],<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">High</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">],<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Low</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">],<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Close</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">],<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">OpenInt</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">],<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Volume</span><span style="color: #000000">[&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #000000">]&nbsp;);<br />
&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fputs</span><span style="color: #000000">(&nbsp;</span><span style="color: #0000BB">Line</span><span style="color: #000000">,&nbsp;</span><span style="color: #0000BB">fh&nbsp;</span><span style="color: #000000">);<br />
&nbsp;&nbsp;}<br />
&nbsp;<br />
&nbsp;&nbsp;</span><span style="color: #0000BB">fclose</span><span style="color: #000000">(&nbsp;</span><span style="color: #0000BB">fh&nbsp;</span><span style="color: #000000">);<br />
}</p>
<p></span><span style="color: #0000BB">Buy</span><span style="color: #000000">=</span><span style="color: #0000BB">Sell</span><span style="color: #000000">=</span><span style="color: #0000BB">0</span><span style="color: #000000">;&nbsp;</span><span style="color: #007000">//&nbsp;for&nbsp;scan<br />
</span><span style="color: #0000BB">Filter&nbsp;</span><span style="color: #000000">=&nbsp;</span><span style="color: #0000BB">Status</span><span style="color: #000000">(</span><span style="color: #DD0000">&quot;lastbarinrange&quot;</span><span style="color: #000000">);<br />
</span><span style="color: #0000BB">AddTextColumn</span><span style="color: #000000">(</span><span style="color: #DD0000">&quot;Export&nbsp;done&quot;</span><span style="color: #000000">,&nbsp;</span><span style="color: #DD0000">&quot;Status&quot;</span><span style="color: #000000">);</span></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham Kavanagh</title>
		<link>http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/comment-page-1/#comment-4</link>
		<dc:creator>Graham Kavanagh</dc:creator>
		<pubDate>Mon, 06 Mar 2006 23:53:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.com/kb/2006/03/04/how-to-export-quotations-from-amibroker-to-csv-file/#comment-4</guid>
		<description>From experience of this if you intend to import this data back into Amibroker, you need to make certain your windows date and time formats are compatible with the AB ascii import formats. eg time to be in 24 hour clock</description>
		<content:encoded><![CDATA[<p>From experience of this if you intend to import this data back into Amibroker, you need to make certain your windows date and time formats are compatible with the AB ascii import formats. eg time to be in 24 hour clock</p>
]]></content:encoded>
	</item>
</channel>
</rss>

