AB imports correctly, was: AB Format can not load it (user error)

My data provider in UK (ShareScope) provides me to download data; but there is always a comma (,) at the end.

e.g.
Ticker,Date,Open,High,Low,Close,Vol 2td ago,Exchange code,Index membership,Name,
UKX,23/03/2026,9918.48,10036.7,9670.46,9894.15,1166320000,FTSE,,FTSE 100,

Due to this comma at the end, AB Format file can not load this data file. I have to remove this comma manually and then it gets loaded using the format below. I load 5 separate files daily FTSE, NASDAQ, SP500, ETFs and Indices to maintain separate watchlists for my different systems. So I can't merge everything in 1 file. So everyday I have to edit 5 files after downloading data to remove the comma. It's ok, it takes only 30 secs may be; but want to know if there is a solution.

Format file:-

My AB Format file to load this data is

Format definition file generated automatically

by AmiBroker's ASCII Import Wizard

$FORMAT Ticker, Date_DMY, Open, High, Low, Close, Volume, APPENDNAME, Alias, Fullname
$SKIPLINES 1
$SEPARATOR ,
$MARKET 3
$GROUP 3
$WATCHLIST 6
$AUTOADD 1
$CONT 1
$NOQUOTES 1
$DEBUG 1

Nonsense.
It imports just fine.
You can use SKIP field in definition file for any fields you want to skip

I tried SKIP; but honestly it is not working for my case.
I have uploaded 1 single line data file that I am trying to load and shown the format file I am using below along with what import.log shows.

I think it is perhaps because there is no data to skip after the last comma. No sure; but please use the file I have uploaded (that's how I get it from the data provider) and see if you can upload it.

Data file on google drive, publicly accessible:

Format file:

$FORMAT Ticker,Date_DMY,Open,High,Low,Close,Volume,APPENDNAME,Alias,Fullname,SKIP
$SKIPLINES 1
$SEPARATOR ,
$MARKET 3
$GROUP 3
$WATCHLIST 6
$AUTOADD 1
$CONT 1
$NOQUOTES 1
$DEBUG 1

Import.log shows:

Logging started for 'F:\Data_Download\UKX_IndexToday.csv' file, using format definition file 'Formats\Index_ETFs_Funds.format'

So, there is no error in the log.
Besides your data format defininition is bizarre. Why are you using $NoQUOTES flag? Don’t you want to import quotes? ??? If you want to import quotes don’t use $NOQUOTES flag.

2 Likes

Works fine for me too.

Hi @mradtke, can you share your format file that worked for you please?

I tried SKIP and removed $NOQUOTES as Thomasz suggested, yet it is not loading my data file (the one that I uploaded on google drive).

My AB version is 6.2

thanks
Sam

@samir

I no longer have version 6.2, but I tested it with 6.43.1. It works correctly with your posted format file (after removing the $NOQUOTES line).

The only issue I noticed is with the date in the downloaded file: the format 24/3/26 (two‑digit year), in that old version, gets imported as 1926. Using the full year 24/3/2026, as in your original post , imports perfectly.

No problems with the trailing comma.

3 Likes

The file data i see is 4 digit though.

Anyway, it's been said many times to use 4 digit year instead of 2.

@beppe, very kind of you to put your time and efforts to test it and find the real problem.

Yup the problem is with 2 digit year. I never noticed it because once I download the data from the provider as .csv file, I open it using excel and excel automatically shows 4 digit year; but when I open it using a text editor it shows that the actual data is 2 digit year.

Once I fix that to 4 digit year then it works.

I have to raise this as an issue with the data provider.

Very much appreciate your help.

Thanks
Sam

1 Like

Or upgrade your AmiBroker.

The version you are using 6.20 was released in 2017. That is nearly TEN YEARS AGO. It is time to upgrade, you know.

Version 7.00 interprets two digit years <30 as 20YY. Version 6.20 (TEN YEAR OLD) interprets two digit year <25 as 20YY.

Now it is 2026. It is time TO UPGRADE after TEN years.

4 Likes