Skip to content

Add cTrader Alerts and Trade Signals with Xen AI

What this Workflow Does

The Add Alerts & Trade Signals workflow is used to extend an existing indicator or trading robot with notification and signal logic.

Rather than creating a new tool, this workflow focuses on adding alerts to a system that already works correctly. This allows you to introduce notifications without affecting the underlying calculations or behaviour.

Typical alert types include sound notifications, message boxes, on-chart visuals, and signal markers. These can be used to highlight conditions that already exist within your logic, making it easier to monitor signals in real time.

When to Use This Workflow

Use this workflow when your tool is already compiling and behaving correctly, and you want to add controlled alert logic on top of it.

It is particularly useful when you want to trigger notifications based on existing signals or conditions without modifying how those signals are calculated.

This workflow is not intended for building new strategies or indicators. If you are starting from scratch, use a build workflow instead.

What You Should Prepare

Before starting, ensure you have the full source code of your indicator or robot. Xen needs the complete file to safely insert alert logic in the correct locations.

You should also clearly define the condition that will trigger the alert, along with when it should fire. For example, whether the alert should trigger once per bar, on every tick, or only when a condition first occurs.

Finally, decide how the alert should be presented. This may be a sound, a message, a visual marker on the chart, or a signal output.

If the tool does not compile or contains errors, fix those first before adding alerts.

How to Interact with Xen

When requesting alerts, be specific about both the condition and the behaviour.

For example, you might ask for a sound alert when RSI crosses a certain level, or a chart marker when a signal is generated. You should also state how often the alert should trigger, as this prevents repeated or unwanted notifications.

Avoid vague requests such as asking for alerts without defining the condition. Clear instructions produce accurate results.

How Xen Handles Alerts

Xen adds alert logic in a way that preserves your existing calculations. It places the alert code in the correct lifecycle methods and ensures that repeated alerts are controlled where possible.

It will typically introduce parameters so alerts can be enabled, disabled, or adjusted without modifying the code again. The result is returned as a complete, compile-ready file.

If the trigger condition is unclear, Xen will request clarification rather than making assumptions.

Common Mistakes to Avoid

Most issues occur when alerts are added before the tool has been properly tested. Always confirm that your indicator or robot is working correctly before introducing notifications.

Avoid mixing alert logic with calculation logic, and do not attempt to add multiple complex alert types in a single step. It is also important to define when the alert should trigger, as this controls how often it fires.

A simple, incremental approach produces the most reliable results.

After adding alerts, test the tool in a simulator or demo environment and confirm that notifications trigger exactly as expected. If needed, adjust parameters to control frequency or behaviour.

You may also want to explore: