Prepare the source
Locate the editable `.mq4` file, remove unrelated files and collect screenshots showing how the original indicator should look.
Xen AI Indicator Conversion task
Use ClickAlgo Xen AI to translate an MT4 indicator from MQL4 into cTrader-compatible C#. The guided Indicator Conversion task helps analyse the source, recreate its calculations and produce code you can compile, compare and refine.
A guided conversion workflow
MT4 indicators are written in MQL4, while cTrader indicators use C# and the cTrader Algo API. The two platforms organise market data, indicator buffers, chart objects and events differently, so changing the file extension or copying the code directly will not work.
Xen's dedicated conversion task provides a structured way to analyse the original MQL4 source and recreate its behaviour for cTrader. The AI can map inputs, calculations, output series, chart drawings and alerts into an initial cTrader implementation, then help address compiler errors or behavioural differences found during testing.
How to convert an indicator
Treat the AI output as the first implementation. Compile and compare each feature before relying on the converted tool.
Locate the editable `.mq4` file, remove unrelated files and collect screenshots showing how the original indicator should look.
Start the Indicator Conversion task, provide the MQL4 source and explain any important behaviour that is not obvious from the code.
Create the cTrader version, compile it in cTrader Desktop and give Xen the complete error details if corrections are needed.
Run both indicators on matching symbols, timeframes and periods, then request focused changes for any difference in output.
What Xen can translate
A successful conversion preserves behaviour rather than translating every line literally.
Recreate periods, price sources, calculation modes, colours and other user settings with suitable cTrader parameters.
Map MT4 output buffers to cTrader indicator data series and preserve the meaning of empty or unavailable values.
Rebuild formulas using cTrader market-series indexing and account for differences in bar order and lifecycle events.
Recreate lines, histograms, arrows, labels and drawing objects using the corresponding cTrader chart APIs.
Implement signal alerts carefully and prevent repeated notifications when the same bar is recalculated.
Adapt higher- or lower-timeframe references and verify how bars align when data availability differs between platforms.
Validation checklist
Compilation only proves that the code can build. It does not prove mathematical equivalence. Test the original MT4 indicator and the cTrader conversion with comparable broker data and settings wherever possible.
Small differences may arise from symbol naming, price feeds, session times, missing history, spread and the way each platform forms bars. Investigate these data differences before assuming the conversion formula is incorrect.
AI conversion or developer?
Xen is a fast route for well-defined indicators, while complex commercial or undocumented projects may benefit from professional review.
Frequently asked questions
No reliable source conversion can be performed from the compiled `.ex4` file alone. Use the original editable `.mq4` source or create a new cTrader indicator from a complete functional specification.
This page covers Xen's Indicator Conversion task. Automated strategies involve orders, positions, risk and execution behaviour, so an EA-to-cBot project should use the appropriate Xen workflow or a professional cTrader developer.
The calculation should be validated carefully, but values can differ when the platforms use different price feeds, bar times, symbol settings or available history. Compare controlled examples and investigate data differences.
Xen reduces the coding required, but you should understand the indicator's rules and be able to compile and test the output. Complex issues may still require C# or cTrader API experience.
Only convert software when you own the source or have permission from the copyright holder. Purchasing a compiled indicator does not automatically grant rights to reproduce or convert its code.
Prepare the `.mq4` source and reference screenshots, then open the Indicator Conversion task to create your first cTrader version.