A trading engine that only trusts its own prices

Each trader account runs on its own engine. It fills orders only at the platform's own server prices, keeps the money maths exact, and records every step before it tells anyone the result.

Orders

Market, limit and stop orders. Stop-loss and take-profit on any position. Close a whole position or part of it.

A pending order whose level has already passed when it arrives is refused, so it can't fill at a price the trader never asked for.

Hedged positions

A buy and a sell on the same pair stay as separate positions. Nothing is netted.

Margin and leverage

Leverage and margin are set per account group. Pending orders are checked for margin when they are placed. Stop-out closes the largest losing position first, then the next, until the margin level is back above the line.

Costs

Commission per lot, and overnight swaps at each pair's rollover with a triple-swap day. Both count in equity and in the daily loss.

Seven FX majors

EUR/USD, GBP/USD, AUD/USD, NZD/USD, USD/JPY, USD/CHF and USD/CAD. Trading follows FX market hours, Sunday 17:00 to Friday 17:00 New York time.

Exact money

Prices and money are exact decimals, never binary floating point. Money is rounded to the cent when it is posted.

Fills come from the server, never the browser

Every fill uses the latest usable price the platform itself received. A price shown in a browser is never used to fill anything.

Every fill records the ID of the quote it used, so any trade can be traced back to the exact price behind it.

The order ticket in the web trader: market, limit and stop tabs, volume, stop-loss and take-profit, Sell and Buy buttons with live prices, and the margin the order needs.
The order ticket says the order fills at the next server price, and shows the margin it needs.

When each order fills

The same table drives every account. Our tests run through every row of it.

OrderTriggers whenFills at
Market buy or sellIt is processedThe latest usable ask (buy) or bid (sell)
Buy limitAsk is at or below the limitThat ask: the limit or better
Sell limitBid is at or above the limitThat bid: the limit or better
Buy stopAsk is at or above the triggerThat ask, which can be worse after a gap
Sell stopBid is at or below the triggerThat bid, which can be worse after a gap
Stop-loss or take-profit on a buyBid reaches the levelThat bid
Stop-loss or take-profit on a sellAsk reaches the levelThat ask

A retry never trades twice

Networks drop. Traders press buttons twice. The engine is built for both.

One ID per order

Every order and close carries its own ID. Send the same one again, after a timeout or even across a server restart, and you get the original result back. It never trades a second time.

Recorded before it is confirmed

An accepted request is written to the journal before the trader is told it was accepted.

One engine per account

Each account has its own worker that takes events strictly in order. Sequence numbers, not clocks, decide what happened first.