Ready to go further
Next: size a trade
Work out your own lots from risk and stop distance.
What is included
- What it is, in plain words
- The formula or mechanism, with exact arithmetic
- How it hits grid, martingale and DCA bots
- A check you can run before you switch a bot on
Who it is for
- People who run or plan to run a trading bot
- Anyone reading a backtest or a bot sales page
- Readers who want the numbers, not the pitch
- Not advice, and not a signal service
Key facts
- cBot is a platform where a bot or strategy is written, tested and run. This page explains the general method, not the product's current features.
- A bot is only as trustworthy as its test. Before relying on any result here, check costs, fills, data and timing, and keep a stretch of data the rule never saw.
- The worked example on this page uses made-up numbers, checked in node on 31 Oct 2026. It shows the arithmetic, not how any product performs.
- Prices, fees, markets, versions, limits and supported languages change and belong to the vendor. We state none of them. Check the vendor's current pages.
- Start on a simulated account, keep stops where they still work if the bot stops, and move to real money only in very small steps, if at all.
What it is
A cBot is an automated trading program for a platform of the cTrader type. The general idea, as on other platforms with a scripting layer, is that you write the bot in a programming language, the platform runs it, and the platform sends the resulting orders to your broker. For this kind of platform the language is C#, and the bot is a class with methods that the platform calls when it starts, on each tick or bar, and when it stops.
Such platforms usually pair the bot with a built-in backtester and a way to optimize settings, and many brokers give you a demo account to run a bot on without real money. Which brokers support the platform, which instruments you can trade and what each costs is the broker's to say. Check their current pages. This page explains how it works in general terms. We have not tested it for this page. Check the vendor's current terms.
How a bot connects here
The connection style is built-in scripting in a general purpose language, with the platform bridging to the broker.
- Lifecycle methods. Code runs on start, on each tick or bar and on stop. Anything the bot must remember across them lives in fields you manage.
- Trade methods. The bot asks the platform to open, modify or close positions. Each call returns a result that must be checked.
- Volume units. Platforms of this kind often size positions in units, not lots. Know the conversion, and the minimum step, for your account.
- Parameters. Settings that can be changed without editing code, and that the optimizer can vary. Fewer is safer.
Worked example: sizing by risk
A common bot rule is to risk a fixed fraction of the account on each trade. With a made-up balance of $5,000, a risk of 1% and a stop 25 pips away, on a pair where one pip is worth $10 per standard lot, the size is: lots = (balance x risk) / (stop in pips x pip value per lot). Numbers are made up and checked in node.
| Balance | Money risked | Stop (pips) | Lots | Units |
|---|---|---|---|---|
| $5,000 | $50.00 | 25 | 0.20 | 20000 |
| $4,500 | $45.00 | 25 | 0.18 | 18000 |
| $4,000 | $40.00 | 25 | 0.16 | 16000 |
| $6,000 | $60.00 | 25 | 0.24 | 24000 |
At $5,000 the bot risks $50.00 and opens 0.20 lot. After a loss to $4,000 it risks $40.00 and opens 0.16 lot, because the rule shrinks size with the account. In real use the result is rounded to the broker's volume step, which varies, and the rounding can push risk slightly above or below the target. If a bot uses a fixed lot size instead, the risk rises as the account falls. Use the position size calculator or the lot size calculator to check your own numbers.
What to verify before trusting a backtest here
These checks apply to any platform of this kind. The answers come from the vendor's current documentation and from your own tests, not from this page.
| Check | Why it matters |
|---|---|
| Data type and quality in the backtest | Tick data, bar data and approximations behave differently for short-term logic. |
| Spread, commission and slippage entered | Enter costs that match your account. |
| Volume units and minimum step | Rounding changes the real risk. |
| Handling of trade results | A failed order must be logged and handled. |
| Parameters tried | Count them. See overfitting. |
| Demo behaviour versus live | Demo fills can be kinder than live. Forward test, then trade small. |
How bots break on this kind of platform
- Wrong unit conversion. A bot meant to open 0.1 lot opens ten times that, or a tenth.
- Stops not set. The bot opens a trade and the stop request fails.
- State lost on restart. The bot forgets which positions it opened.
- Data mismatch. The test data and the live feed differ. See spread.
- Always-on needs. The bot runs only while the platform runs.
A safe order of work
Backtest with honest costs, forward test on new data, run on a simulated account for weeks, then trade a very small size and compare each step with the one before. See forward testing and paper trading.
What this page does not tell you
It does not tell you whether the product is suitable, what it costs, or how it behaves today. Those change and belong to the vendor. It does not give a strategy to trade. This page explains how it works in general terms. We have not tested it for this page. Check the vendor's current terms.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
What language are cBots written in?
Platforms of this type use C#. Check the vendor for the current details.
Do I need a demo account to test a cBot?
You do not need one for a backtest, but a demo account is the usual next step before real money. Brokers differ, so check yours.
Does a good cBot backtest mean a bot will make money?
No. A backtest shows how a rule behaved on past data under its assumptions. Costs, fills, data and luck can all make live results different.
Should I test on a simulated account before real money?
Yes, as a general practice. A simulated account tests your code and your plumbing. Its fills are usually kinder than real ones, so it does not prove a rule works.
Have you tested cBot?
No. This page explains how it works in general terms and we have not tested it for this page. Check the vendor's current terms.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It is general education. The numbers are made up and it does not consider your situation.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss