VORTEX FUTURES TRADE LAB
Free NinjaTrader 8 example strategy · education only

NinjaTrader 8 RSI(2) Pullback Strategy: free code and honest test

The short-term RSI(2) pullback with a trend filter, written for NinjaTrader 8 and tested on five years of MNQ data. It wins most trades. The results page shows why that is not enough.

Education only. Not financial advice. Use at your own risk. Trading futures carries a substantial risk of loss and is not suitable for everyone. This strategy is a teaching example of a well-known idea. We do not claim it is profitable and it comes with no guarantee of any kind. Many prop firms ban automated trading (for example Take Profit Trader and Apex): check your firm's current rules before you run any strategy on an evaluation or funded account. Test on a simulated account first.

The idea

In an uptrend, a very short-term RSI that drops below 10 is read as a brief overreaction that tends to snap back, so the strategy buys the dip, and mirrors it in a downtrend.

In plain English

RSI(2) is a very fast version of the RSI indicator that reacts to only the last two bars. When the market is in an uptrend (price above its 100-bar average) and RSI(2) collapses below 10, the strategy buys the dip, expecting a bounce, and gets out once RSI(2) has recovered above 60. It is built to win often with small gains. The danger is the trades where the dip keeps dipping: those losers are bigger than the winners, which is exactly what the results show.

The exact rules

  • Chart: MNQ, 5-minute bars.
  • Buy when RSI(2) is below 10 and the close is above the 100-bar SMA. Sell short when RSI(2) is above 90 and the close is below the 100-bar SMA.
  • Exit a long when RSI(2) goes above 60; exit a short when it goes below 40.
  • Stop loss: 2 x ATR(14).
  • Trades only from 09:35 to 15:30 Eastern; flat from 15:55. No overnight trades.

Test results (MNQ, 5 years)

Result: it loses after costs, even though it wins most trades. 62% of trades were winners, yet it lost $8,583 over 3,318 trades (profit factor 0.91). The average winner is $41 and the average loser is $75: many small gains, fewer but larger losses. Before costs it was still a small loser ($2,277 lost), so costs are not the only problem. Only one of 6 calendar years was positive. A high win rate is not an edge by itself.

With costsCosts ignored
Net profit-$8,583-$2,277
Number of trades3,3183,314
Winning trades62.2%63.1%
Profit factor0.910.97
Average trade-$3-$1
Worst drawdown-$10,762
Net without its 5 best trades-$9,975

Results are in US dollars for one MNQ contract. "Costs ignored" is shown only so you can see how much costs matter; it is not what you would have received.

Equity curve

-$10,000-$7,500-$5,000-$2,500$020222023202420252026
Cumulative profit and loss after costs, one MNQ contract. The red shading is how far the account sat below its previous high at each point (its worst: -$10,762). Dashed lines are $ levels.

The chart is the sum of every simulated trade in order. It shows what the totals above hide: how long the account spent below its previous high (up to 1,100 trading days at worst), and how much of the result arrived in a short stretch. Among all 25 strategies in our free pack, this one ranks #16 for net profit and #24 for profit factor after costs. The full comparison is on the strategy hub page.

Three real trades, step by step

These come straight from the simulation, so you can check what a trade looks like in practice. NinjaTrader stamps each 5-minute bar with its closing time, so times below are bar-close times in Eastern, and the end-of-day exit shows as 15:55 or 16:00. The average winning trade made $41 and the average losing trade lost $74.

  • Best trade of the five years: on June 9, 2026 at 15:10 Eastern it sold short MNQ at 29120.50 and was out at 28965.00 at 15:20, a move of +155.50 points, which is +$310 after costs on one contract.
  • Worst trade: on June 10, 2026 at 11:00 Eastern it bought MNQ at 29028.00 and was out at 28803.63 at 11:15, a move of -224.37 points, which is -$450 after costs on one contract.
  • A typical (median) trade: on July 10, 2025 at 14:50 Eastern it bought MNQ at 23027.50 and was out at 23034.75 at 14:55, a move of +7.25 points, which is +$14 after costs on one contract.

When it made and lost money

Slicing trades by the hour they were entered and the day of the week. Entry hours are Eastern time. Its best entry hour by net was 15:00 (+$535) and its worst was 11:00 (-$2,921); its best weekday was Friday (+$1,021) and its worst was Tuesday (-$5,009). With a few hundred or a few thousand trades split this many ways, the groups are small, so treat these as observations to study, not as rules to filter your trading by.

