Introduction to technical indicators in cTrader
Indicators are analytical tools that process market data and display computed values on charts. They help you interpret price action by applying mathematical logic, revealing trends and signalling potential shifts in market direction. To use an indicator, you add it to a chart. Optionally, you can customise the indicator before or after adding it to a chart.
cTrader features two types of indicators:
- Built-in indicators - technical analysis tools included in cTrader applications by default, and you cannot view or modify their code. These built-in indicators work consistently across all cTrader applications, including Windows, Mac, Web and Mobile.
- Custom indicators - algorithms and technical analysis tools created using C# or Python code in cTrader Windows or Mac. Many custom indicators are available in a dedicated section in cTrader Store, allowing you to download and install indicators developed by other cTrader users.
Whenever you create an indicator in cTrader Algo using C# or Python, you are developing a custom indicator. Both programming languages provide access to the same rich cTrader Algo API, enabling you to build algorithms in the language you are most comfortable with.
Indicator lifecycle
The flowchart below outlines the key steps from creating a custom indicator to adding it to a chart:
graph TB
A([Create a custom<br> indicator]) ==> B([Save and build<br>the indicator]);
B ==> C([Add and manage<br>an instance]);
%% Optional branch with return connection
A -.-> O([Edit the indicator code]) -.-> B; After you create a custom indicator, you should save and build it to validate its project code. When the build succeeds, you can add an instance of the indicator to a chart, and the indicator will appear on the chart.
The table below outlines the possible actions for custom indicators in cTrader applications:
| Action | cTrader Windows | cTrader Mac | cTrader Web | cTrader Mobile |
|---|---|---|---|---|
| Create | Yes | Yes | No | No |
| Edit | Yes | Yes | No | No |
| Save and build | Yes | Yes | No | No |
| Add and manage instance | Yes | Yes | No | No |
In cTrader Web and Mobile, you can add and customise only built-in indicators.
How custom indicators operate
Technically, a custom indicator is a C# or Python class with customisable parameters, methods and other components. By modifying the indicator code, you define how values are calculated and how results are plotted or exposed for other tools.
Custom indicators are primarily used to aid manual trading by providing visual output and alerting you to various market movements and opportunities. However, you can also use such indicators in cBots to define trends and prompt your trading robot to take certain actions.
Like cBot instances, each indicator instance is independent, meaning you can add the same indicator to multiple symbols and with different periods and parameter sets. In contrast to cBots, custom indicators cannot be backtested, optimised or executed in Cloud. Beyond plotting, indicators can expose data to other components, draw custom objects on charts or even trade directly if coded to do so.
