cTrader Automate Custom Indicators – Coding Basics
Camovia Tray Team · 2026-09-15
Every trader has been there. You're staring at the standard set of indicators, and something just doesn't feel right. The moving average is too slow, the RSI doesn't capture the nuance you're seeing, or maybe you have a unique formula in mind that no built-in tool can replicate. That moment of realizing you need something tailored to your strategy is where the journey into custom indicator development begins.
For those who trade on cTrader, that journey leads to cTrader Automate, the platform's algorithmic trading and indicator development framework. If you've ever coded in C# before, you'll feel a familiar comfort here—but even if you haven't, the structure is approachable enough to start learning. The platform gives you two options: C# and Python. For most serious indicator work, C# is the primary language, given its deep integration with the .NET framework and the platform's API.
Let's get into the bones of a custom indicator. Every cTrader Automate indicator follows a predictable blueprint. Open the Algo app in cTrader, head to the Indicators tab, and click "New". You'll be prompted to name your indicator and choose your language. Whether you start from scratch or use a template—and the template library is quite extensive, covering a wide range of technical analysis tools—you'll land in the code editor with a skeleton ready to flesh out.
The core structure breaks down into several key sections. First, you declare the necessary namespaces, with the essential one being cAlgo.API. This is how your code talks to the cTrader environment. Next comes the indicator class declaration, marked with the [Indicator] attribute. This attribute lets you define properties like IsOverlay (true if you want the indicator drawn directly on the price chart, false if it should live in its own pane below) or ScalePrecision to control decimal places.
Within the class, you define input parameters using the [Parameter] attribute. This is how you let users tweak settings like a period length or a multiplier without diving into the code. You also define outputs with the [Output] attribute—these are the data series, like a line or histogram, that actually get drawn on your chart. The IndicatorDataSeries type is your workhorse here; it's how you store and plot values for each bar.
Now, the two indispensable methods: Initialize() and Calculate(). Initialize() runs once when the indicator is launched—perfect for setting up nested indicators or variables. For instance, if your custom indicator relies on a moving average, you'd create and configure it inside Initialize(). Calculate() is called on every historical bar and on every new tick, which is where your indicator's logic lives. Every index in the data series is processed here, so your formula applies correctly across the chart's entire history.
A practical example: say you want to combine a few standard indicators into one panel. You can declare nested indicators like Aroon, RSI, and Directional Movement System as private objects within your class, initialize them in Initialize(), and then assign their values to your custom outputs in Calculate(). The flexibility is impressive, allowing for complex, multi-faceted tools that would be clunky to manage separately.
Of course, developing indicators requires focus—often, multiple charts and terminals open to test your code in real-time. It's not uncommon to have several MT4 or MT5 instances running for comparison, cluttering your screen and taskbar. This is where a tool like Camovia Tray can make the workflow noticeably cleaner.
When you're deeply engaged in coding, the last thing you want is to manually hunt for terminal windows to check a price or see if your indicator's output makes sense relative to the current market. Camovia Tray can turn your MT5 or MT4 into a quiet, system-tray-based companion. You can check live quotes simply by hovering over a tray icon, or quickly glance at your open positions to manage risk, all without disrupting your coding flow in the Algo app. It lets you keep your terminals running for data, but keeps them out of the way—you can even hide the main window completely from the taskbar and Alt+Tab view.
This separation is valuable. You keep your development environment front and center while your trading data quietly sits in the background, accessible only when you need it. And importantly, all that market data remains local—it's read directly from your terminal and never uploaded anywhere. For a developer testing new logic, that's one less thing to worry about.
Getting back to the code: once your logic is in place, you save and build the project (Ctrl+B). cTrader will validate your code. If it compiles, your indicator appears in the list, ready to be attached to any chart. If it fails, the error messages are usually specific enough to guide your debugging—and yes, you can even use System.Diagnostics.Debugger.Launch() in your code to debug directly in Visual Studio if you grant full access rights.
In practice, writing a custom indicator in cTrader Automate is a matter of understanding the lifecycle (Initialize and Calculate), leveraging the platform's rich API of standard indicators as building blocks, and structuring your code cleanly. The learning curve exists, but the reward is a tool that aligns perfectly with your trading approach. And while you're busy refining that logic, tools like Camovia Tray quietly handle the data-viewing side of things, letting you stay in the zone.
MT4/MT5 Tray Assistant
Silent tracking, one-click close - check quotes and manage positions right from the tray.
Download Camovia TrayFrequently Asked Questions
What information can I monitor?
Quotes and open positions: symbol, direction, open time, current P&L, and more - all visible in the popup positions tab. Click an order to close it.
Which languages are supported?
Chinese and English, switchable on both the website and the client.
How do I download it?
Install from the Microsoft Store - the download page on this site has the link.
How do I report issues or contact you?
Send an email to [email protected].
Popular Symbols Trading Hours
Open/close times, weekend hours & live market status:
Related Articles
MT5 History Analyser Tool for Beginners: How to Turn Trade Data Into Real Improvement
Learn how to use MT5 history analyser tool for beginners to improve trading. Camovia Tray turns MT5 into a tray tool for easier trade review and workflow.
How to Minimize MT5 to Tray: A Complete Guide for Traders
Minimize MT5 to tray with Camovia Tray — hide MT5 from taskbar & Alt+Tab, view quotes and manage positions without reopening the terminal. Works on Windows 10/11.
MT4 Technical Analysis Tools for Beginners: What Works, What Doesn’t, and How to Actually Use Them
Learn MT4 technical analysis tools for beginners with simple strategies. Use Camovia Tray to manage trades from your system tray and keep data local.
MT5 Toolbox for Beginners: Turn Your Terminal Into a Tray Tool and Take Control of Your Trading
Turn your MT5 terminal into a tray tool with Camovia Tray. Check live quotes and manage open positions without opening the full platform. Data stays local.
Infinitytron_EURUSD_M5 EA Review Draft: Performance, Risk, and the Quiet Utility of Managing It
Turn your MT4 into a tray tool with Camovia Tray while running Infinitytron_EURUSD_M5. Check quotes, view open positions, and hide the terminal—all from the system tray.