Entry hour (Eastern)TradesWinnersNetAvg per trade
09:35 to 09:5922451%-$2,110-$9
10:00 to 10:5941961%-$1,335-$3
11:00 to 11:5956661%-$2,921-$5
12:00 to 12:5958765%-$1,106-$2
13:00 to 13:5956362%-$1,749-$3
14:00 to 14:5958063%$103$0
15:00 to 15:5937966%$535$1
WeekdayTradesWinnersNetAvg per trade
Monday64763%-$10-$0
Tuesday65060%-$5,009-$8
Wednesday69560%-$3,690-$5
Thursday65563%-$895-$1
Friday67164%$1,021$2

Long trades versus short trades

Longs: 1,660 trades, -$6,082 net, 63% winners. Shorts: 1,658 trades, -$2,501 net, 61% winners. Neither side made money after costs.

Year by year

YearNet (with costs)Trades
2021 (from October)$679153
2022-$2,302714
2023-$2,104707
2024-$2,330665
2025-$2,060528
2026 (to October)-$467551

Cost stress test

Cost assumptionNetProfit factor
Base costs: $0.50 per side + 1 tick slippage-$8,5830.91
Double commission ($1.00 per side) + 2 ticks slippage-$15,1830.84
$1.00 per side + 3 ticks slippage-$18,4980.81

Real fills are often worse than a simulation, so we also ran the same trades with higher commission and more slippage. A strategy whose result disappears here is too thin to trade.

How we tested. This is our own simulation, run in Python on NinjaTrader 1-minute MNQ bars from October 2021 to October 2026 (1,466 trading days), built into 5-minute bars. Signals are read at the close of a bar and filled at the open of the next bar. Costs: $0.50 commission per side plus one tick of slippage on every market or stop fill, 1 contract, regular trading hours only, everything flat by 15:55 Eastern. Targets fill only when price trades one tick through them, and if one bar touches both the stop and the target the stop counts first. The settings are the textbook defaults, chosen before the test and never optimised. The table above is not a NinjaTrader Strategy Analyzer run, so your own backtest will differ somewhat. As a check, we ran six of these strategies (EMA Cross, Keltner, opening range breakout, Fibonacci, Renko-style and Ichimoku) in Strategy Analyzer on MNQ 03-26, 5-minute bars, 5 January to 10 March 2026, with no commission or slippage, and compared them with our simulation over the same dates: trade counts were within 5% and win rates within about 3 percentage points. That check covers those six strategies over about ten weeks, not the whole pack or the whole five years. Run your own before you trust anything.

Hypothetical or simulated performance results have inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading, and no simulation can fully account for slippage, liquidity, latency, order-queue position or your own behaviour. Simulated results are not a prediction of future results.

How to use it in NinjaTrader 8

  1. Download the .cs file above and save it to Documents\NinjaTrader 8\bin\Custom\Strategies.
  2. In NinjaTrader choose New → NinjaScript Editor, then press F5 to compile. Compiling reloads all your NinjaScript, so do it when you have no open position and nothing running live.
  3. To backtest, open New → Strategy Analyzer, choose VortexRsi2Pullback, set the instrument to MNQ and a 5 Minute data series, pick a date range and run it.
  4. To run it on a chart, right-click the chart, choose Strategies, add VortexRsi2Pullback, set the account and order quantity, and tick Enabled. Start on a simulated account.
  5. Backtest on a single contract month such as MNQ 03-26, or on a correctly merged series. In our testing a merged MNQ ##-## series returned no trades in Strategy Analyzer, while a single contract worked.
  6. Times in the settings use your chart's time zone. The defaults assume US Eastern time, so change them if your PC clock is in another zone.

Settings

Trend filter SMA (bars)100
RSI entry / exit level10 / 60
ATR period / stop multiple14 / 2.0
Trade from / Last entry / Flat by093500 / 153000 / 155500

Questions

Is this strategy profitable?

See the results above, which are simulated, include costs and are shown exactly as they came out. A simulation does not predict the future, and we do not claim this strategy makes money.

Can I use it on a prop firm account?

Check your firm's rules first. Many prop firms ban automated trading, and breaking that rule can cost you your account. We do not know your firm's current rules.

Why do the results not match my NinjaTrader backtest?

Our results come from our own simulation with the fill rules stated above, not from Strategy Analyzer. Fill assumptions, data and time zones differ, so results will differ. Always run your own test.

Can I change it?

Yes. It is plain NinjaScript with the source included, so you can edit it or learn from it. Changing the settings to fit past data usually makes the past look better and the future no better, so be careful.

How much does it cost?

Nothing. It is free. If you like free tools, see the free Drawdown Panel and the Monte Carlo calculator.

← All free NinjaTrader 8 strategies · Risk & disclosures

Vortex Futures Trade Lab is not a prop firm and is not affiliated with NinjaTrader or any firm. NinjaTrader is a trademark of its owner; it is named only to say what the strategy works with.