Skip to content

Creating and Adding Indicators

Read our dedicated cTrader Algo guide on how custom indicators operate.

The entire flow of creating and implementing a custom indicator is showcased in a comprehensive diagram in another article.

1. To create a new indicaator, click on the 'New Indicator' button located above the collapsible algorithms lists.

Image title

Input the name of your algorithm.

Note

If you want to create an algorithm similar to one of the sample indicators, simply use the 'Duplicate' functionality in the algorithm actions menu.

2. Now, you can edit the sample code in the code editor window to the right of the sidebar.

Image title

Developing custom indicators, you can use our code samples.

Refer to the 'References' section of the cTrader Algo guide to learn more about the classes, methods, and properties you can use when coding indicators. In addition, you can always choose to write custom methods as shown in our introduction to C# and .NET.

3. Save your indicators by clicking on the 'Save' button above the code editor window, in the context menu, or use the Cmd+S hotkey.

Image title

Click on the 'Build' button above the code editor window, to the right of your algorithm, or in the algorithm actions menu. Alternatively, you can use the Cmd+B hotkey.

Image title

You will see the following message in the 'Build Result' window after your indicator is built successfully.

Image title

4. To add an instance in the cTrader Algo application, press the '+' icon to the right of the indicator in the algorithm list.

Image title

You can also add instances via the menu of indicator actions.

Image title

In the 'Trade' application, you can add indicators on the active chart via the Chart Toolbar functionality or the Chart Context Menu.

5. Adjust your indicator parameters (if needed) in the 'Parameters' section below the trading chart. You can also open and save parameters by clicking on the corresponding buttons in the top right corner of this section.

Image title

The added indicator will be displayed on the trading chart or in a separate area below it. Additionally, you can open the indicator 'Parameters' window by right-clicking on any indicator line. In other tabs of the same window, you can customise lines, levels, and additional parameters of this indicators. Click on 'Reset' if you want to reset the indicator parameters to defaults.

Note

Indicators are displayed on the trading chart or in a separate area below it immediately after adding an instance. Unlike cBots, they do not 'run'. Hence, you can adjust the parameters of an added indicator at any time.