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

NinjaTrader 8 Parabolic SAR Strategy: free code and honest test

The Parabolic SAR stop-and-reverse system for NinjaTrader 8, tested on five years of MNQ data. It is always in the market, and the results show the price of that.

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

The Parabolic SAR places a dot that trails price and flips to the other side when price touches it. The classic use is stop-and-reverse: when the dots flip below price, go long; when they flip above, go short.

In plain English

Think of the Parabolic SAR as a dot that trails price. While the market rises, the dot sits under price and creeps up behind it. The moment price drops far enough to touch the dot, the dot jumps to the other side and the strategy turns around: it closes the long and goes short. It never waits on the sidelines, so every wobble that touches the dot becomes a trade. That constant flipping is why this strategy trades about 1,598 times a year, and why costs matter so much to it.

The exact rules

  • Chart: MNQ, 5-minute bars.
  • Parabolic SAR with acceleration 0.02, step 0.02, maximum 0.2.
  • Buy when the SAR flips below price; sell short when it flips above price. A flip reverses the position.
  • 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 clearly, mostly through trading too much. It lost $22,503 over 7,989 trades (profit factor 0.94), about 1,598 trades a year, and even before costs it lost $6,488. A stop-and-reverse system flips every time price wobbles, and each flip pays commission and slippage. Only 1 of 6 calendar years was positive. Its worst single trade lost $1,002 on 2025-04-07, a day of huge price swings, which shows what a system that is always in the market can do on a bad day.

With costsCosts ignored
Net profit-$22,503-$6,488
Number of trades7,9897,989
Winning trades37.4%38.2%
Profit factor0.940.98
Average trade-$3-$1
Worst drawdown-$26,671
Net without its 5 best trades-$30,927

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

-$20,000-$10,000$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: -$26,671). 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 915 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 #24 for net profit and #19 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 $114 and the average losing trade lost $72.

  • Best trade of the five years: on April 9, 2025 at 11:25 Eastern it bought MNQ at 17413.75 and was out at 18885.25 at 15:10, a move of +1471.50 points, which is +$2,942 after costs on one contract.
  • Worst trade: on April 7, 2025 at 10:45 Eastern it sold short MNQ at 17184.25 and was out at 17684.75 at 10:55, a move of -500.50 points, which is -$1,002 after costs on one contract.
  • A typical (median) trade: on September 9, 2025 at 14:20 Eastern it bought MNQ at 23842.75 and was out at 23829.25 at 14:50, a move of -13.50 points, which is -$28 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 11:00 (+$2,545) and its worst was 14:00 (-$11,656); its least bad weekday was Monday (-$541) and its worst was Friday (-$8,711). 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:5999631%-$10,796-$11
10:00 to 10:59125039%-$631-$1
11:00 to 11:59114940%$2,545$2
12:00 to 12:59121137%-$3,291-$3
13:00 to 13:59122537%$891$1
14:00 to 14:59127634%-$11,656-$9
15:00 to 15:5988244%$435$0
WeekdayTradesWinnersNetAvg per trade
Monday153438%-$541-$0
Tuesday165037%-$3,474-$2
Wednesday165936%-$4,453-$3
Thursday160538%-$5,324-$3
Friday154138%-$8,711-$6

Long trades versus short trades

Longs: 4,007 trades, -$2,398 net, 40% winners. Shorts: 3,982 trades, -$20,105 net, 35% winners. Neither side made money after costs.

Year by year

YearNet (with costs)Trades
2021 (from October)-$1,854417
2022$3,5011727
2023-$4,7531757
2024-$9,9501609
2025-$3,0341240
2026 (to October)-$6,4141239

Cost stress test

Cost assumptionNetProfit factor
Base costs: $0.50 per side + 1 tick slippage-$22,5030.94
Double commission ($1.00 per side) + 2 ticks slippage-$38,8760.90
$1.00 per side + 3 ticks slippage-$47,5110.87

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 VortexParabolicSar, 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 VortexParabolicSar, 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

SAR acceleration / step / maximum0.02 / 0.02 / 0.2
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.