License Key
The licence key from your purchase email. Without a valid key the strategy does not arm.
User Guide
FlowPilot reads the footprint of the bar that is forming right now. When several price levels in a row show one-sided aggressive buying or selling (a stacked imbalance), it enters a market order with a fixed profit target and stop. A regime classifier decides whether to trade with the stack (Follow) or against it (Fade), and daily limits stop it for the session once the goal or the max loss is reached.
Every trade printed on the exchange is classified as a buy (it hit the ask) or a sell (it hit the bid) and added to the footprint of the bar that is forming. At each price level the footprint then compares buying at that level with selling one level lower (a diagonal comparison). When one side is at least Imbalance Ratio times the other, and at least 10 contracts traded on the stronger side, that level is an imbalance.
Imbalances stacked on consecutive price levels show that one side pushed through several prices in a row. FlowPilot treats a stack of at least Stacked Requirement levels as its trigger. Buying imbalances make a bullish stack and selling imbalances make a bearish stack. If the bar has both kinds at the same time, FlowPilot does not trade.
At every bar close FlowPilot measures how closely price change follows delta over the last Correlation Window bars. A correlation at or above Trend Threshold means the market is in a Trend: aggressive buying moves price up, so following the stack makes sense. A correlation at or below Regression Threshold means the market is in Regression: aggression gets absorbed and price snaps back, so fading the stack makes sense. When the correlation is between the two thresholds, the previous regime stays in place.
There is also a range vote. If the session's high-low range over the last Range Bars bars is wider than Range To Bracket times your bracket (target ticks plus stop ticks), the regime is set to Trend. During the first Open Warm-up Bars of each session the regime is always Regression, because the opening rotation fades more often than it follows.
The Mode button on the panel shows the result, for example Mode: Auto (Trend) or Mode: Auto (Regression).
| Button | What it does |
|---|---|
| Arm Long / Arm Short | Allow the next entry in one direction only. Green while armed. |
| Arm Both | Allow the next entry in either direction. Mode Auto selects this by itself at each bar close. |
| Trend Long / Trend Short | Direction filters. Teal or maroon means allowed and grey means blocked. Clicking one switches it on or off. |
| Close | Exit the open position at market. Orange-red while a position is open. |
| Mode | Switch between Auto, Follow and Fade. In Auto the button shows the live regime: Trend (cyan) or Regression. |
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.
The starting state of the Chart Trader panel. You normally change these with the panel buttons while the strategy runs.
Which direction is armed when the strategy starts. Mode Auto arms Both at the first bar close anyway.
The Trend Long filter. When it is off, no long entries are taken.
On: long trades allowed.
Off: long trades blocked.
The Trend Short filter. When it is off, no short entries are taken.
On: short trades allowed.
Off: short trades blocked.
Follow trades with the stack and Fade trades against it. Auto picks Follow or Fade from the regime and re-arms at every bar close.
These settings decide what counts as a signal and which regime Auto uses.
How many times bigger the aggressive side has to be than the opposite side, one level away diagonally, before a price level counts as an imbalance.
Fewer, stronger imbalances, so fewer trades. Stacks also complete later in the bar.
More levels qualify, including noise. Below about 2.0 most busy bars have stacks, and quality drops.
How many imbalanced price levels in a row make a stack (the trigger).
Needs a longer push, so fewer and later entries with more conviction behind them.
More signals and earlier entries. 1 triggers on any single imbalance.
Lets one price level without an imbalance sit inside a stack without breaking it.
On: more stacks are found.
Off: stacks have to be perfectly consecutive, so there are fewer signals.
The number of closed bars used to correlate price change with delta for the Auto regime.
The regime is smoother and changes less often, but reacts later when the market changes character.
The regime reacts quickly but can switch back and forth on noise.
A correlation at or above this value switches Auto to Trend (Follow). Keep it above Regression Threshold.
Trend is harder to reach, so Auto fades more.
Trend is easier to reach, so Auto follows more.
A correlation at or below this value switches Auto to Regression (Fade). Between the two thresholds the regime does not change.
Regression is easier to reach. A narrower gap to Trend Threshold means more regime switches.
Regression is harder to reach. A wider gap means a more stable regime.
The number of bars in the session's range measurement for the Trend vote.
A longer lookback gives a wider range, so the vote picks Trend more often.
A shorter lookback gives a narrower range, so the vote picks Trend less often.
The range in ticks votes Trend when it is wider than this multiple of (Take Profit + Stop Loss). With the defaults that is 3 x 32 = 96 ticks.
The range vote fires less often. Auto relies more on the correlation.
Trend is picked more often. 0 makes Auto almost always Trend after the warm-up.
Auto stays in Regression (Fade) for this many bars at the start of each session.
Fades the opening rotation for longer.
Auto can follow sooner after the open. 0 turns the warm-up off.
The forming bar's delta has to point the same way as the stack.
On: fewer trades, and stacks that are being absorbed are filtered out.
Off: more trades, including stacks the bar's delta disagrees with.
Size and bracket. The tick values below are per contract: ES = $12.50 per tick, NQ = $5.00 per tick, MES = $1.25 per tick, MNQ = $0.50 per tick.
The number of contracts per entry.
Profit and loss grow in step with size. The daily limits are in dollars, so they are reached after fewer trades.
Smaller swings. Use micros (MES or MNQ) for the smallest size.
The stop distance in ticks from the entry. It is also part of the bracket size used by Range To Bracket.
Fewer stop-outs from noise, but each loss is bigger. The range vote picks Trend less often.
Smaller losses, but more trades get stopped out before they work.
The profit target distance in ticks from the entry.
Bigger winners, but a lower hit rate, and more trades come back to the stop or break-even.
A higher hit rate with smaller winners. Commission weighs more on each trade.
Open profit in ticks before the trailing stop starts. It is checked once per bar, when a new bar starts.
The trail starts later, so a trade has more room before it is tightened.
The trail starts early and locks in profit sooner, but ends some trades early.
The distance between price and the trailing stop once the trail is active. The stop only moves in your favour.
A looser trail gives the trade more room but gives back more open profit.
A tighter trail keeps more profit but stops out on small pullbacks.
Once the trade is this many ticks in profit, the stop moves to the entry price plus the offset. This happens once per position. It has to be lower than Take Profit to have any effect.
Protects later. Fewer trades are stopped at break-even, but more full losses come back.
Protects earlier. Fewer full losses, but more trades end at break-even before reaching the target.
How many ticks beyond the entry the break-even stop is placed, on the profit side. Keep it smaller than the trigger.
The break-even stop locks in a little more, but price has to pull back less to hit it.
0 is a true break-even, so commission is not covered.
Hard limits on realised profit and loss per session, counted from real-time trades only. They are not applied in Strategy Analyzer backtests.
The realised profit, in account currency, at which FlowPilot stops for the rest of the session.
Keeps trading longer on good days, so more profit can also be given back.
Stops sooner on good days and keeps the day's gains.
The realised loss, in account currency, at which FlowPilot stops for the rest of the session. It counts closed trades, so the last trade can go past it by up to one stop.
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.
After a losing trade, no new entries are taken for this long.
Less revenge-style re-entry into the same move, so fewer trades.
Re-enters quickly. Good in fast rotation, but losses can come in quick succession.
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 |
|---|---|---|---|
| Imbalance Ratio | 3.5 | 3.0 | 2.5 |
| Stacked Requirement | 4 | 3 | 2 |
| Allow Gap in Stacked | Off | On | On |
| Require Congruent Delta | On | On | Off |
| Break-Even Trigger (Ticks) | 8 | 11 | 12 |
| Cooldown After Loss (ms) | 60000 | 20000 | 10000 |
| Quantity | 1 (or micros) | 1 | Size to your Daily Max Loss |
| Problem | Fix |
|---|---|
| No trades in the Strategy Analyzer | Turn on Tick Replay on the data series and use tick-based historical data. Without bid/ask detail the footprint stays empty. |
| No panel buttons on the chart | Open the Chart Trader (right-click the chart > Chart Trader), then disable and re-enable the strategy. |
| "MISSING LICENSE KEY" or "Cannot arm: Unlicensed" | Paste your key into License Key, check that you are online and read the NinjaScript Output window. Each key works on 2 devices. |
| Follow or Fade mode never trades | Only Auto re-arms by itself. In Follow or Fade, press Arm Long, Arm Short or Arm Both before each trade. |
| Trading stopped for the day | The daily goal or max loss was reached. It resets automatically at the next session. |
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.