AmiQuote is in essence a multi-threaded web browser, with some basic data processing capabilities, that downloads the content of web pages but instead of displaying them to you as web page, stores the downloaded content in a file.
The general flow of how AmiQuote gets data from remote web site and how it feeds it to AmiBroker looks as follows. The "Remote server" is a web site like Yahoo Finance, Tiingo, or whatever else you choose.
As you can see from diagram above, after the user has started the download the following things happen:
-
AmiQuote request the web page for given symbol from remote server
-
Remote server prepares the page
-
Remote server sends back the response (requested page content)
-
AmiQuote reads received response and makes basic processing. Processing may include just adding some header or may be done by user-defined script (Javascript). Generally processing is very simple and should be considered as "formatting" operation, without changing the data.
-
Once text is processed it is saved into text file in the AmiQuote download folder
-
Once text is saved AmiQuote asks AmiBroker (using OLE automation) to import downloaded file using import definition file stored in "Formats" subdirectory (under AmiBroker folder)
-
AmiBroker imports the text file, converts it into binary representation and stores it into its own binary database.
-
At this point updated data are shown in AmiBroker
Please note that AmiQuote downloads and saves text files.
These files cannot be directly used, they have to be imported into AmiBroker. This happens after files are downloaded and saved on disk by AmiQuote into Download folder
AmiBroker while doing the import, reads the text file and converts text to internal binary representation that is later stored in AmiBroker native database.
AmiBroker database is completely separate and your AmiQuote Download folder must NOT point to the same location. AmiQuote Download folder is used only as temporary store for downloaded files and must be in different location.
The default location of AmiQuote download folder is C:\Program Files\AmiBroker\AmiQuote\Download
and you should NOT change it under normal circumstances.
The default location for database in AmiBroker is C:\Program Files\AmiBroker\Databases\Data
General rule for beginner is: DO NOT change defaults. They are designed to work out-of-the-box. Everything will work fine if you just keep them as they are.
More about AmiBroker databases:
More about ASCII import: