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

NinjaTrader 8 Renko Strategy: free code and honest test

A Renko-style brick strategy for NinjaTrader 8, tested on five years of MNQ data. It runs on an ordinary 5-minute chart, so it is an approximation of a real Renko chart, and the page says exactly how.

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

Renko bricks ignore time and only move when price moves a set distance, which hides small wiggles. A common idea is to trade each change of brick direction.

The exact rules

  • Chart: MNQ, 5-minute bars, default CME US Index Futures ETH trading hours.
  • Bricks are built from the closes of the 5-minute bars, 20 points per brick, restarted each session. A new brick in the same direction needs one more brick of movement; a reversal needs two (the usual Renko rule).
  • Buy when the brick direction turns up; sell short when it turns down. Each change reverses the position.
  • Stop loss: 2 x ATR(14). Trades only from 09:35 to 15:30 Eastern; flat from 15:55.

Test results (MNQ, 5 years)

Result: a loser after costs, with one very good year and one very bad one. It lost $11,890 over 5,696 trades (profit factor 0.96); with costs ignored it was almost exactly zero (-$138), so there was no edge to pay for the costs. 2022 made $11,637, while 2026 lost $14,968. Longs made $560 and shorts lost $12,450. 2 of 6 calendar years were positive. The lesson is how much one trending year can flatter a trend system, and how fast it can give the gains back.

With costsCosts ignored
Net profit-$11,890-$138
Number of trades5,6965,696
Winning trades37.3%37.6%
Profit factor0.961.00
Average trade-$2-$0
Worst drawdown-$25,479
Net without its 5 best trades-$17,139

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.

Year by year

YearNet (with costs)Trades
2021 (from October)-$993225
2022$11,6371309
2023$2,097722
2024-$4,292965
2025-$5,3701059
2026 (to October)-$14,9681416

Cost stress test

Cost assumptionNetProfit factor
Base costs: $0.50 per side + 1 tick slippage-$11,8900.96
Double commission ($1.00 per side) + 2 ticks slippage-$22,9370.93
$1.00 per side + 3 ticks slippage-$28,2840.92

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 VortexRenkoTrend, 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 VortexRenkoTrend, 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.
  7. This is not a real Renko chart. A real Renko chart in NinjaTrader would form bricks from every tick, which gives different entries. The bricks here are built only from 5-minute closes so the strategy can run on a normal time chart.

Settings

Brick size (points)20
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.