Skip to content

Convert Indicators to cTrader with Xen AI

What this Workflow Does

The Convert an Indicator workflow is designed to translate an existing indicator from one trading platform to another while preserving its behaviour as closely as possible.

The focus is on accuracy, not redesign. This means maintaining the original calculation logic, mapping inputs correctly, and recreating the same visual output on the chart. Platform-specific differences are handled carefully to ensure the result behaves as expected in the target environment.

This is a conversion workflow, not an optimisation or enhancement process.

Xen AI – Convert Trading Indicators

Watch this video to see how a MetaTrader indicator can be converted into a cTrader indicator using Xen AI. The example demonstrates how trading logic is translated into clean, compile-ready C# code for the cTrader platform.

Tip: Set the video quality to HD (1080p) for the best viewing experience.

When to Use This Workflow

Use this workflow when you already have a working indicator on another platform and want to reproduce the same behaviour elsewhere. It is most useful when accuracy matters more than redesign, and when you need a clean, maintainable version on the target platform.

This workflow is not intended for improving or redesigning the logic. If your goal is to build something new or significantly change the behaviour, use Build a Technical Indicator instead.

What You Should Prepare

Before starting, ensure you have the full source code of the original indicator. Partial snippets are not sufficient, as missing logic can lead to incorrect conversions.

You should also understand how the indicator works, including its inputs, any timeframe or data dependencies, and how it displays information on the chart. Knowing the target platform in advance will help ensure the conversion is handled correctly.

If the original code is unclear or contains errors, resolve those issues before attempting a conversion.

How to Interact with Xen

When using this workflow, keep your instructions clear and focused. The goal is to convert, not to change behaviour.

For example, you can ask Xen to convert the indicator, preserve all calculations, and match the visual output as closely as possible. Avoid combining conversion with requests to optimise or enhance the logic, as this introduces unnecessary complexity and reduces accuracy.

Keeping the scope narrow will produce better results.

How Xen Performs Conversions

Xen begins by analysing the original indicator logic and identifying how it maps to the target platform. It then adapts platform-specific APIs, lifecycle methods, and data handling to recreate the same behaviour.

Where possible, parameter names, defaults, and structure are preserved. The result is returned as a complete, compile-ready file suitable for immediate testing.

If certain platform features cannot be mapped directly, Xen will highlight the limitation and provide the closest possible alternative.

Common Mistakes to Avoid

Most conversion issues come from unclear inputs or mixing tasks. Avoid using incomplete code, combining conversion with feature requests, or assuming that all platform APIs map directly.

It is also important to verify the result visually. Even when logic is correct, small differences in rendering or data handling can affect the output.

After conversion, compile and load the indicator on the target platform and compare it with the original. Focus first on confirming that the calculations match before making any visual adjustments.

Once the logic is verified, you can refine appearance or extend functionality if needed.