How to Import No.of Trades data into Amibroker

Dear Seniors,

Is there any way to import the No.of Trades data from a csv file?

I am able to import Open,High,Low,Close,Volume,OpenInterest data using the below format file. Please let me know if there is any way to import the additional data (" No.of Trades") also.

# Format definition file generated automatically
# by AmiBroker's ASCII Import Wizard
$FORMAT Ticker, Date_YMD, Open, High, Low, Close, Volume, OpenInt
$OVERWRITE 1
$SKIPLINES 0
$SEPARATOR ,
$CONT 1
$AUTOADD 1
$DEBUG 1

I came across this post , hope it serves the purpose
https://www.amibroker.com/kb/2015/01/29/importing-auxilliary-data-into-amibroker-database/

Thank you

Hello amisur,

to import ASCII data (.csv) please study:

https://www.amibroker.com/guide/d_ascii.html

I understand you want to import your "number of trades" for example during your trading day (EOD) in AB quote value := Aux1.

There are many ways to import ASCII data (.csv) files. AB needs two files for importing data, your "ASCII.csv" and one associated "format" file to define correct quote values and commands during the import process. The simplest way is to use AB Menu - File - "Import ASCII...". This AB task is using "C:\Program Files\AmiBroker\Formats\default.format" as format file.

In the following example the "number of trades" are stored as last value in ASCII data (.csv) for your import procedure.

Steps to do:

  1. Create a "New" and empty AB Database for your testing ...
  2. Backup your current "default.format" file
  3. Change file content of "default.format" and store that file:
$FORMAT TICKER, DATE_YMD, TIME, OPEN, HIGH, LOW, CLOSE, VOLUME, AUX1
$SKIPLINES 0
$SEPARATOR ,
$CONT 1
$GROUP 0
$AUTOADD 1
$OVERWRITE 1
$DEBUG 0
  1. Your "ASCII.csv" to import should look like:
ADS.DE,20200619,17:29:59,240.9,245,235.1,236.6,10389,2,
ADS.DE,20200622,17:29:59,235.9,237.6,232.9,237.3,10342,5,
ADS.DE,20200623,17:29:59,237.1,244.9,236.6,241.3,12892,10,
ADS.DE,20200624,17:29:59,242.9,243.4,234.1,235.2,12359,4,
ADS.DE,20200625,17:29:59,235.4,241.4,232.2,240.3,11648,3,
ADS.DE,20200626,17:29:59,235.9,241,232,232.5,14329,15,
ADS.DE,20200629,17:29:59,231.3,234.8,228.2,232.4,14516,0,
ADS.DE,20200630,17:29:59,233.5,235,230.8,232.8,7670,0,
ADS.DE,20200701,17:29:59,234.4,237.2,229.3,235.6,11873,0,
ADS.DE,20200702,17:29:59,236.1,246,235.6,242.4,24355,0,
  1. Select "ASCII.csv" via AB Menu - File - "Import ASCII..." and execute the AB import process

  2. If everything is well you can check your import via AB Menu - Symbol - "Quote Editor...", in any other case of error you will find/read generated error-log

AB_Quote_Editor

regards, Peter

@ Pietro

I am able to successfully import and plot the Aux1 data. Thank you for the detailed explanation.