Automated Trading
Why is my cBot not opening trades?
A quiet cBot may be working correctly, waiting for a condition, or failing before an order is accepted. Follow the sequence below on demo and change one thing at a time.
1. Confirm the running instance
Check the instance’s status, not just whether the cBot appears in Algo. Confirm its account, exact symbol, period and execution environment. For local execution, check that the computer is awake and cTrader remains open and connected. For cloud execution, check the instance has not stopped or reached a broker-dependent demo limit.
Look at the newest startup and stop messages. An exception or failed parameter check can stop useful work even when you recently pressed Start. If several instances exist, identify the one you are inspecting before changing settings.
2. Check the market and symbol
Confirm the instrument is tradable now and receiving current quotes. Broker sessions, holidays and symbol restrictions can prevent execution even while old chart bars remain visible. Check the symbol used by the instance rather than a similarly named chart or another broker’s instrument.
A symbol suffix or a hard-coded symbol name in the source can send the logic somewhere unexpected. Record the exact name shown by the broker. Check any spread filter against current conditions; a wide spread can intentionally block all entries.
3. Trace the entry condition and data
Read the rule literally. An average already above another average is not a new crossover. A closed-bar rule may wait until the next bar begins before evaluating the bar that just finished. Check the selected period and time zone used by any trading-hours filter.
Confirm sufficient historical bars exist for every lookback, including higher-timeframe calculations. Missing or uninitialised values can prevent a comparison from becoming true. If you have source, request diagnostic messages for each gate: enough data, session allowed, signal present and position allowed. Avoid flooding the log on every tick.
4. Check volume, margin and order responses
Compare the requested size with the symbol’s minimum, maximum and volume increment. Lots and units are different representations; a number entered in the wrong unit can be invalid or far too large. Also check available margin, account trading permissions and the validity of stop distances.
A signal followed by a rejected order is an execution problem, not a missing signal. Capture the complete rejection message and order result. Do not remove risk controls or increase size simply to force a trade; establish why the broker or platform refused the request.
5. Read exceptions and environment restrictions
Inspect the instance log around the time an entry should have happened. Keep the full exception, including any stack information and earlier context. A null value, unavailable dependency or file error can interrupt the decision before the order call.
If local execution works but cloud execution does not, check the documented cloud restrictions for networking, libraries and persistent state. A desktop-only feature or external data dependency may be the cause. Restarting repeatedly without retaining logs can remove useful evidence.
6. Inspect existing-position restrictions
Many cBots allow only one position, one direction or a maximum count. Check open positions and pending orders, including those created by another instance. Establish whether the code filters by symbol and label or counts the whole account.
On netting accounts, deals for one symbol affect a shared net position. On hedging accounts, multiple separate positions can exist. The cBot’s position-management assumptions need to match the account type. Do not close unrelated trades merely to bypass an unexplained restriction.
Collect evidence before asking for help
Provide the cTrader app and version, broker symbol, demo account type, local/cloud mode, cBot source or package version, instance period and all relevant parameters. Include the expected rule, the timestamp with time zone and what happened instead. Remove passwords, tokens and private account identifiers.
Supply full log and order-error text, not only the final line or a cropped image. If requesting a code fix through Xen, include the current complete source when you have permission to share it and describe a small reproducible case. Keep an unchanged copy, then rebuild and repeat the same check after the repair. BlogRead the code-review workflow.