Skip to content

Work on an Existing Trading Robot

What this Workflow Does

The Work on Existing cBot workflow helps you make targeted changes to an existing trading robot.

It is designed for modifying code you already have, rather than creating a new strategy from scratch.

You can use it to:

  • Fix bugs or incorrect behaviour
  • Modify entry or exit conditions
  • Add new features or filters
  • Improve risk management
  • Extend an existing strategy without rebuilding it

This workflow focuses on safe, controlled changes to your existing code.


Supported Platforms

You can submit trading robots or strategies from:

  • cTrader (C#)
  • MT4 / MT5 (MQL4, MQL5)
  • TradingView (Pine Script strategies)
  • NinjaTrader
  • Other trading platforms

If the strategy is not written for cTrader, Xen may advise that conversion is required before changes can be applied properly in cTrader.


When to Use This Workflow

Use this workflow when:

  • You already have a trading robot and want to change it
  • You want to fix a bug or logic issue
  • You want to adjust entries, exits, or trade handling
  • You want to improve or extend an existing strategy

Do not use this workflow when:

  • You want to create a new trading robot from scratch
  • You want to convert a non-cTrader strategy as a separate task
  • You only want analysis without making changes

For those cases, use:

  • Build an Automated Trading Robot
  • Convert a Trading Robot

What You Should Provide

For best results, include:

  1. Full source code
    Paste or upload the complete cBot or strategy file.

  2. Requested change
    Clearly explain what you want to modify, fix, add, or remove.

  3. Context (optional)
    Explain what the strategy is intended to do or where the behaviour is incorrect.

Examples:

  • “Add trailing stop loss.”
  • “Change entry logic to use RSI instead of MACD.”
  • “Add a filter to prevent trades during low volatility.”
  • “Fix duplicate trade entries.”

How to Interact with Xen

Be specific about the change you want.

Good requests include:

  • “Add break-even logic after 20 pips.”
  • “Only allow one trade per direction.”
  • “Add a time filter to avoid trading during news hours.”
  • “Change stop loss and take profit to be ATR-based.”

Less useful requests include:

  • “Improve this strategy.”
  • “Make it profitable.”
  • “Fix everything.”

The more precise your request, the better the result.


What Xen Will Do

Xen will:

  • Read the existing cBot code
  • Preserve the original structure where possible
  • Make targeted modifications based on your request
  • Return updated code or focused code changes, depending on the selected mode

Xen will aim to avoid unnecessary rewrites and unrelated changes.


What Xen Will Not Do

Xen will not:

  • Rebuild the strategy from scratch unless required
  • Change unrelated parts of the code without reason
  • Guess major changes if your request is unclear

If your request is too vague, Xen will ask what you want changed before editing the cBot.


Common Changes You Can Request

Common update requests include:

  • Add or modify entry conditions
  • Add exit logic
  • Improve risk management
  • Add filters or confirmations
  • Prevent overtrading
  • Add trailing stops or break-even logic
  • Fix execution or logic errors
  • Adjust parameters

Before submitting your request:

  • Make sure you provide the full source code
  • Clearly describe the change you want
  • Mention any known issues or expected behaviour

If the strategy is from another platform and needs adapting for cTrader first, use the Convert a Trading Robot workflow instead.