Exchange trading accounts (MEXC and Bybit)
Demo and exchange accounts, Ask me versus Auto execution, the default stop-loss rule, trade management after entry (exit policies, consensus-flip exit, max loss guard), exchange-synced numbers, paper versus live, the keyring, API keys, budgets, risk checks and the crash gate.
Overview
The Trading page executes confirmed pattern signals on trading accounts. Every user has an automatic Demo paper account (see Demo trading) that works on every plan; in addition you can create exchange accounts with your own API keys on Bybit, MEXC (futures API open since 31 March 2026), Binance Futures, OKX, Bitget, Gate, KuCoin Futures or BingX. The account form shows the key permissions each exchange needs; OKX, Bitget and KuCoin also need the API passphrase, which you enter after the secret separated by a vertical bar (secret|passphrase). KCEX has no public trading API and cannot be connected. Each account has an exchange, a mode (Paper or Live), an execution mode (Ask me or Auto), a list of pairs with daily budgets, and shares the global risk settings. The number of exchange accounts you may create and whether you can go live depends on your plan (api_trading feature and max accounts on the Account page); the demo account never counts.
Ask me versus Auto
Every account has a segmented switch Ask me | Auto in its header (the demo account also shows it on the demo card).
- Ask me (default for new exchange accounts): a signal that passes the risk checks does not open a trade. The executor stores a trade proposal with the suggested quantity, leverage, margin, stop-loss and targets, and sends a
trade_proposalalert (trade sound). The proposal appears as a popup and in the Trade proposals panel at the top of the Trading page. You can edit margin, leverage, stop-loss, TP1 and TP2; the card shows the cost preview (round-trip fees on the leveraged notional, the next funding payment and the break-even price). Approve re-runs the risk checks and executes exactly like Auto mode (market order, or a resting limit order when the account's entry mode is limit); Reject discards it. A proposal expires with the signal (signal expiry (bars) x the signal timeframe) and is then marked expired. The history (executed / rejected / expired / failed with the reason) is kept under history in the panel. - Auto: the signal is executed immediately within the risk rules and the pair budgets. The demo account starts in Auto so it collects results without you.
The popup carries the same editable card, so a proposal can be approved from any page.
Default stop-loss
Every trade the executor opens (market or limit, Auto or an approved proposal) receives a stop-loss according to Global risk settings > Default stop-loss:
- % of price (default,
stop_mode = price_pct,default_stop_pct = 25): the stop sits 25 % of price away from the entry whatever the leverage:entry x 0.75for a long,entry x 1.25for a short, regardless of the take-profit distance (there is no risk:reward ratio). Be aware that above roughly 4x leverage the exchange liquidates the position before a 25 % price move, so in practice the max loss guard (Trade management) or liquidation ends a losing trade first. - % of margin (
stop_mode = margin_pct): the stop is placed where the loss equals the percentage of the collateral:entry x (1 - pct/100/leverage)for longs. 25 % of margin at 10x is a 2.5 % price move. - signal plan stop (
stop_mode = plan): the signal's own tight stop (pattern invalidation) is used, as in earlier versions.
Proposals show the resulting stop and let you override it; changing the leverage on a proposal re-applies the rule. The manual I took this position form prefills its stop-loss field with the same rule while the field is empty. On live accounts the stop and TP1 are placed on the exchange as reduce-only orders.
Creating an exchange account
- Click + exchange account in the tab strip, type a name, choose MEXC or Bybit, click Create (needs the api_trading plan feature).
- The account starts in Paper mode, Ask me execution, a simulated balance of 1000 USDT and status unconfigured.
- Switch enabled on. When it is off, signals are logged but no orders are placed.
Each account is a tab; the dot is red in live mode, green when enabled in paper mode, grey otherwise. A number badge on a tab counts the proposals waiting on that account.
Paper versus live
Paper mode fills orders against the live price with the configured taker_fee and slippage_bps, debits fees from the paper balance and credits results. It uses exactly the same executor as live trading, so switching later changes only where the orders go.
The keyring
API keys are encrypted at rest with a password only you know, derived with PBKDF2 and Fernet. The Keyring bar at the top of the page shows locked or unlocked.
- The first unlock sets the password (badge first unlock sets the password). At least six characters. There is no recovery: if you forget it, delete and re-enter the keys.
- Type the password and click Unlock before saving keys or trading live. Lock forgets the decrypted keys and disconnects live brokers.
- Keys are never displayed again after saving. In the hosted service each user has their own keyring, unlocked per login session in memory only.
API keys
Create the key on the exchange with trade permission only and no withdrawal rights. Then in API keys: paste the key and secret, click Save keys (the keyring must be unlocked), and Test connection. In paper mode the test checks public endpoints only; in live mode it signs a request and shows your balance. The status badge in the account header becomes connected or error with the message on hover.
Switching to Live
The Paper / Live toggle refuses to switch until the keyring is unlocked and keys are stored, then asks for confirmation. In live mode the account header is outlined in red. Live mode and API keys require the api_trading feature of your plan; the demo account cannot go live.
Pairs and budgets
Only symbols in the account's Pairs table are traded. Per pair:
| Field | Meaning |
|---|---|
| Daily budget | Maximum margin in USDT deployed on this pair per day. The executor uses the remaining budget as margin for the next trade. Resets at budget_reset_hour_local. |
| Leverage | Overrides the account leverage for this pair. |
| Max trades/day | Cap per pair per day (default 3). |
| Enabled | Pause a pair without removing it. |
(not watched) next to a symbol means it is not on your watchlist, so no signals will arrive for it.
Entry mode and leverage
entry = market: when a signal arrives and the price is still before the chase limit, a market order is sent; leverage is set first; a reduce-only stop and TP1 order are attached (live only). entry = limit: if price is not already inside the entry range, a limit order rests at the near edge of the range and is cancelled when the signal expires (signal expiry (bars)). Pending orders show in Open positions with state pending until filled.
leverage on the account header is the default; pairs can override it. Position size is budget x leverage / price, rounded down to the exchange's quantity step; a budget too small for the minimum quantity raises a Budget too small alert.
Risk checks
Before every entry the executor checks, in order: account enabled; pair enabled; remaining daily budget above 1 USDT; max trades per day; max_daily_loss_pct of the reference balance not reached (trading pauses for the day); max_concurrent_positions; no open position on the same pair; loss_cooldown_min since the last losing trade on the pair; and the crash gate.
The crash gate refuses any long while the pair's crash level is warning or critical (crash risk warning: no new longs). With Auto-close longs on crash critical on, a critical alert closes every open long on the pair, or on every pair when the alert is market-wide, and sends an Auto-closed long positions alert. These are in Global risk settings at the bottom of the Trading page; click Save risk settings after changing them.
Monitoring and closing
Every five seconds the monitor fills or expires pending limit orders, expires stale proposals, closes paper trades at TP1 or the stop, synchronises live trades with the exchange and runs the trade management described below (exit policy, consensus-flip exit, max loss guard). Close in the open positions table closes one trade at market; Close ALL positions at the top of the page closes everything on every account after a confirmation. The Trade log lists every trade with mode, prices, margin, P&L, fees, funding and reason.
Trade management after entry
Reaching TP1 or the stop used to be the only way a trade ended, so a trade that went well for a while could still give everything back when the market turned. Since this version every open trade (demo, paper and live) is managed every five seconds by three independent layers. Everything they do is written to the trade's management log (the log button in the Manage column) and raised as a trade alert; on live accounts every stop move is executed on the exchange (the old reduce-only stop is cancelled and a new one placed), so the exchange stop and the one you see in the table are always the same.
1. The exit policy
Each trade carries the exit policy that paid best in the pair's exit-policy backtest (also shown on the consensus card). While the pair has fewer than 30 simulated trades the default exit policy from Global risk settings > Trade management is used (partial_trail by default). Distances are in the pair's 5-minute ATR, so a volatile pair gets more room than a quiet one.
| Policy | What the executor does after entry |
|---|---|
| partial_trail (default) | At TP1 it closes partial_close_pct (50 %) of the position at market and moves the stop to break-even (entry plus the round-trip fees and funding, so it really is zero net). The rest has no target: its stop trails the best price at trail_atr (1.5) ATR and only ever tightens. Break-even is also applied before TP1 once price has been breakeven_after_atr (1.0) ATR in favour. Closed with reason trailing stop or break-even stop. |
| breakeven | Once price has been breakeven_after_atr ATR in favour the stop moves to break-even and never back; TP1 stays the target. |
| time_stop | If after time_stop_mult (3.0) x the signal's expected bars (24 bars of the signal timeframe when unknown) the trade is still open, it is closed at market with reason time stop. The Time stop column counts down. |
| fixed, wide_stop, wobble_stop | Nothing beyond the initial stop and TP1: the backtest found that managing the trade did not help on this pair. |
Without an ATR (pair not analysed yet) partial_trail behaves like fixed, because the remainder could not trail.
The Open positions table shows the Policy, the current Stop with a BE (break-even) or trail badge, the Best price reached, whether the partial close is done, and the time-stop countdown. The Manage column lets you do the same by hand: BE moves the stop to break-even, 50 % closes half and moves the stop to break-even, Close closes everything, log expands the management log.
2. Consensus-flip exit
When the pair's own consensus turns against the trade (SHORT or lean short while you are long, or the mirror) with a conviction of at least flip_exit_conviction (0.65), or when the crash radar reaches warning or critical while you hold a long:
- in profit: the trade is closed at market with reason
consensus flipped(the thing the owner asked for: do not give a winner back); - in loss: the stop is tightened to price minus flip_tighten_atr (1.0) ATR for a long (plus for a short), never loosened, and a warning alert
Consensus flipped against your LONG BTCUSDT; stop tightened to Xis sent.
The consensus flip exit setting chooses close if in profit, tighten if in loss (default), tighten the stop only, or off. A flip acts once; it re-arms when the consensus is no longer against the trade. My Positions sends the same warning (with the suggested tightened stop) for positions you track by hand.
3. Max loss guard
max_loss_pct_margin (50 % by default): whatever the policy and whatever the exchange stop, a trade whose net unrealised loss (fees and funding included) reaches this percentage of its margin is closed at market with reason max loss guard. It is the backstop for a very wide price stop (the default stop is 25 % of price, which at 10x is far beyond liquidation), for an exchange stop order that could not be placed, and for a stop that slipped. Set it to 0 to disable it. 50 % of the margin is a 3.5 % price move at 10x and 7 % at 5x.
Exchange-synced numbers (no guesswork on live trades)
Once a live trade is on the exchange, the exchange is the source of truth. Every 5 seconds the monitor pulls the position for that symbol and overwrites the local record: entry (if the fill differs), qty, leverage, unrealised PnL (net of the fees charged on the fills so far), mark price, liquidation price and the margin where the exchange reports it; fees are summed from your fills since the trade opened. Such trades carry the badge exchange and the tooltip synced n s ago. The local stop/target check is off for live trades whose stop orders exist on the exchange (the exchange handles them); it only acts as a fallback when the stop orders could not be placed.
When the exchange no longer shows the position (stop or take-profit hit, or you closed it by hand in the exchange app), the local trade is closed from the exchange's realised-PnL history (Bybit: the v5 closed-PnL record with average exit price and fees; MEXC: the reduce-only fills) with reason closed on exchange. A missing position is confirmed twice and never within 30 seconds of the fill, so a short API hiccup cannot close a trade by mistake.
Paper and demo trades show the same columns, computed locally with the exchange fee schedule and the exchange's own funding history: Unreal. PnL is gross PnL minus the open fee, the expected close fee and funding settled so far; Funding and Liq. use the same estimates as My Positions. They carry the badge paper. Realised P&L of every closed trade is net of fees and funding.
Demo account and reset
The Demo account (first tab, card at the top of the page) is created automatically with the demo balance (Settings > Trading > demo_balance_usdt, default 10 000 USDT), Auto execution and every pair of your watchlist attached with a daily budget of balance / 20 at 5x; pairs you add to the watchlist later join it automatically while it is enabled. It uses the same executor and live prices as a paper exchange account, so its results are real-data results. Reset closes open demo trades at market, archives the history (statistics and the trade log start again) and restores the balance. See Demo trading for the statistics card.
Note: a trading account cannot see orders you place by hand. Track those in My Positions.
Hyperliquid (on-chain perpetuals)
Hyperliquid has no API key in the usual sense. Create an API wallet on hyperliquid.xyz under API (it can trade, it cannot withdraw), then enter your wallet address as the API key and the API wallet's private key as the secret. Perps settle in USDC; everything else (signals, stops, management) works the same. If the platform has a builder address configured, the first order approves the builder fee once; it shows on-chain.