Amibroker Data Plugin Source Code
AmiBroker::Plugin* CreatePlugin()
The typical C++ implementation for a basic ASCII-based data plugin looks like this: // From official ADK samples GetQuotesEx(LPCTSTR pszTicker, nPeriodicity, nLastValid, Quotation *pQuotes, GQEContext *pContext) { amibroker data plugin source code
This function is invoked during backtests, scanning, and charting. It asks for a range of bars for a specific ticker. Writing this correctly is the most complex part of the . AmiBroker works in internally
AmiBroker works in internally. If you provide tick data, the engine compresses it. If you provide daily data, it’s fine. But your source code must correctly set the interval parameter in GetQuotesEx . But your source code must correctly set the
class CSVPlugin : public AmiBroker::Plugin
: Called when the DLL is loaded; used for general initialization.
// Allocate provider context DBPROVIDER* pProv = (DBPROVIDER*)calloc(1, sizeof(DBPROVIDER)); // Example: Connect to a local time-series database pProv->dbHandle = my_tsdb_connect(name);