Formatting a File for Quote Import

I’m not looking for a solution, just some advice/point outs of how to approach this natively to AmiBroker if possible. I have access to a data source that provides data I would like to import into AmiBroker. The files are .csv and each row has a date and a value. However, the “symbol” is located as a column header. Is there a way to import this directly via AB code or AmiQuote or will file manipulation of some sort be required to move (and copy) the symbol to each row?

Thanks!

Make sure that the file has symbol name, i.e. AAPL.csv. And in import format file (that you create when using File-Import Wizard) simply skip the header. (Then use File-Import Ascii or use OLE automation for all subsequent imports.)

“Problem” solved.

1 Like

Thank you for your suggestions. I should have added there are multiple columns.

So
Col Col Col Col
Hdr Hdr Hdr Hdr
Date Val Val Val

Hdr is unique identifier - I.e the “symbol”

Again thanks!

Boy, boy, boy

First you say

and now all of the sudden it turns out as something completely different.
I am really “loving it” wasting time for nothing.

Why are you so vague once again? Why don’t you simply post a precise actual example from your csv file (have you ever heard of copy&paste?)? So Hdr is a different symbol per each column? Why is a symbol in same column as date?? Who makes such stupid formats? And what is Col? Column, Color, Colonel Smith from the A-Team? A header? Or something different too?

Since next time it could be something (very) different again… I’m out.
But considering your recent post (and guessing what each row means) I would say then it is (most probably) not possible to import such format (at once).

A usable format would be like the one in your first post.

Also if there are multiple symbols within one file then an example like this one would work

Date,Symbol,Value
2017-11-25,XXXX,125.00
2017-11-25,YYYY,60.5
2017-11-25,ZZZZ,1.23

etc.

So symbols have to be vertically. Then all symbols together with data can be imported at once.

But in any case, post a reproducible actual example instead of posting different things in each post. It is not wheel of fortune showtime.

The data is proprietary so I will not be posting it here. When I say symbol it is the name of the data not a symbol like MSFT or IBM. The data format is as follows:

Date, NameofDataA, NameofDataB, NameofData C (text)
20170101, ValueA1, ValueB1, ValueC1 (numerical)
20170102, ValueA2, ValueB2, ValueC2
20170103, ValueA3, ValueB3, ValueC3
2017nnnn, ValueAn, ValueBn, ValueCn