Live execution: how a deployment runs on your cTrader account
How a deployment runs on your cTrader account: start-up, orders and stops at the broker, the connection, heavy load, pause, stop, restart and updates.
This page is the exact behaviour of a live deployment: what the engine decides, what your broker does, what happens at start-up, when the connection drops, under load, on pause, stop and restart, and during our updates. It is the one place the live rules are stated; the other pages link here. For how rules are evaluated in general see The execution model; for the order rules a backtest applies see Orders and fills.
One engine, built for many brokers
AlgoTradingHub is built broker-agnostic: cTrader today, built for more.
- Strategies name instruments, not broker symbols. A strategy is written against AlgoTradingHub's own catalog of instruments — 70 today — never against a broker's symbol names. When a deployment starts, the platform finds each instrument in your broker's own symbol list and takes your broker's digits, tick size, contract size, lot minimum, lot step, lot maximum and minimum stop distance for it. So one strategy runs unchanged on accounts at different cTrader brokers. How each instrument is matched, and which ones need a reviewed symbol list at your broker, is on Market data.
- The money is your broker's. Backtests run on broker-independent historical data from Dukascopy, and a broker's costs can be modelled with a virtual symbol, including presets built from captures of real broker accounts. Live, your balance, and every closed trade's profit, commission and swap, come from your broker's own figures.
- One interface to a broker. The engine talks to a broker through one interface — the connection, orders, prices and price history, account data, symbol mapping and one stream of broker events — and each broker plugs in its own implementation of it. The strategy engine, order handling, drawdown limits, monitoring and portfolios are built on that interface. What is cTrader-specific today is the adapter behind it and the account-linking flow (the cTrader sign-in and the renewal of its access).
- Today. A demo or live account at any cTrader broker your cTrader ID reaches can be connected; no other broker or trading platform is supported (Brokers).
At a glance
| Today | |
|---|---|
| Accounts | cTrader demo and live (real-money) accounts |
| Who decides | The same decision code as a tick-mode backtest |
| Prices, fills, costs | Your broker's |
| Stop loss / take profit | Sent with the order, market and pending alike, and held at your broker, which triggers and fills them |
| Trailing stop / break-even | Moved by the engine; frozen while the engine is not running |
| No prices (connection lost, market closed) | Nothing is evaluated — entries and your rules' exits alike |
| Heavy load | Older prices of a symbol may be skipped for the newest; candle closes never |
| Pause | No new entries, resting entry orders cancelled; exits, changes, trailing moves and drawdown limits keep running |
| Stop | Close all at market, or detach (positions left at the broker, unmanaged) |
| Restart | The same deployment, history kept, every deploy check again, kept positions taken back |
| Our updates | Positions stay at the broker; nothing evaluated meanwhile; running and paused deployments come back by themselves, as they were; strategy drawdown limits carry on |
| Engine error | Restarted by itself up to 3 times, then stopped (details) |
What runs live, and on what
Accounts
- cTrader demo and live (real-money) accounts can be connected (Brokers → demo and live accounts). On a live account the orders are real and so is the money. Everything on this page describes how the engine trades the account it is given, demo or live.
The same decision code as the backtest
- A live deployment and a tick-mode backtest run the same code to decide: the same order of events on each price (candle-close rules first, then per-price rules), the same values and indicators, the same conditions, the same position sizing, the same trailing-stop and break-even arithmetic, the same order checks, and the same evaluator for the strategy's own drawdown limits.
- What live replaces is around the decision: prices come from your broker's stream; the broker fills market orders and itself triggers and fills pending orders, stops and targets (the engine's own fill and stop/target simulation is switched off live); the money of every closed trade is the broker's statement.
Prices, clock and bars
cTrader sends bid and ask updates for each symbol, sometimes one side at a time. The engine merges them and evaluates on each update once both sides are known.
Each price carries your broker's server time, or its arrival time if the broker sends none. The strategy's time is the time of the last price, read in the strategy's time zone.
Bars are built from the bid (open, high, low and close of the bid), bucketed in the strategy's time zone; higher timeframes are assembled from one-minute bars, as in a backtest.
A bar closes on the first price that falls in the next period. In a quiet market or over a weekend, the close — and every candle-close rule on it — is evaluated when that price arrives. Another symbol the strategy reads closes its bar as soon as any price passes the bar's end, so a decision reads that symbol's bar ended by then even when it has not traded since, as a backtest does.
Candle-close rules fire on the bars of the strategy's primary symbol only, detected on that symbol's own prices.
Volume. A bar's volume is its tick count (Volume). cTrader prices carry no volume: with its prices your broker sends its own 1-minute bar, and the engine takes your broker's count for each minute from it, the minute in progress included, except in the minute the deployment starts in: there the bar in progress counts the prices received from the start until that minute closes. Higher timeframes sum their minutes. A minute your broker never stated takes the number of prices the deployment received in it, which can differ from your broker's count: a price change sent one side at a time arrives as two updates, and updates lost on the way are not counted. When your broker's bar arrives after the engine has closed the minute, the stored 1-minute bar is corrected. So is a higher-timeframe bar that had already closed with that minute. A candle-close rule that reads volume has already read the count held at that close, and that decision is not taken again.
No prices, no decisions. Rules — On Timer rules included — are evaluated only when a price arrives.
On Timer (kept by strategies that already use it) fires on the clock's whole minutes from the deployment's start, every 1 minute; after a gap in prices it fires once, on the first price, and then resumes on the whole minutes (On Timer).
Before an instrument's first price. After each start (a deploy, a restart, a move to another server), a symbol has no price until the deployment receives its first live price of it; a price your broker re-sends when the deployment subscribes counts, however old. Until then its bid, ask and spread, and the profit of a trade on it, are not a number, as in a backtest (a symbol with no price yet): a rule that reads them is not met, and an order whose volume or levels read them is not sent. Everything else runs, exits included. The activity log names the symbols the deployment is waiting for, says when each first price arrives, and warns if one still has none a minute after the start. It names only a symbol whose price your rules or orders read: one you trade, or one read through Market Price or an exposure-sized volume. A currency-conversion pair you do not trade, or a symbol read only through its candles or indicators, is never named, since no rule waits for it. Currency-conversion pairs are pre-filled from their last bar's close for converting money; that is never a price your rules read.
A symbol you only read the price of (through Market Price, without trading it) is subscribed like a traded one, so its price arrives too.
Balance, equity and position sizing
A live strategy reads the real account. Balance is your broker's cash balance: read again every 30 seconds and set to the broker's figure after each of the deployment's closing fills. It therefore includes deposits and withdrawals, swaps, your other deployments' results and your manual trades.
Equity is that balance plus the floating profit of every open position on the account, as your broker counts it: the positions of running and paused deployments are priced on every price; the others — positions you opened by hand, positions a stop left at the broker — at your broker's own figure, read with the balance every 30 seconds.
Free margin is equity less the margin your broker states as used across the account, read with the balance.
Sizing. Sizing that reads the balance — a percentage of the balance at risk, a percentage of the balance as exposure, one lot per amount of balance — sizes off the live balance, not a starting balance you choose. A computed size follows your broker's lot rules: rounded down to its lot step, raised to its minimum, cut to its stated maximum (not capped when the broker states no maximum). A fixed lot size is sent as you set it.
Your broker's symbol rules
At every start the engine reads, for each instrument, your broker's digits, tick size, contract size, lot minimum, lot step, lot maximum and minimum stop distance, and uses them instead of the catalog's.
An opening order whose volume is below the minimum, above a stated maximum or not a whole number of steps is refused, never rounded. A closing order is rounded to the step and raised to the minimum, and is never limited by the maximum.
Stop and target prices are rounded to your broker's digits before they are sent. Any price that still has more decimals than the symbol allows is refused, never rounded.
The platform does not check margin before sending a live order; your broker decides.
Live versus a backtest of the same revision
The decision code is shared, so shift rules, the update order of status holders and record sets, crossovers, the rounding of computed prices and the order checks are the same. These are the places where the same revision can still behave differently. This table is the complete list; other pages link here.
| Tick-mode backtest | Live | |
|---|---|---|
| Prices | Dukascopy's recorded prices | Your broker's prices: bars, indicators and signals can differ slightly throughout |
| Bar volume | The number of Dukascopy's ticks in the bar | Your broker's count of ticks in the bar, or the prices received in a minute your broker did not state; the same calendar bar reads another number (Volume) |
| Market order fill | The simulated price, plus your slippage setting | Your broker's execution price; no price limit or maximum slippage is sent |
| Stops, targets, pending orders | Triggered and filled by the engine | Triggered and filled by your broker, on its prices |
| Minimum stop distance | Your virtual symbol's stops level, when it states one (broker presets carry the broker's): an order inside it is refused, a trailed or modified stop is moved out to it | Your broker's, applied the same way |
| Costs | Recorded spread, plus a virtual symbol if you attach one | Your broker's real spread, commission and swap; virtual symbols never apply |
| Contract size, digits, lot rules | The catalog's, or your virtual symbol's | Your broker's, read at every start |
| Margin | Simulated; an order is refused when margin is short | Not checked by the platform; your broker decides |
| Balance, and sizing that reads it | The starting balance you set | The real account's, shared with your other trading |
| Free margin | Equity − simulated used margin | Equity − your broker's used margin over the whole account, read every 30 s |
| Start | Evaluates from the run's start | No entries until the first one-minute bar after the start has closed (below) |
| Candle close in a multi-symbol strategy | Detected on the first price of any loaded symbol after the boundary | Detected on the primary symbol's own first price after the boundary |
| A refused market open | The rule may send again at its next evaluation | That rule waits 5 s, doubling to 60 s on repeated refusals |
| Partial-close volume | Rounded down to the volume step; a position whose share rounds to 0 is skipped | Rounded to the nearest step and raised to the minimum (below) |
| Recursive indicators (every exponential or smoothed average, RSI, Wilder ATR, ADX and the indicators built on them) | Seeded once over the warm-up before the run, then carried bar by bar | The same: seeded over the warm-up before the deployment's start and carried candle by candle; a restart or a full re-warm seeds them again (Strategy semantics) |
| Running totals (Accumulation/Distribution, On Balance Volume) | A total from the first bar of the warm-up | A total from the first bar of the deployment's warm-up, over your broker's tick counts: the level differs from a backtest's, and so do the changes from bar to bar, since each bar's change is weighted by its volume (indicators, volume) |
| A gap in prices | — | Candle closes inside the gap are not evaluated afterwards |
| Restart | A backtest never restarts | Strategy state starts fresh, except a record set with a lookback, rebuilt from your broker's history (Strategy semantics) |
| On Timer | Fires on the whole minutes from the run's start | Fires on the whole minutes from the deployment's start |
| Heavy load | Every price is evaluated | The newest price may be evaluated and older ones skipped (below) |
- A trailing-stop or break-even exit is reported as Stop loss, live as in a backtest: the broker holds one stop, and live cannot tell which rule last moved it.
- A bar-mode backtest differs from live more than a tick-mode one, because it cannot see inside a minute: see what a bar-mode result tells you about live.
Starting a deployment
Checks before anything runs
A deploy and a restart run the same checks; a portfolio deploy runs them for the whole batch and refuses an account whose checks fail. When one fails, nothing starts there:
| Refused when | What you see |
|---|---|
| The account is not verified | "Verify this account before deploying to it." |
| The account is a netting account: netting deployments are turned off for now | "Deploying to a netting account is turned off for now." |
| The strategy's account model (hedged or netting) differs from the account's | "AccountType mismatch: …" |
| An instrument is not carried by your broker, or is an index or commodity nobody has reviewed at your broker | A sentence naming the instrument (Brokers) |
| You have no free live slot | "Live-strategy limit reached ({used}/{limit}). Stop a running deployment to start another. More live strategies are available on the Your plan page." |
| The strategy is over the complexity limit | "This strategy evaluates {N} conditions per tick; the limit is 500. …" (names the three heaviest parts) |
| Our live servers are full | "Our live capacity is full right now, so nothing was deployed. We are adding capacity; please try again later." |
| You have not accepted the Risk Disclosure | "You must acknowledge the Risk Disclosure before deploying a strategy to a broker account." |
| The account's Overall drawdown limit stopped it and is not reactivated | "This account's Overall drawdown limit was reached, so nothing can start on it until you reactivate the account." |
| Netting account: another deployment holds a symbol this one trades | See Hedged and netting accounts |
| The same revision is already running or paused on this account (the database enforces it too, so two requests at once never make two copies) | "…already running on this account (deployment #{N}). Open it instead of deploying a second copy." / "…paused (deployment #{N}). Resume it instead…" |
- Too complex. The limit counts the condition checks your strategy makes on every price. To get under it, move rules to candle close, shorten long ranges, lower record-set capacities, or split the strategy. How each part is weighed: Strategy semantics → the complexity limit.
- Nothing that is already running is ever stopped or paused because our servers are full, and resuming a paused deployment is never refused for capacity.
Warm-up from your broker's history
- At start the engine finds each instrument at your broker, reads its symbol rules, and loads from your broker's own history as many closed bars per timeframe as your strategy's indicators need. The journal says "Warmed up from the broker's history."
- An instrument your broker does not list, or a history shorter than needed, refuses the start. The deployment reads Failed to start with the reason, for example "Deployment {N} cannot start: strategy requires 200 H1 bars for EURUSD; broker provides 150." A failed history read says "… broker history fetch for {symbol} {timeframe} failed (…). Retry the deploy." A backtest whose history is too short runs anyway (execution model).
- A record set with a lookback is then rebuilt from your broker's history: it is replayed, with the holders and record sets it reads, over the closed bars it declares before the start, so the deployment begins with the book a backtest's replay would hold over the same history. The journal says "Rebuilt the record sets' books from the broker's history since {date} UTC ({N} closes)." A history with fewer closed bars than the lookback refuses the start: "Deployment {N} cannot start: the record set {name} declares a lookback of {L} closed bars, but the broker's history before now holds {M}. Lower the lookback to {M} or less to deploy it." So does a lookback that reaches back more than 2 years.
- The deployment shows Running from the moment you deploy, while it warms up.
The first minute
Once warm, the engine evaluates from the first price, but opens nothing — market or pending — until each instrument's first one-minute bar after the start has closed and been checked against your broker's copy of that bar (the minute it started in was seen only partly). When the broker has the bar, it replaces the engine's own, normally at the next minute boundary. When the broker has no bar for that minute (a quiet minute, or a start while the market is closed), the engine's own bar stands and entries proceed. If the broker cannot be read, entries keep waiting and the read is retried at every following minute close.
An entry rule that fires during that wait sends nothing; it opens as soon as its conditions hold after the wait. Exits, stops, targets and trailing stops work from the first price.
Orders, stops and fills
Where your stop loss and take profit live
Stops and targets are sent with the order, as absolute prices rounded to your broker's price digits, and your broker records them on the order: on a pending order they are part of the order, on a market order they are set on the position it opens.
Before sending, the platform checks their side and distance as a backtest does: a market order whose stop or target is on the wrong side of the price it would close at, or nearer to it than your broker's minimum stop distance, and a pending order whose levels are on the wrong side of its own price, are refused before sending (wrong-side stops).
Once your broker holds a position's stop and target, the broker triggers and fills them on its own prices, whether or not AlgoTradingHub is running or connected.
Which price triggers them is your broker's rule: the platform sends no trigger method, so cTrader's default applies. cTrader's API reference describes that default as: a long position's stop loss triggers on the bid, a short's on the ask; a buy stop order triggers on the ask, a sell stop order on the bid.
What needs the platform running: new entries, your rules' exits and changes, and trailing-stop and break-even moves. All of these stop while the platform is down or disconnected; the last stop your broker holds stays in force.
On a hedged account the positions table shows the stop your strategy intends beside the stop the broker confirmed, and marks Stop mismatch when two consecutive reads disagree.
The stop check (hedged accounts). Every 300 seconds the platform compares the stop your broker holds with your strategy's, for every running or paused deployment. When the broker's stop is missing or looser and the take-profits agree, it sends your strategy's stop again from the second check that sees the same difference (about two check intervals later), and keeps sending it while the difference stands. It never loosens a stop and never removes one; a take-profit that differs is not changed by this check.
Trailing stop and break-even
On every price — also while paused, and on prices skipped under load — the engine runs the backtest's trailing and break-even rule for each position your broker has confirmed.
When the stop should move, the new stop is rounded to your broker's price grid, kept outside your broker's minimum stop distance, and sent to the broker as a change of the position's stop — together with your strategy's take-profit. Moves smaller than one tick are not sent. cTrader's own trailing stop is not used.
The broker's answer is recorded and shown. A refused move is not repeated by the trailing rule (the next tightening is sent); on a hedged account the stop check re-sends a tighter stop your broker does not hold.
While the platform is down or disconnected, or after the deployment stopped, the stop stays where your broker last has it.
How an order is sent and confirmed
- Every order is recorded before it is sent, and confirmed with your broker: an order counts as filled only when your broker reports the fill, and the entry and close prices, commission, swap and profit are the broker's. The broker's acceptance, fills (partial ones included), refusals and cancellations complete the record. An order the broker does not answer is re-checked by asking the broker what became of it; one that stays unexplained alerts our operators. A fill reported twice is booked once.
- From the moment a market order is sent it counts as an opening position, so a "no open position" condition on the following prices does not send a second one while the first is in flight. Within one evaluation, closes, deletes and modifies read the positions as they were when the evaluation started, and each open sees the orders sent before it (closing).
- Market orders are plain market orders: no price limit and no maximum slippage are sent, so they fill at your broker's price when they arrive; a backtest's slippage setting plays no part. No execution-speed figure is promised.
- Every order carries the label
ATH:{deployment}:{rule}:{id}, visible in cTrader. It is how the platform recognises its own orders and positions. - The journal shows each step: order sent (type, side, volume, levels), order accepted (the broker's id), filled or position closed (price, commission, gross profit, how it closed), rejected by the broker (its text and code) or refused before sending, stop and target changes sent, confirmed or refused, cancel sent and confirmed by the broker, and a resting entry order cancelled or expired at your broker.
When an order is refused
The order is marked Rejected with the reason. The activity log gets one Warning per rule and reason for each run of refusals — "{Market open | Limit open | Stop open | Market close | Partial close} {buy | sell} {volume} {symbol} was rejected by the broker: {reason}" — and the journal records every refusal with the broker's text and code.
An order the platform refused itself, without sending it to your broker — a volume or a price the symbol cannot take, a symbol your broker does not list, a close already in flight for that position — says "was refused before sending: {reason}" instead, in the activity log and the journal ("Refused before sending: {reason}.").
After a refused market open, that rule sends no new market open for 5 seconds, doubling with each consecutive refusal up to at most 60 seconds, until one of its opens is accepted. Pending placements and closes are not held back.
Orders the platform refuses before sending — a volume off your broker's minimum, step or maximum, or a price with too many decimals — appear the same way, with the reason stated.
Entries held back by the first-minute wait, a plan wind-down or an account drawdown hold send nothing and are not logged as refusals.
A resting order your broker cancels or lets expire is recorded, and you can be notified ("Pending order placed", "Pending order cancelled", "Pending order expired"). When your broker states that it cancelled the order or that it expired, the journal says so as information: "The resting order was cancelled at the broker." or "The resting order expired at the broker.", and for a cancel the platform sent, "Broker confirmed the cancel of the resting order." When your broker refuses a resting order instead (for example a stop that triggers without enough margin), the journal records it as a refusal, "Rejected by the broker", with the broker's text and code.
Orders that would arrive too late
- An order that opens or adds to a position — a market entry, a pending (limit or stop) entry, or a change of a pending entry's price or levels — is sent only while it can reach your broker within 3 seconds of your strategy's decision. Past that, for example during a short fault on our side, AlgoTradingHub does not send it late: the market may have moved since the decision.
- Such an entry is marked Rejected, nothing is opened, and the activity log says, once per rule while it repeats, "… was refused before sending: it was too late to send it, so it was not placed". A refused market entry waits like any refused market open (When an order is refused); your strategy decides again at its next evaluation.
- A late change of a pending entry is not sent either: your broker keeps the order at its earlier price and levels, the app shows the order at those terms again, and the activity log says "… the change to {price} was not sent: it was too late to send the change, so the order keeps its earlier terms". Your strategy sees the earlier terms at its next evaluation and decides again. A change your broker refuses is shown the same way, with the broker's reason.
- When AlgoTradingHub cannot tell whether your broker took a change — your broker did not answer in time, the connection dropped while it was sent, or a fault on our side made AlgoTradingHub handle the same change a second time — it asks your broker straight away which price and levels the order now has, and the app shows the order as your broker holds it. If your broker cannot be read right then, AlgoTradingHub asks it again a few times over about half a minute. If your broker did not take the change, the activity log says "… the change to {price} was not confirmed ({reason}). The broker holds the order at {terms}, so the order shows those terms.", and your strategy can send the same change again only after a short wait of a few seconds, as after a refusal. If your broker did take it, nothing more is written. Nothing is ever re-sent on its own: only your strategy's next evaluation changes the order.
- Orders that reduce risk are always carried out, however late: closing or partly closing a position, cancelling a pending order, and moving a stop loss or take profit, trailing and break-even moves included. A stop change that arrives after a newer one for the same position is skipped, so an older level never replaces a newer one.
- The time counts from the moment your strategy decided, on our server's clock — not from the candle's time — so a candle-close strategy on a quiet market is not affected.
- If a fault on our side stops an entry before it is sent, the activity log says "… was refused before sending: a fault on our side stopped it before it was sent, so it was not placed".
- When a fault leaves it uncertain whether an order reached your broker, the platform asks your broker by the order's label before doing anything else: an order your broker holds is recorded as placed, one it does not hold is reported not placed. An entry is never sent twice.
Pending orders, changes and cancels
Limit and stop entries are real broker orders, carrying their stop and target: good till the expiration you set, otherwise good till cancelled (expiry). Your broker triggers and fills them, also while the platform is down.
A pending order that would fill at once (on the wrong side of the market), or that carries an unusable number, is not sent — the same rules as the backtest.
Trailing-stop and break-even settings take effect when the fill arrives.
A delete rule sends a cancel; the order counts as cancelled when your broker confirms it.
A modify rule changes a resting order's price, stop, target or expiration (never its volume), or an open position's stop or target. A change of a resting order that your broker refuses, or that is too late to send, is not sent again by itself: the order shows the terms your broker holds — after several changes in a row, the last ones your broker took for certain — and your strategy's next modify decides again. A change your broker refused waits before it is sent again with the same values: 5 seconds, doubling up to a minute while your broker keeps refusing it; a change with different values is sent at once, and a change refused only for being too late does not wait. A change of a position's stop or target your broker refuses is recorded and not sent again; a later modify with different values tries again.
Closing and partial closing
A close acts on every symbol unless the rule has a parent, as in a backtest (close scope). Hedged account: a close closes each matching broker position by its id; a partial close takes up to the requested volume from each matching position. Netting account: a close is an opposite market order for the volume.
Several actions in one evaluation follow the same rules as a backtest (several actions in one evaluation): closes, deletes and modifies are decided first, then the opens one at a time, each seeing the orders sent before it, in flight included. A close or modify never reaches a market order the same evaluation sent: it has no position yet, and in a backtest the evaluation passes over it too.
Two closes of one position decided in the same evaluation are sent as one order, their volumes added up to at most the position's. A close sent while an earlier evaluation's close of the same position is still in flight is refused ("A close is already in flight for position {id}."); what remains is closed by a later evaluation.
Partial-close volume differs from the backtest. Live, the requested volume is capped at the position's volume, then rounded to the nearest volume step (halves away from zero) and raised to your broker's minimum before it is sent. A backtest rounds it down and skips a position when that gives 0 (partial close). The same partial close can therefore close a different amount live.
Hedged and netting accounts
- Hedged. Every opening fill is its own broker position. Several deployments can trade the same symbol on one hedged account; each sees and manages only its own positions. Each close, partial ones included, is one trade in the deployment's trades, as in a backtest.
- Netting deployments are turned off for now. A deploy, a restart or a portfolio deploy onto a netting account is refused: "Deploying to a netting account is turned off for now." The deploy wizard does not offer netting accounts or netting strategies. A deployment already running on a netting account keeps running, and can be paused, resumed and stopped; once stopped, it cannot be started again there for now. You can still backtest netting strategies. The rest of this section describes how netting deployments work when they are turned on again.
- Netting. Your broker keeps one position per symbol, so only one deployment may trade a symbol on a netting
account. A deploy, restart or portfolio deploy that would share a symbol is refused: "This is a netting account (one
position per symbol) and {strategy} (deployment #{N}) already trades {symbol} there. Two strategies on one symbol would
share one position, so this one can't start on this account."
- The deployment holding the symbol can be active, stopped but still holding a position there, or stopped with an order still open at the broker. A stopped deployment's kept position is checked with your broker every 300 seconds, so closing it by hand frees the symbol.
- Your connections of the same broker login count as one account. Your manual trades, and another AlgoTradingHub user connected to the same login, are not checked.
- Netting has not yet been verified against a real netting broker — in particular, whether the broker applies a new order's stop and target to the merged position. The stop check runs on hedged accounts only.
Trades you place yourself
The platform treats as its own only orders and positions carrying its label (
ATH:…). A position you open by hand is never attributed to a deployment: it is in no deployment's trades, positions, P&L, equity curve or strategy drawdown limit. The account's equity does include it, at your broker's figure — the account page's, and the Equity and Free margin a strategy reads. An account drawdown limit set to count the whole account counts it too.One exception: an account limit or a profit target on the whole account. When such a limit is breached, or the target reached, the positions you opened by hand that are open at that moment close too, and your manual pending orders are cancelled; a trade you open afterwards is left alone (your manual trades on the whole account). Applying a prop firm's rule set sets its limits and its target this way. A limit or a target that counts only your deployments closes only their positions.
Your manual trades' results do reach the balance your broker reports, which strategies read for sizing.
Closing a deployment's position by hand at the broker, fully or partly, is booked into that deployment's trades at the broker's price and money, with exit reason Strategy signal, and the strategy sees the position gone. A close made while the platform is not connected is booked when the connection is back, or at the next start (closes made while disconnected).
Changing a deployment's stop or target by hand at the broker:
- on a hedged account, a stop you loosened or removed is put back to your strategy's by the stop check (about two check intervals later) when the take-profits agree; that check never loosens a stop you tightened;
- every trailing-stop or break-even move sends your strategy's own stop and take-profit, which replaces a target you changed and can replace a tighter stop you set.
On a netting account, a manual order on a symbol a deployment holds merges into the same broker position, and the deployment does not account for your part.
In practice: do not trade by hand, or edit stops and targets by hand, on a symbol a running deployment trades.
The broker connection
No prices, no decisions
- There is no separate "stale price" switch: the engine acts on each price your broker sends, when it arrives. When no prices arrive — a dropped connection, an expired authorisation, a closed market — nothing is evaluated: no entries, and no exits by your rules either. Resting orders, and the stops and targets your broker holds, keep working at the broker; trailing stops do not move.
- No orphaned trades. Your broker's order and fill events are processed as they arrive, with or without prices, so a stop, a target or a close by hand is booked while the connection is up. What happened while it was down is checked at the next reconnect or start (closes made while disconnected): every position a deployment opened is then still held and managed, booked closed from your broker's own deals, or handed back to you with a Warning in the activity log — never left unaccounted for.
- A deployment that falls behind the prices is told so only once the throttling has lasted a while (heavy load).
When the connection drops
- The platform reconnects by itself, waiting 1, 2, 4, 8, 16, and 30 seconds between attempts (the last wait repeating), without limit, and subscribes your symbols again.
- When prices return, the engine fills in the one-minute bars it missed from your broker's history, so indicators read correct history afterwards. Candle closes that fell inside the gap are not evaluated afterwards: a rule that would have fired on one of them does not fire.
- cTrader does not resend order and fill events that happened while the connection was down, so when the session is back each deployment's positions are checked against your broker (closes made while disconnected).
What you see, and what you are told
- Every deployment on the account records each connection change in its journal: "Broker connection: Reconnecting (connection dropped).", then "Broker connection: Connected."
- From the drop until the session is back, the Live accounts list shows the account as Disconnected, and the account page the banner "Account disconnected — No word from the broker since {time} UTC. Open trades are still at the broker." — only while a deployment is active on the account. The session's own retries do not interrupt it: the account reads disconnected until it is connected again. While the platform is reconnecting by itself the banner offers no Reconnect button.
- If the session is still down 60 seconds after the drop, you are notified Broker disconnected (Critical), and Broker reconnected when it is back. A drop that heals sooner sends nothing. The platform closing a session itself — the last deployment on the account stopped, a server restarting — never sends "Broker disconnected" (alerts).
When your authorisation expires
If cTrader rejects the stored authorisation, the platform stops reconnecting, the account shows "Re-link needed", and you get "Re-link required" (Critical). How access is refreshed, and how to re-link in place, is on Brokers → staying connected.
Deployments stay Running but receive no prices, so nothing is evaluated until the account is re-linked. Re-linking in place keeps the account, its deployments and their history.
When the market is closed
Over the weekend and the daily break no prices arrive, so nothing is evaluated. Positions, resting orders and the stops and targets your broker holds stay at the broker, which charges its swap at rollover; each charge is in the journal.
The first price after the reopen closes the bars that were still open: Friday's last bars, and the candle-close rules on them, are evaluated then, at the reopen prices.
An On Timer rule fires once on the first price after the break, then resumes on the whole minutes (see On Timer).
A stop with Close all while the market is closed cannot fill; the close is retried every 60 seconds until it does.
Instruments your broker quotes at the weekend (crypto) keep being evaluated.
Heavy load: your share of the server
This section is the one statement of the heavy-load rule; other pages link here. Each deployment has a share of the live server's computing. When a deployment falls behind the prices arriving for it, the engine evaluates the newest price of a symbol and may skip evaluating your rules on older prices of the same symbol that are still waiting. It skips more the longer the deployment stays over its share, and stops skipping once it is back under it.
Never skipped: a price that closes a candle — your candle-close rules always see their close. Still done on a skipped price: bar building, trailing-stop and break-even moves, your strategy's drawdown limits and the equity record. Skipped: your rules, and per-price status holders and record sets. Stops and targets your broker holds do not depend on it.
Load never pauses, stops or detaches a deployment.
What you see: the journal says "Throttled: this strategy is using more than its share of the host; ticks are coalesced." when it starts and "Released: this strategy is back within its share of the host; every tick is evaluated again." when it ends. If it lasts 15 minutes you get "Strategy throttled" (Warning), at most once a day per deployment.
Outside a throttle, a skip can also happen in a deep backlog of one symbol's prices; those skips are not shown to you today. In an extreme backlog of prices waiting for one deployment, the oldest waiting prices are dropped and reach neither your rules nor the bars.
If a deployment is throttled often, it evaluates too much on every price: move rules to candle close or shorten long ranges (complexity).
Pause, stop and restart
Video tutorial · G4 · on YouTubePause, stop, restart and updateDeployment states
| State | Meaning |
|---|---|
| Running | Evaluating your rules (shown from the deploy, during warm-up too). A "Detaches in {countdown}" banner means a plan wind-down is on |
| Paused | You paused it (below) |
| Halted | Its own Overall or Static overall drawdown limit was reached: positions closed at market, pending orders cancelled; stopped until you restart it |
| Account limit | The account's Overall drawdown limit stopped every deployment on it and closed their positions; nothing restarts there until you reactivate the limit |
| Failed to start | A start was refused; the reason is shown; its positions were left as they were |
| Wound down | Your plan's wind-down ended: stopped, positions handed back to you at the broker |
| Stopped | You stopped it (closing or detaching its positions), its strategy was deleted, or the engine stopped on an error its automatic restarts did not clear (below) |
- Lists show "Stopped" for every stopped deployment; the deployment's own page says which kind of stop it was.
Pause
- Pause stops new entries from the next price: your open and pending-order rules are not evaluated, and the deployment's resting entry orders are cancelled at the broker (they are not restored on resume). The journal says "Paused: no new entries, resting entry orders cancelled; open trades are still managed."
- Open trades are still managed while paused: your rules' closes, partial closes, deletes and changes run on every price as before, and so do the stops and targets at the broker, trailing-stop and break-even moves and fills.
- The deployment's own drawdown limits keep measuring and acting while paused — a timed limit closes its positions, an Overall or Static overall limit halts it — and its equity curve keeps its points. An account drawdown limit still counts it, and it still uses a live slot.
- An open rule's crossover is not followed while paused: on resume the first evaluation compares with the value before the pause.
- Resume works only on a paused deployment, and is refused while the account's Overall drawdown limit is locked. Entries are evaluated again from the next price.
- A server restart or one of our updates brings a paused deployment back paused: still managed, still measured, opening nothing until you resume it.
Stop
- When you stop a deployment you choose what happens to its open positions. Both choices first stop all new orders and cancel its resting entry orders.
- Close all positions: orders already in flight are allowed to land, then every position is closed at market. A close that does not complete (the market is closed, an answer is lost) is retried every 60 seconds until it does; meanwhile a restart is refused: "Still closing deployment #{N}'s positions — try again in a moment." The journal says "Stopped: closing every open position."
- Detach: open positions stay at your broker with whatever stops and targets it holds, no longer managed — trailing stops stop moving. The journal says "Stopped: open positions are kept."
- Deleting a strategy stops its deployments with Detach. A broker account cannot be removed while one of its deployments is running or paused.
Restart
Restart brings a stopped deployment back as the same deployment: its trades, journal, equity curve and drift baseline are kept. Its log says "Restarted. It had been stopped since {date} UTC; its trades and history are kept."
Every deploy check runs again. Deploying the same revision of the same strategy to the same account does the same: it restarts the stopped deployment instead of creating a second one.
Kept positions are taken back. Before it starts, the positions its stop left open are checked with your broker in one read:
- hedged: a position still open with the same instrument, side and size is taken back and managed again — your rules can then close it; one your broker closed meanwhile is booked closed from the broker's deal history when that history proves the whole volume; anything resized, unprovable or unreadable stays yours;
- netting: each kept net position is checked the same way; a position that flipped at the broker is booked closed for the part that closed it, and the opposite side is yours.
The strategy's own drawdown limits start afresh: the drawdown that stopped it is not carried over (a restart you make is the one start that does this — a server restart, an update or an automatic restart after an error keeps them).
Refused also when the strategy was deleted ("This deployment's strategy was deleted; it can't be restarted.").
Changing what runs
- A deployment runs the strategy revision it was deployed with. Editing the strategy afterwards changes nothing that is running, and a restart runs the same revision. To run your changes, deploy the new revision: it becomes a new deployment beside the old one — on a netting account only if they trade different symbols.
- One strategy can run on several accounts, and on one account each of its revisions runs once: deploying a revision that is already running or paused there is refused, and deploying one whose copy there was stopped restarts that copy.
Plan wind-down
- When your plan stops covering a deployment, it keeps running for a grace period without new entries: new entries are refused, resting entry orders are cancelled when the grace starts (and not restored), and exits, stops, targets, trailing stops and fills continue. At the end it is stopped and its positions are detached — never closed — and it reads Wound down. Periods and what ends a wind-down: the wind-down rules.
If the engine itself fails
- If a deployment's engine stops on an internal error, the platform restarts it by itself, up to 3 times, after a pause that grows each time: 30, 120, and 600 seconds.
- While it waits the deployment stays Running (or Paused, if it was): nothing is evaluated, and its positions stay at your broker with whatever stops and targets it holds; trailing stops do not move.
- Each error is in its journal ("The strategy loop stopped on an internal error. It restarts automatically in 30 s (restart 1 of 3) …") and sends you "Deployment faulted" (Critical), naming the restart.
- An automatic restart is the platform's, like a restart after one of our updates: its unfinished orders and its positions are checked with your broker first (what happened meanwhile), and its drawdown limits carry on — a timed pause in force stays in force. Its journal says "Restarting automatically after the crash (restart 1 of 3) …".
- If the error comes back after the last restart, the deployment becomes Stopped, you get "Deployment faulted" once more ("stopped after 3 automatic restarts"), and its positions stay at your broker, unmanaged until you restart it.
- The count starts over once the deployment has run 60 minutes without an error, so an error that comes back at every hourly candle still ends in a stop.
- Stop while it waits cancels the restart and does what you chose for its positions. A stop already on its way when the error happens is not undone by a restart.
- Pause while it waits keeps the restart — the same wait, the same count — and the deployment comes back paused: no new entries, its open trades managed and its drawdown limits measured, as any pause. Its journal says so, and so does the notification of an error that happens while it is paused ("automatic restart 2 of 3, paused"). An error of the paused deployment counts towards the same restarts.
Our updates and outages
When we update the live servers
- Updates of the live servers are started by hand — a code change never restarts them by itself. No update window is published: an update can happen at any time, and while it lasts every deployment is interrupted as described below.
- During an update each deployment stops sending orders, lets orders already sent land, and keeps its positions at your broker, with whatever stops and targets your broker holds; it stays Running (or Paused). When the servers are back, every running or paused deployment comes back by itself, as it was, with nothing for you to do: its unfinished orders are matched with your broker's deal history, it warms up again from the broker's history, and it evaluates from the next price.
- During the gap nothing is evaluated — no entries, no exits by your rules, no trailing moves — and candle closes inside it are not evaluated afterwards.
- On every such start: new entries wait for the first full minute; the strategy's own drawdown limits carry on where they were — a timed drawdown pause in force stays until its window passes, windows keep their start, a warning already given is not given again, and the Overall limit's highest balance is rebuilt from the deployment's closed trades; paused deployments come back paused. The limits' state is saved only when it changes (a window opens, a limit is reached, a warning is given), never on every price.
A start can be refused after an update
- Each start rebuilds the deployment from its revision and applies today's limits and checks: the complexity limit, the indicator limit, the instrument catalog, your broker's symbol list, the history needed to warm up. A revision that passed when it was deployed but fails today is refused at its next start: it becomes Failed to start with the reason, its open positions stay at your broker unmanaged — neither closed nor detached — and no notification is sent today. A restart checks the same revision again; deploy a revision that passes.
What happened at your broker meanwhile
- At the next start, each order that was sent but not finished is matched with your broker's deal history since it was sent: fills found are booked once each at the broker's prices and money; a market order the broker never filled or never acknowledged is marked failed and is never re-sent (your rules decide again on the next prices); a resting limit or stop order still working stays working. Kept and netting positions are checked as on a restart.
Closes made while the platform was not listening
- A stop loss, a take profit or a close by hand can close a deployment's position while the platform is not receiving
your broker's events — a dropped connection, one of our updates, a deployment's start, a paused deployment after an
update. cTrader does not resend those events. So at every start (a resume and a restart included) and every
reconnect, the platform compares the deployment's open positions with your broker's account, in one read:
- a position your broker still holds stays as it is;
- a position your broker closed is booked into the deployment's trades from your broker's own close deals — their price and money — and the activity log says so ("On start this deployment recorded …" / "After a reconnect this deployment recorded …");
- a position your broker no longer holds, whose close its deal history does not prove, is handed back to you: it leaves the deployment's positions and trades, with a Warning in the activity log naming it.
- If your broker cannot be read at that moment, nothing changes, and the next start or reconnect checks again.
- Netting deployments check their net positions the same way, at every start and every reconnect.
Whose numbers you see
From your broker: the balance, and for every closed trade its profit, commission (both sides, including the broker's currency-conversion fee) and swap, in the account currency, to the cent.
From your broker, live, while you look: the account page's equity, floating P&L, used and free margin, open positions and pending orders, and the deployment page's open positions with their floating P&L. They come through a read-only connection AlgoTradingHub holds while the page is open (what the account page shows).
From your broker, whenever the deployment page shows it: the price chart. Its bars are your broker's own candles for the deployment's symbol, read through the same connection, and never the platform's stored market data.
- History. Scroll back as far as your broker keeps history, past the deployment's start, which is marked on its bar.
- Live prices. While the deployment runs, the newest candle moves with your broker's prices, up to ten times a second, and the bid and ask are drawn as lines.
- When your broker cannot be read, the chart says so and tries again a few seconds later.
Computed by the platform from live prices: the floating P&L your strategy and its drawdown limits act on, the deployment's equity curve, and each trade's MFE and MAE (hedged accounts). How each of these figures is defined, sampled and shown is on Live deployment figures.
When the live connection is not available, the account page shows the platform's own figures. Those price positions with your broker's contract size, as the deployment's own figures do. Their equity and free margin are the account's, as described under what runs live above.
The journal
Each deployment has a journal with two views. Log, kept 365 days: lifecycle (started, warmed up, paused, resumed, stopped, restarted), errors, decisions ("Conditions met", with the whole condition tree and the values read), orders sent, accepted, filled, changed and rejected (with your broker's text and code), positions closed and how (stop loss, take profit, stop-out), cancels, stop and target changes with the broker's answer, swaps (at each rollover and at close), broker connection changes, and drawdown-limit actions. Decisions, kept 7 days: every change in a rule's conditions and the values read, browsable by time window, with gaps marked.
The account's Activity view merges its deployments' logs, with filters.
All times are UTC, to the second. Trades and their P&L are kept independently of the journal's retention.
A position your broker closes for a stop-out is recorded with exit reason Stop out.
Not yet documented
- Which price your broker uses to trigger stops and targets: the platform leaves cTrader's default, whose API description is given above; it has not been checked on an account.
- Whether a deployment that was running when its account needed a re-link starts trading again by itself after the re-link, or must be restarted. Until this is settled, check its journal for "Broker connection: Connected." after re-linking.
- Whether the minimum stop distance the platform reads from cTrader matches, for every symbol, the one the cTrader app shows.
- How long an update of the live servers interrupts trading.
Questions?support@algotradinghub.io