Write trade data to disk - From Quantitative Technical Analysis by Howard Bandy

You can find an example that includes writing out the date to a file here: AmiBroker Knowledge Base » How to export quotes to separate text files per symbol

Also, make sure you verify your license when using the forum.