Skip to content
Guides
FROpen Studio

Export and manage

Review cTrader code

Exported code should match the version and settings you reviewed.

3 min read · 6 sections
Contents of this guide

What the Code view is for

The Code view lets you review the cTrader code associated with your work and use the generation or compilation actions available. Use it for technical review and export preparation after clarifying strategy rules.

Generation produces a file, compilation checks its construction in the offered context and testing studies behaviour on data. Completing one step does not replace the others.

Prepare generation

  1. Select the strategy and intended version.
  2. Save the latest rules and protections.
  3. Open the technical area and Code tab.
  4. Use the offered generation or compilation action.
  5. Wait for its final status and read the messages.
  6. Review the result before continuing to export.

If the interface shows a limited preview, do not treat it as the complete file. Use the available actions to access the content included in your account’s options.

Distinguish parameters and constants

This C# fragment only illustrates fixed values. It is not a complete trading robot or a description of the code generated for your strategy.

C#
// Teaching example: fixed values in C# code.
const int FastPeriod = 20;
const int SlowPeriod = 50;
// A constant alone is not an interface setting.

Inspect the exported file’s parameters and the list presented in cTrader to identify adjustable settings. If an expected value is missing, check the exported version before requesting changes.

Review behaviour-changing elements

ElementReview question
Market and horizonDo they match the tested project?
EntriesDo conditions and direction match Flow?
ProtectionsAre size, stop and target units explicit?
SessionsWhich timezone and boundaries apply?
ParametersWhich values are exposed and what are their defaults?

Finding the same number is not enough. Check its unit and purpose: 20 can represent a period, distance or another quantity.

Read compilation messages

A message can identify something missing, an inconsistency or a manual-edit error. Record the exact message and line when shown. Address the first identifiable cause before changing several parts of the file.

Example prompt
Explain this compilation message in the context of the displayed file.
Identify the affected element and suggest a minimal correction.
Preserve strategy rules and protections.
State what needs recompiling and checking afterwards.

Successful compilation means that step completed in its context. It does not establish profitability, absence of every logical error or identical results in every operating condition.

Keep a clear working version

Keep the exported file and manual changes identifiable. When regenerating, compare settings before replacing your working copy. Continue with Export to cTrader for file and parameter checks on the target platform.

Search the guides