License Key
The licence key from your purchase email. Without a valid key the strategy does not arm.
User Guide
BookPilot watches the Level 2 order book (market depth) tick by tick. It has two signal engines. Pressure Break fires when the resting size on one side of the book outweighs the other side and the imbalance holds. Pulled Wall fires when a large resting order (a wall) near price gets pulled without trading, which suggests it was there to mislead. A short-term forecast can confirm each signal, and Rules of Engagement plus daily limits decide whether it may trade. Entries are limit orders just behind the best bid or ask, with a fixed bracket.
Most order flow tools look at trades that already happened. BookPilot looks at the resting orders that have not traded yet: the size waiting on the bid and on the ask, level by level. It reacts within milliseconds when that book becomes lopsided or when large orders disappear.
Pressure Break adds up the size on the first Pressure Break Depth levels of each side. When the bid side is at least Pressure Break Ratio times the ask side, a long candidate starts (a short candidate when the ask side is heavier). The signal fires if the ratio stays at or above Pressure Break Hold Ratio for Confirm (ms). It then does not fire again until the ratio drops back below the hold ratio.
Pulled Wall looks for a level whose size is at least Pulled Wall Ratio times the average of the levels behind it. It follows that wall as price approaches. If most of the wall is removed without trading, BookPilot gives it a spoof probability. Above Fire Probability it trades against the wall: a pulled bid wall means sell and a pulled ask wall means buy.
The forecast estimates the probability that the next 2-tick move of the mid price is up (P up). It is built from queue imbalance at the touch, microprice offset, the buy/sell balance of the last Flow Window prints and the Pressure Break ratio. It starts with built-in weights and learns from your instrument: after about 1,600 labelled samples it fits its own model and refits every 200 new samples.
The learned model is saved per instrument when the strategy stops, in Documents\NinjaTrader 8\VantedgeAlpha\forecast_<instrument>.txt. To make BookPilot start learning from scratch, delete that file.
The Microstructure Bias is Long when P up is at or above Bias Threshold, Short when P up is at or below 1 - Bias Threshold, and None in between. In With Bias mode, signals against the bias are refused. When the bias is None, signals in both directions pass.
| Button | What it does |
|---|---|
| With Bias | Arm and only take signals that agree with the Microstructure Bias, or any signal while the bias is None. |
| Engage Long / Engage Short | Arm for one direction only. Press again to disarm. |
| Auto Re-Arm | Switch automatic re-arming after each trade on or off. |
| Pulled Wall / Pressure Break | Switch each signal engine on or off while running. |
| DEX-Array | Coming soon (inactive). |
| LOW / MEDIUM / HIGH | Risk preset: quantity, hourly trade cap and cooldown after a loss (see the Risk Preset row below). |
| Forecast Confirm | Switch the forecast confirmation filter on or off. |
| Flatten All | Cancel the working entry and close the position at market. |
Settings reference
Settings are listed in the order and groups NinjaTrader shows in the strategy dialog. The suggested range is a starting point for testing on SIM or Market Replay, not a guarantee of results.
Licensing only. These settings do not change how the strategy trades.
The licence key from your purchase email. Without a valid key the strategy does not arm.
The licensing server. Only change it if support asks you to.
Rules of Engagement: when BookPilot is allowed to trade, how big and how often.
The mode used by Arm On Start. The panel buttons choose the mode while the strategy runs.
Re-arm automatically after a trade or after a cooldown.
On: continuous trading until a gate stops it.
Off: one trade, then you arm again by hand.
LOW: 1 contract, at most 10 trades per hour, 60 s cooldown after a loss. MEDIUM: half of Order Qty (minimum 1), 20 trades per hour, 20 s cooldown. HIGH: full Order Qty, no hourly cap, 5 s cooldown.
Towards HIGH: more size, more trades and faster re-entry after losses.
Towards LOW: 1 contract, fewer trades and longer pauses after a loss.
The base contract count. LOW always trades 1, MEDIUM trades half of it (rounded down, at least 1) and HIGH trades all of it. For 2 contracts on MEDIUM, set 4.
Bigger positions, with profit and loss scaling in step. The daily limits are reached after fewer trades.
Smaller positions.
The realised profit at which BookPilot locks for the session. Do not set it to 0: 0 does not switch it off, it locks after the first trade that is not a loss.
Keeps trading longer on good days.
Locks in good days sooner.
The realised loss at which BookPilot locks for the session. It counts closed trades, so the last trade can go past it by up to one stop. Do not set it to 0.
More room on a bad day, with a bigger worst-case loss.
Stops sooner on a bad day. If it is set too tight, normal losing streaks end the day early.
Only take new entries between Start Time and End Time. It never closes an open position.
On: trades only in the window.
Off: trades any time the session is open, including thin overnight books.
The start of the trading window, in exchange time. 083000 is the US cash open.
Later: skips the opening volatility.
Earlier: includes pre-open trading, when books are thinner.
The end of the trading window. If it is earlier than Start Time, the window runs overnight.
Later: includes the afternoon session.
Earlier: morning only, often the cleanest two-sided book.
Arms automatically in the Rules of Engagement mode as soon as Level 2 data is live.
On: starts trading without a click.
Off: you arm from the panel.
Early exit policy. High: never exits early, only the bracket closes the trade. Low: exits when the forecast for your position falls below the threshold, or (Pressure Break trades only) when the spoof score rises above 1 - threshold. Medium: the same as Low, but only while the trade is losing.
Towards High: trades get their full bracket, with fewer scratches and full stops more often.
Towards Low: more early exits. Losses are cut sooner, but some winners are cut too.
With Risk Tolerance Low or Medium: exit when the forecast probability for the position falls below this value, or the spoof score rises above 1 minus this value.
Exits sooner. At 0.5 or higher it exits on almost any wobble.
Exits only on clear deterioration.
How entries are placed and how the bracket is sized. Tick value per contract: ES $12.50, NQ $5.00, MES $1.25, MNQ $0.50.
On: limit entries behind the touch, with the timeout and run-away cancel. Off: market entries (always filled, but with slippage, and the timeout and cancel settings do nothing).
On: better prices, but some signals go unfilled.
Off: every signal is filled, at a worse price.
How long an unfilled limit entry stays working before it is cancelled.
More fills, but more of them come late, after the edge is gone.
Only fresh fills, and more missed trades.
On: the target and stop come from the two $ amounts below, converted to ticks for the instrument, and the per-engine tick settings are ignored. Off: the Pressure Break and Pulled Wall tick settings are used.
The target in dollars per contract. NQ: 150 $ = 30 ticks. ES: 150 $ = 12 ticks. On micros the same amount is 10 times further away (MNQ: 150 $ = 300 ticks), so lower it.
Bigger winners and a lower hit rate.
A higher hit rate with smaller winners.
The stop in dollars per contract. NQ: 100 $ = 20 ticks. ES: 100 $ = 8 ticks.
Fewer noise stop-outs, but bigger losses.
Smaller losses, and more trades stopped before they work.
The bracket for Pressure Break trades. Only used when Brackets in $ per Contract is off.
Wider bracket: bigger wins and losses, and fewer trades resolved quickly.
Tighter bracket: quicker, smaller outcomes.
How many ticks behind the best bid (long) or best ask (short) the entry is placed. 0 joins the touch.
A better price but fewer fills. The fills you do get tend to be the trades going against you.
More fills, closer to the signal price.
Cancel the unfilled entry when price moves this many ticks away in the trade's direction.
The order is kept longer while price runs.
Gives up quickly when the move leaves without you.
The bracket for Pulled Wall trades. Only used when Brackets in $ per Contract is off.
Wider bracket.
Tighter bracket.
The entry offset behind the touch for Pulled Wall trades.
A better price but fewer fills.
More fills.
The run-away cancel distance for Pulled Wall entries.
Keeps the order longer.
Cancels sooner.
Once the trade is this many ticks in profit, the stop moves to the entry price plus the offset. This happens once per position.
Protects later, so more full losses are possible.
Protects earlier, so more trades end at break-even.
How many ticks beyond the entry the break-even stop is placed, on the profit side.
Covers commission, but the stop is hit more easily.
0 is a true break-even.
The book-pressure signal.
Turns the engine on or off. The panel button does the same while running.
How many book levels per side are added up. 1 means only the best bid and best ask.
Looks at deeper liquidity. It is steadier but slower, and more of the size it sees can be pulled before price gets there.
Focuses on the touch. It is faster and more sensitive, and noisier.
How many times heavier one side has to be to start a candidate.
Only extreme imbalances count, so fewer and stronger signals.
More signals. Below about 2.5 it fires on ordinary book noise.
The candidate has to stay at or above this ratio for the confirm time. After firing, the scanner waits until the ratio drops below it.
The pressure has to hold more firmly, so fewer confirmations.
Confirms more easily, including pressure that is fading.
How long the pressure has to hold before the signal fires.
Fewer quick fakes, but a later entry.
Earlier entries, and more flickering imbalances get through.
Flips the Pressure Break direction, so a heavy bid becomes a short signal. Use it only if your testing shows the pressure being faded on your market.
On: trades against the pressure.
Off: trades with the pressure.
The pulled-wall (spoof fade) signal. Book levels are counted from the inside: the best bid or ask is depth 0 for Start and Split Depth, and depth 1 for Pulled Wall Depth.
Turns the engine on or off. The panel button does the same while running.
The deepest level that is scanned for walls. Together with Start Depth it sets the scan band (by default the 3rd and 4th levels). It must be greater than Start Depth, or nothing is scanned.
Finds walls further from price. More walls are found, and they are more often harmless.
Only walls near the touch.
The first level scanned for walls. 0 includes the best bid or ask.
Ignores levels near the touch, where size changes all the time.
Includes the touch, so more walls and more noise.
The average size of the levels from here out to the 10th level is the baseline a wall is compared with.
The baseline uses deeper levels only, which are often larger, so fewer walls qualify.
The baseline includes the thinner levels near the touch, so more walls qualify.
How many times the baseline a level's size has to be to count as a wall.
Only big walls are tracked, so fewer and more meaningful signals.
Ordinary size bumps count as walls, so more signals and more noise.
Price within this many ticks of the wall counts as approached. An approached wall that is pulled scores higher (+0.20).
Walls count as approached from further away, so signals reach Fire Probability more easily.
Only walls that price really reaches get the bonus.
The share of the wall's peak size that has to disappear without trading to count as a pull.
Only near-complete pulls count, so fewer and cleaner signals.
Partial reductions count, so more signals, including normal order management.
A wall that has been tracked longer than this is dropped.
Long-standing walls stay tracked, which catches slow spoofs.
Only recent walls are tracked. Young walls already score higher.
The minimum spoof probability of a pulled wall to trade. The score is 0.35 base, +0.20 if approached, +0.15 for a short life (under 5 s), +0.15 for frequent size changes and +0.15 for opposite aggressive volume.
Only the most spoof-like pulls trade, so fewer trades.
More pulls trade. At 0.55 or lower, any approached pull qualifies.
The micro-forecast and the confirmation filter.
P up at or above this value gives a Long bias, and at or below 1 minus this value a Short bias. With Bias mode refuses signals against the bias.
The bias is None more often, so With Bias blocks fewer signals and more trades get through.
There is almost always a bias, so With Bias blocks more signals.
The number of recent trades in the forecast's buy/sell flow input. After changing it, delete the saved forecast file so the model relearns with the new window.
The flow input is smoother but slower.
The flow input reacts fast but is noisier.
Signals have to be confirmed by the forecast and the trend vectors (see the next two settings). The panel button does the same while running.
On: fewer trades, with the forecast agreeing.
Off: every signal that passes the ROE is traded. Pulled Wall can then fade the pressure.
With Forecast Confirm on, the forecast has to give the signal's direction at least this probability.
Stricter, so fewer trades with stronger agreement. Above about 0.7 trades become rare.
Looser. 0.5 makes the forecast filter almost neutral.
With Forecast Confirm on, how many of the 4 trend vectors (mid-price slope over the last 5, 20, 40 and 150 price changes) have to point the signal's way.
Only trades in line with the short-term trend.
Allows counter-trend signals.
Three starting profiles. Balanced uses the shipped defaults. Use them as a starting point for your own testing, not as a promise of results.
| Setting | Conservative | Balanced | Active |
|---|---|---|---|
| Risk Preset | Low | Medium | High |
| Pressure Break Ratio | 5.0 | 4.0 | 3.0 |
| Confirm (ms) | 500 | 250 | 150 |
| Pulled Wall Ratio | 3.0 | 2.2 | 2.0 |
| Fire Probability | 0.70 | 0.60 | 0.55 |
| Confirm Threshold | 0.60 | 0.55 | 0.52 |
| Risk Tolerance | Medium | High | High |
| End Time | 110000 | 150000 | 150000 |
| Problem | Fix |
|---|---|
| "cannot arm -- no Level 2 data in the last 5 s" | Your feed has no market depth for this instrument, or replay is paused. Check that the SuperDOM shows several levels. |
| No trades in the Strategy Analyzer | This is expected. BookPilot only trades in real time and in Market Replay. |
| Signals appear but no orders | Read the Blocked line on the panel: not armed, outside the trading window, against the bias, hourly limit or forecast confirm. |
| Target or stop looks far too wide on MNQ or MES | $ brackets are per contract, and micros are worth 1/10. Use for example 15 $ / 10 $, or switch to tick brackets. |
| Locked right after the first trade | Daily Profit Goal or Daily Max Loss is set to 0. Set both to real amounts. |
Futures trading involves substantial risk of loss. Settings and ranges in this guide are starting points for your own testing and are not a promise of results. Run every change on SIM or Market Replay before a funded or live account. See the risk disclaimer.