Converting Strategies
Choose Convert Strategy when a strategy needs to become a MetaTrader 5 EA. Add one complete source file, including legacy MQL4 or another platform's code, through Share source code. Optional notes describe deliberate changes; a direct conversion can be submitted with the attachment alone after confirming permission.
The result targets MQL5. Conversion involves events, orders, position accounting and execution assumptions, rather than only replacing function names. Retain the original source and a record of expected trades to compare with the new implementation.
Source and permission
Xen asks you to confirm that you own the source or have permission to convert it. Copyright and licence terms can restrict modification or redistribution. Confirm permission for the actual file submitted; changing the source or task can require a fresh acknowledgement.
Provide editable text rather than a compiled program. Explain custom libraries, indicators or platform services used by the strategy. Ask Xen to identify dependencies that cannot be reproduced instead of replacing them silently. Specify the intended account type and any changes to sizing or execution in the notes.
Large strategy files
Conversion source is limited to 32 KB, measured by upload size rather than line count. Pasting oversized source does not avoid that limit. Upload limits determine what Xen can accept; response limits determine whether Xen can return the entire converted or revised file. A source file can pass the upload check and still be too large for a complete response. Existing-source and repair tasks have their own upload limits.
A project-size warning appears when the current source reaches about 24,000 characters. Xen estimates source tokens from characters divided by 2.5, reserves 25% for changes and another 1,000 output tokens for explanation and model work, and compares that estimate with its 16,000 output-token ceiling. Around 30,000 source characters reaches the estimated boundary; this is not a fixed character promise or a guarantee that a conversion or new feature will fit. Compact code, dependencies and expanding requirements can need more space. The warning updates when you replace source, receive revised code, open a project or restore a snapshot, and clears when the current source becomes smaller. Strategy Tester analysis does not require a source rewrite and does not show this warning.
If a complete rewrite is estimated to exceed the maximum response size, Xen blocks generation before making the generation request. More credit cannot remove that restriction. Simplify the requirements, ask for analysis without rewriting the source, or contact ClickAlgo development for assistance. Xen continues to return complete downloadable MQL5 files for supported requests; you do not need to assemble patches or code fragments.
If the source fits the response ceiling but your available credit cannot cover the estimated complete response, Xen blocks generation and explains the credit restriction. Adding credit may help in that case. The allowance still accounts for the request and source context, so the same file can need more credit when you add dependencies or detailed requirements. A blocked generation request does not consume generation credit.
An estimate cannot prevent every incomplete response. If the provider stops before completion, Xen keeps your last complete source and does not enable build or download actions for that response. Tokens consumed before it stopped may still be charged. Use Projects and History to open or restore a saved complete snapshot. Simplify the next request or seek developer assistance instead of repeatedly asking Xen to continue an unfinished file. Test the final integrated EA as a whole; compilation alone does not prove that a large conversion preserved connected logic, shared state or dependencies.
Compare execution behaviour
Identify whether the original responds to completed bars, ticks or order events. Check repeated signals, pending orders, partial closes and positions opened by other programs. Netting and hedging account behaviour also matters when the strategy was designed around several independent entries.
Compilation does not guarantee identical trades. Feeds, spreads, sessions and historical modelling can change signals and fills. Begin with a short test where individual trades can be inspected, then compare longer runs using equivalent inputs and documented settings. Follow Testing Expert Advisors before treating performance differences as a source defect.