Skip to content

Active window ​

The active window is the number of levels closest to the current price whose orders are actually placed on the exchange. The other levels sleep and switch on as the price moves. It is needed so that a large grid does not hit the exchange order limit.

What it is ​

On large grids (100+ levels) the exchange may limit the number of simultaneously open orders. The active window is the N levels closest to the current price whose orders are kept on the exchange. The other levels are stored as “dormant” and activate automatically as the price moves.

The exchange limit is 500 active orders for the whole exchange account (separately for spot and futures, shared by all keys of the account). The bot keeps a reserve of 20 orders and does not place new ones beyond it, and at 80 % of the limit it sends a warning — see Exchange order limit.

How the window behaves in practice:

  • only the orders of the levels inside the window are on the exchange; as the price moves the dormant levels are activated and the distant entry orders are removed;
  • orders that close the position (for Long — selling what was bought, for Short — the buyback) outside the window are not removed — that is the position, it cannot be left without an exit;
  • during a pause the window stays where it is. After ▶️ Resume (and after the price returns to the range) the bot moves the window to the current price: entry orders appear near the price, the distant entry orders are removed.

Where it is in the bot ​

  • At creation: 🏠 Home → 🤖 Bots → ➕ Grid bot — in the wizard in the Sync app, the Active window field of the More options block. It works on spot and on futures.
  • On a running bot: 🏠 Home → 🤖 Bots → the bot → ✏️ Edit — the app opens, the Active window edit.
  • In the card: the line “🎯 Active window: 10 levels (two-layer buffer)”.
  • On the website app.sync.trade: at creation — the same Active window field (All levels / your own number); on a created bot — Grid bots → the bot → Change settings → Active window (All levels or Custom number (1–200)) → Apply. The rules are the same as in the app: entry orders outside the window are cancelled at once, the missing ones are placed. See Bots in the cabinet.

How to set it up ​

  1. At creation the Active window field explains: “How many levels near the price keep orders on the exchange at the same time.” Whether the window is needed: with more than 100 grids (for example 120) it is worth enabling — 50 is recommended — to stay within the exchange's limit (500 orders per symbol); with 50 and fewer grids it is not needed, keep All levels.
  2. Choose All levels, 10, 50 or 100, or enter your own integer from 1 to 200.
  3. On a running bot: ✏️ Edit in the card → Active window in the app → All levels, 10, 50, 100 or the field Custom number (1–200) → Apply; under the choice is the current value, for example “Now: 10”. The edit window warns that the change applies right away: if the window gets narrower, the bot cancels entry orders outside it on the exchange (buys for Long, sells for Short, both for Neutral), while orders that close an already open position and partially filled orders stay; if it gets wider or “All levels” is chosen, the bot places the missing orders (if the bot is paused — after ▶️ Resume). The position does not change. The app answers “Command sent. The result will arrive in Telegram and show up here in a few seconds.”, and the notification bot sends “✅ Grid edit applied” with the bot name and the line “🎯 Active window: 50 levels. Entry orders outside the window were cancelled on the exchange, missing orders inside it are being placed (if the bot is paused — after «▶️ Resume»). Orders that close the open position keep working. The position does not change.” If something stayed outside the window, there is one more line: “ℹ️ Partially filled orders left outside the window: 1 — the bot does not cancel them, they keep working until filled.” or “⚠️ Orders outside the window that could not be cancelled: 2 — they stay on the exchange. Apply the window again later.” If the edit did not go through — “⚠️ Change not applied” with the reason (for example, the exchange did not answer — then nothing was changed).
  4. If the bot has no grid right now — it is still waiting to start (price trigger) or the grid was removed by a failed recreate — the window is just saved: “🎯 Active window: 50 levels. The grid is not running right now — the window applies when it starts.”

What a window change does on a started grid (the window is centred on the level at the current price):

  • narrower window or window enabled — entry orders outside the window are cancelled on the exchange at once (buys for Long, sells for Short, for Neutral both buys and sells without an open position). The bot checks that the orders are really gone and only then frees the level — room in the order limit frees up right away. Not cancelled: orders that close an already open position (for Long — selling what was bought, for Short — the buyback) and partially filled orders — they keep working until they fill;
  • wider window — the missing orders inside the window are placed right away (on a paused bot — after ▶️ Resume);
  • window disabled («All levels») — «sleeping» levels switch on: entry orders are placed on all levels the same way as when the grid starts (for Long — buys below the price, for Short — sells above it, for Neutral — both), on a paused bot — after ▶️ Resume;
  • price outside the range — the window is pressed to the edge of the grid nearest to the price: that is where trading continues when the price comes back;
  • if the exchange did not answer (no price or no order list) — nothing changes, you get “⚠️ Change not applied”.
ValueWhen to use it
10The narrowest window, for very large grids (500+ levels)
50A balanced window, recommended for grids of 100-200 levels
100A wide window: most of the grid is active on the exchange
All levelsNo limit (the default)

Example with a calculation ​

A Long grid of 60 grids (61 price levels) with a window of 10: about 10 orders closest to the price are on the exchange, not one order at every level below the price. When the price passes a level, the bot removes the most distant entry order and places a new one closer to the price.

Why this matters with the limit of 500: two Neutral bots of 200 grids (201 price levels) each without a window (buys below the price and sells above it — one order per grid) make 400 orders, that is 80 % of the account limit, and you will get “⚠️ You are using 400 of 500 active orders on the exchange…”. The same two bots with a window of 50 take about 100 orders — leaving room for signal trades and for DCA bots on the same account.

Limits and allowed values ​

ParameterValueNote
Window size1–200 or all levelsan integer
Defaultall levels
Exchange order limit500 per accountthe bot reserve is 20 orders, a warning at 80 %
Changing it on a running botapplies at onceentry orders outside the window are cancelled; orders that close the position and partially filled ones stay; the position does not change

Common mistakes and what the bot says ​

  • “⚠️ Enter an integer from 1 to 200 (or pick a button).” — you entered 0, 250 or a fraction in the field Custom number (1–200) of a running bot.
  • “⚠️ You are using 400 of 500 active orders on the exchange…” — enable or narrow the active window of a large grid: the bot cancels the entry orders outside it at once and frees up room. There is more in the article You are using N of 500 orders.
  • After narrowing the window, some orders outside it are still on the exchange — these are orders that close an already open position or partially filled orders: the bot does not cancel them, they keep working until they fill.
  • “⚠️ Orders outside the window that could not be cancelled: N — they stay on the exchange.” — the exchange did not confirm the cancellation. Apply the same window again in a few minutes.