Incorrect date in data file, was: ASCII quotations not importing

The ASCII importer created entries for new symbols from a file that looks like this (I used $SKIPLINES 1 and $FORMAT Ticker,Fullname):.

Ticker,Full name
Corn1720M,Corn U.S. monthly

No errors displayed. So far so good. The symbols file seems correct.

In a subsequent operation, the ASCII importer is not importing data from the quotation files. No error message is obvious, and no data appears in the chart or in Quote Editor.

Here is an example of a quotation file ($SKIPLINES 1 and $FORMAT Date_YMD,Close and $ALLOWNEG 1)

Corn U.S. 1720 monthly,Close

Perhaps I am omitting a command to use when importing quotation files?

I have tried $OVERWRITE 1 with no obvious effect.

If I attempt to load the Corn data file with the Wizard directly, without a previous creation of the symbol in AB, everything works without error, so I believe the quotation file is correct.

Best regards,

First you should use IMPORT WIZARD instead. It is easier to use and helps NOT to forget about important commands (like $DEBUG 1) Secondly, don't use $ALLOWNEG - it is only needed for negative prices (which is extremely rare). $OVERWRITE is NOT needed at all, unless you are modifying non-quotation data.

Also you should look into import.log file.

Quite obviously your second data file has incorrect date and this is the reason why data are not imported.

17200201 <--- this is wrong date

Only data starting from January 1st, 1900 can be used and correct date in YYYYMMDD format would look like this 19000101


Thanks for the prompt response! :grinning:
Edit: Adding screenshot.

As I wrote, only dates from January 1st, 1900 are supported. The fact that you can import earlier dates and they would appear in Quote Editor does not mean that they can be used later. They can't. One of many reasons (not the only) is DateNum() function which is returning YYYMMDD format which holds year starting from 1900, so 1900 January 1st is 000101 and there is no room for earlier dates.

I am always wondering why people do that (start debate when there is no debate). You forget the fact that I WROTE the entire program, so I know it much much better than anyone else on planet Earth. So if I say something about AmiBroker it is ultimate answer and there is no "but".

Thanks for the follow-up!