NQ Scalper Lab Strategy Tester Edition by jimmyjames4684
By jimmyjames4684
Performance Metrics
- Author: jimmyjames4684
- Symbol: CME_MINI:NQ1!
- Timeframe: 1 minute
Description
NQ Scalper Lab is a 1-minute scalping strategy for NQ / MNQ futures. It combines a regime-adaptive signal engine with a higher-timeframe trend filter, session/time filters and volatility-based trade management. Every position is drawn on the chart as a live Long/Short-position-style box.HOW IT WORKS1. Market regimeEach bar is classified as Trend Up, Trend Down, Range or Transition. The classification uses ADX/DMI, the alignment of the fast and mid EMAs, and the slope of the 21 EMA measured in ATR units. The regime decides which setups are allowed.2. Entry engines (selectable)Adaptive (default) uses three setups:- Trend pullback: in a trending regime, price dips into the fast-EMA zone. A buy or sell fires when an ATR-normalized momentum oscillator turns back in the trend direction on a strong-closing candle.- Structure break / squeeze ignition: the close breaks the last confirmed swing high or low, or a Bollinger-inside-Keltner squeeze releases, on a wide expansion candle.- Range exhaustion: price stretches beyond the outer Bollinger Band or far from VWAP with RSI(7) at an extreme, followed by a wick-rejection candle.Each candidate is scored on volume surge, close location, momentum acceleration and VWAP/RSI context. The Sensitivity setting decides how much confirmation is required.Trend pullback (alternative engine): trades only in an established 21/50 EMA trend. It requires a measurable pullback from the latest swing into the 9 EMA, then a close back beyond the 9 EMA and the prior bar's high or low. A new higher high (or lower low) is required between entries, so a stalled trend isn't re-entered.3. Higher-timeframe filterAn optional 5-minute trend filter (21/50 EMA alignment, slope and price location). It reads the last CLOSED higher-timeframe bar, so it does not repaint. Modes:- Off- Block counter-trend: no longs while the 5m trend is bearish, no shorts while it is bullish- Must agree: trade only when the 1m and 5m trends point the same way (default)4. Time filters- Regular session only (default 08:30–15:00 exchange time)- No new entries in a window around the cash open (default 08:25–08:40), with positions flattened before it- Positions flattened before the 16:00 daily halt5. Trade management (no fixed take-profit)- Initial stop beyond the recent swing (Adaptive) or the pullback extreme (Trend pullback), kept between a minimum and maximum ATR distance- Profit lock: once a trade reaches a set R multiple, the stop moves to entry plus a set number of ticks (default 0.5R / +8 ticks)- Trailing stop: ATR chandelier, swing structure, or a hybrid of the two- Exit on momentum failure, on an opposite signal (reverse), or on an optional time stop- Stops are only ever tightened, never loosenedVISUALS- Red box: entry to initial stop (the risk)- Green box: entry to the CURRENT price. It grows and shrinks with unrealized profit and is frozen at the exit bar- A live label shows points, R multiple and $ per contract. Closed trades are labelled with their result and exit reason- Trend ribbon, active stop line, regime/trend background, BUY/SELL markers- Dashboard: trend, 5m trend, regime, allowed direction, position, active stop, unrealized P&L, R multiple and Strategy Tester statisticsNON-REPAINTINGSignals, stop updates and exits are evaluated on bar close (process_orders_on_close). Stop orders fill intrabar through the broker emulator. The higher-timeframe value comes from the previous closed bar. Only the live green box and P&L label update intrabar.DEFAULT STRATEGY PROPERTIES- Initial capital: 25,000 USD- Order size: 1 contract (set "Contracts" to match your account)- Commission: 0.62 USD per contract per side (MNQ). Use about 2.25 for NQ- Slippage: 1 tick- Margin requirement is disabled so futures orders are not rejected on small account sizes. Size positions responsiblyHOW TO USEApply it to a 1-minute NQ or MNQ chart. The higher-timeframe setting must be higher than the chart timeframe. All filters can be switched on or off independently, so you can compare configurations in the Strategy Tester.DISCLAIMERThis script is for educational and research purposes only and is not financial advice. Backtest results depend on the data range, settings and execution assumptions, and do not guarantee future performance. Futures trading involves substantial risk of loss.