For Amibroker | Brokey
While "Brokey" might sound like a new third-party trading tool, it is actually a vital internal component of the AmiBroker ecosystem. Specifically, Brokey.dll is one of the core application files required for the main Broker.exe to function correctly.
Below is a blog-style overview of what this file does and how it fits into your AmiBroker setup. The Mystery of Brokey.dll: AmiBroker’s Engine Room
If you’ve ever poked around your AmiBroker installation folder (usually C:\Program Files\AmiBroker), you’ve likely seen Brokey.dll sitting alongside other essentials like CoolTool.dll and MiscTool.dll.
While it doesn't have a flashy user interface of its own, it is a "load-bearing" file for the platform's advanced operations. 1. What Does Brokey Actually Do?
AmiBroker relies on a modular architecture. Instead of stuffing every single function into the main executable, it offloads specific tasks to DLL (Dynamic Link Library) files.
System Integrity: Brokey.dll is an additional application file that Broker.exe calls upon to run.
Licensing and Activation: Historically, in many software environments, "key" or "brokey" files are associated with license validation. In AmiBroker, ensuring this file is present and untampered with is essential for the software to recognize your Professional or Standard license.
Plugin Communication: It serves as part of the bridge that allows AmiBroker to communicate with external data plugins, such as those for Interactive Brokers or eSignal. 2. Why "Brokey" Matters to You
You generally won't interact with Brokey.dll directly, but you will notice its absence.
Troubleshooting: If you receive errors like "DLL not found" or the program fails to launch, Brokey.dll might be missing or corrupted. Reinstalling from the official AmiBroker download page usually fixes this.
32-bit vs. 64-bit: Note that these files are version-specific. If you are using the Professional Edition, you might have separate 64-bit and 32-bit versions of these libraries. 3. Expanding AmiBroker Beyond the Core
While Brokey.dll is a built-in file, many traders look for "Brokey" because they want to connect to more brokers. For that, you should look into Data Plugins.
Official Plugins: AmiBroker supports high-tier providers like Norgate Data and Interactive Brokers.
Custom Bridges: Tools like OpenAlgo allow you to fetch real-time data from various Indian and international brokers by installing their specific .dll files into the AmiBroker/Plugins folder. Summary Table: Core AmiBroker Files Broker.exe The main application Brokey.dll Vital application support file AmiQuote.exe Companion tool for downloading EOD data HTMLView.exe Used to display your backtest reports
AI responses may include mistakes. For financial advice, consult a professional. Learn more How to use AmiBroker with Interactive Brokers TWS
What is Brokey for Amibroker?
Brokey is a popular plugin for Amibroker, a technical analysis and trading software. Brokey allows users to connect to various data feeds and brokers, enabling them to trade directly from within Amibroker. brokey for amibroker
Key Features of Brokey for Amibroker:
- Multi-Broker Support: Brokey supports connections to multiple brokers, including Interactive Brokers, TD Ameritrade, E*TRADE, and more.
- Real-time Data Feed: Brokey provides real-time data feeds for stocks, options, futures, and forex, allowing users to make informed trading decisions.
- Automated Trading: Brokey enables automated trading strategies to be executed directly from Amibroker, using AFL (Amibroker Formula Language) code.
- Order Management: Brokey provides an order management system, allowing users to manage their trades, including sending, modifying, and canceling orders.
- Position Sizing and Risk Management: Brokey offers advanced position sizing and risk management features, helping users to manage their trading risk.
Benefits of Using Brokey for Amibroker:
- Streamlined Trading: Brokey allows users to trade directly from within Amibroker, eliminating the need to switch between multiple platforms.
- Improved Efficiency: Automated trading and order management features save time and reduce the likelihood of human error.
- Enhanced Analysis: Brokey's real-time data feed and advanced charting capabilities enable users to perform more accurate technical analysis.
System Requirements:
To use Brokey for Amibroker, users require:
- Amibroker version 5.20 or later
- A compatible broker account
- A reliable internet connection
Conclusion:
Brokey for Amibroker is a powerful plugin that enhances the trading experience for Amibroker users. With its advanced features, including multi-broker support, real-time data feeds, and automated trading capabilities, Brokey is an essential tool for traders looking to streamline their trading and improve their performance.
📌 How to Use in AmiBroker
-
Insert Indicator:
Go to Analysis → Custom Indicator → Paste the code → Apply. -
Scan for Trades:
- Open Analysis → Automatic Analysis.
- Select "Exploration" mode.
- Click "Scan".
The list shows stocks/crypto/forex with fresh Brokey signals.
-
Interpretation:
- Orange dotted line = dynamic breakdown threshold.
- Red down arrow = confirmed Brokey signal.
- Price closes below the orange line → momentum shift to sellers.
-
Optimization (Parameters):
- Lookback Periods: 10–30 for day trading, 50+ for swing trading.
- ATR Multiplier: Lower (0.8–1.2) = more signals; higher (1.5–2.5) = only strong breaks.
- Confirmation Bars: 1 (aggressive) to 3 (conservative).
Why use it
- Prevents misleading backtest results and false signals.
- Ensures indicators and scans use clean, continuous data.
- Saves time locating data issues across many symbols.
🔧 AmiBroker Code
// ======================================== // INDICATOR: Brokey (Breakdown Detector) // VERSION: 1.0 // AUTHOR: AI Assistant // ========================================// --- Parameters --- Lookback = Param("Lookback Periods", 20, 5, 100, 1); // Lookback for swing low ATR_Mult = Param("ATR Multiplier", 1.5, 0.5, 3, 0.1); // Sensitivity BreakConfirm = Param("Confirmation Bars", 1, 1, 5, 1); // Bars below support to trigger
// --- Calculation --- // 1. Identify the lowest low in the lookback period (excluding today) SwingLow = Ref(LLV(L, Lookback), -1);
// 2. Calculate a dynamic filter using ATR (Average True Range) ATRVal = ATR(Lookback); SupportLevel = SwingLow - (ATR_Mult * ATRVal);
// 3. Is price breaking down? Breakdown = L < SupportLevel;
// 4. Require confirmation: close below support for X bars Confirmed = Sum(Breakdown, BreakConfirm) >= BreakConfirm;
// 5. Mark the first bar of the confirmed breakdown BrokeySignal = Confirmed AND NOT Ref(Confirmed, -1); While "Brokey" might sound like a new third-party
// --- Plotting --- SetChartOptions(0, chartShowDates | chartShowArrows); SetBarFillColor(IIf(C > O, colorGreen, colorRed));
// Plot price Plot(C, "Price", IIf(C > O, colorBrightGreen, colorRed), styleCandle);
// Plot the dynamic support line Plot(SupportLevel, "Brokey Line", colorOrange, styleDots | styleThick);
// Plot swing low reference Plot(SwingLow, "Recent Swing Low", colorDarkGrey, styleDashed);
// --- Visual Signals --- // Upward arrow on the chart when Brokey triggers PlotShapes(IIf(BrokeySignal, shapeSmallDownTriangle, shapeNone), colorRed, 0, H + (ATRVal * 0.5), -10);
// Alert and exploration filter Filter = BrokeySignal; AddColumn(C, "Close", 1.2); AddColumn(V, "Volume", 1.0); AddColumn(SwingLow, "Swing Low", 1.4); AddColumn(SupportLevel, "Brokey Level", 1.4);
// Optional: Sound alert if (BrokeySignal) SoundBeep(1000, 200);
// --- Commentary --- Title = "NAME - DATE - INTERVAL \n" + "Brokey Level: " + WriteVal(SupportLevel, 1.4) + " | " + "Swing Low (Last " + Lookback + "): " + WriteVal(SwingLow, 1.4) + " | " + "Breakdown Confirmed: " + WriteVal(Confirmed);
What is "Brokey" in Amibroker?
While "Brokey" sounds like a slang term (often used in trading circles to describe a strategy that blew up an account), in the context of Amibroker data management, it refers to Broken Data Keys or Missing Data.
Amibroker relies on a robust database structure. It expects data to be continuous. However, data vendors often provide "dirty" data. Common issues include:
- Missing Days: A stock didn’t trade on a specific day, or the vendor failed to upload the data.
- Zero Volumes: The price exists, but volume is zero (common in illiquid stocks).
- Delistings: A stock stops trading, but your database doesn't mark it as delisted, leading to false signals.
If your Amibroker database has these "holes," the backtester will skip over them or misinterpret them, leading to Survivorship Bias and wildly inaccurate results.
3. Persistent Annotations
One of Amibroker’s biggest annoyances is that manually drawn lines can vanish when you change timeframes or reload data. Brokey stores drawing data in external files or database fields, ensuring your annotations remain intact across sessions. Your weekly analysis won’t disappear on a Monday morning restart.
Conclusion: Is Brokey Worth It?
Absolutely, if you are a serious discretionary trader using Amibroker. Brokey transforms Amibroker’s utilitarian charts into a professional-grade visual workspace. The combination of precise labeling, persistent drawings, and Fibonacci tools makes it one of the most valuable free add-ons in the Amibroker ecosystem.
For systematic traders who only rely on automated signals, Brokey offers less value. But for anyone who manually draws support/resistance, trends, or Fibs, Brokey is not a luxury—it’s a productivity essential.
Where to Learn More:
- Amibroker Yahoo Group: Search “Brokey”
- YouTube: “Amibroker Brokey tutorial”
- GitHub:
amibroker-brokey(community forks)
Have you used Brokey with a specific AFL strategy? Share your experience in the comments below.
Disclaimer: Brokey is third-party software. Always scan DLL files before use. The author is not affiliated with Amibroker or the Brokey developer.
Brokey.dll is a core system file required by the AmiBroker application to function. It is one of several critical dynamic-link libraries, along with CoolTool.dll and MiscTool.dll, that support the main Broker.exe executable. Key Facts About Brokey
Essential Function: Without this file, the software may fail to launch or report missing component errors.
Automatic Installation: It is included in the standard AmiBroker installation package and does not typically require manual user intervention.
Version Sensitivity: Activation keys and associated system files are often specific to either the 32-bit or 64-bit version of the software; users must ensure their installation matches their license type. Common Troubleshooting
If you encounter errors related to a "broken" or missing Brokey file:
Run Activation Wizard: If your registration is lost or the file is flagged, you can request a new activation key from the AmiBroker Lost Key page.
Reinstall Software: If files are corrupted, downloading the latest official release (such as version 6.93) from the AmiBroker Download Section is the safest way to restore core DLLs.
Check Bit Version: Ensure you aren't trying to use a 32-bit Brokey.dll in a 64-bit installation directory, which is a common cause for "plugin failed to load" errors.
AI responses may include mistakes. For financial advice, consult a professional. Learn more
Free Amibroker Realtime Data Plugin to Fetch Data from Brokers
You can copy this code directly into the Analysis window and apply it to your charts.
4. Typical AFL Implementation Example
// Brokey Indicator for AmiBroker Period = Param("Lookback", 14, 5, 50, 1); ATRPeriod = Param("ATR Period", 14, 5, 50, 1); Mult = Param("Multiplier", 1.5, 0.5, 5, 0.1);RawBrokey = (C - Ref(C, -Period)) / (ATR(ATRPeriod) * Mult); Brokey = EMA(RawBrokey, 3); // Optional smoothing
Plot(Brokey, "Brokey", colorBlue, styleThick); Plot(0, "Zero", colorBlack, styleDots); Plot(2, "Overbought", colorRed, styleDashed); Plot(-2, "Oversold", colorGreen, styleDashed);
// Buy/Sell signals Buy = Cross(Brokey, 0) AND Brokey > Ref(Brokey, -1); Sell = Cross(0, Brokey) AND Brokey < Ref(Brokey, -1); Benefits of Using Brokey for Amibroker:
PlotShapes(Buy * shapeUpArrow, colorGreen, 0, Brokey); PlotShapes(Sell * shapeDownArrow, colorRed, 0, Brokey);