: This SDK handles multithreading and memory management, which are notoriously difficult in native C++ plugin development. 3. Specialty & Open-Source Projects
Store connection strings and API keys encrypted via CryptProtectData to avoid plain-text credentials in the registry.
pInfo->ulSize = sizeof(PluginInfo); pInfo->ulVersion = AB_PLUGIN_VERSION; pInfo->ulPluginType = PLUGIN_TYPE_DATA; strcpy(pInfo->szPluginName, "My Top Data Source"); amibroker data plugin source code top
This path is significantly easier for many developers. The .NET SDK abstracts away much of the complexity of the native plugin interface. However, this comes with potential overhead. You have to consider the performance implications of marshaling data between managed code and AmiBroker's native environment. Nonetheless, for many applications, the trade-off is more than worth it for the vast reduction in development complexity.
The open‑source community has produced several high‑quality data plugins whose source code you can study, fork, and extend. Below are the most prominent examples. : This SDK handles multithreading and memory management,
Understanding the AmiBroker API landscape is crucial for plugin developers. A key point to note is that AmiBroker has been using two different APIs in parallel. The older API (v1), used for AFL plugins, exposes function tables and is considered stable—it might be okay to create a new plugin today using this interface. However, the newer API (v2) is used for data plugins. The source code for this v2 API, which is the focus of this article, is almost exclusively available within the AmiBroker Development Kit (ADK) and has been stable for many years, ensuring that a well-written plugin will remain compatible across AmiBroker versions 6.0, 7.0, and beyond.
For advanced data sources, you may implement these optional exports: GetStatus() You have to consider the performance implications of
Telling AmiBroker if you support intraday, real-time, or EOD data.
Supplies end-of-day (EOD) or historical intraday bars upon request.
AmiBroker is renowned in the quantitative trading community for its lightning-fast backtesting engine. However, the software is only as good as the data feeding it. While standard data vendors offer pre-built plugins, creating a custom data plugin allows you to stream proprietary data, connect to niche crypto exchanges, or integrate low-latency institutional feeds directly into AmiBroker.