NC Renko Bars: Backtestable Renko Bars for NinjaTrader 8
Renko bricks built only from prices that really traded, so your backtests run on real prices, not a grid.
Renko bricks built only from prices that really traded, so your backtests run on real prices, not a grid.
Watch the video, then read below how every brick is built.
NinjaCoding
1.24k subscribers
Why NC Renko Bars
NinjaTrader's Renko draws every brick on a fixed price grid. To keep the grid, it sets opens and closes to grid prices, drops each brick's real high and low, and adds filler bricks with no trades when price jumps. It looks tidy. A backtest on it fills orders at prices that weren't there. NC Renko Bars build every brick from real trades only.
Step 4 / Reverse 8 ticks
Brick size 4 ticks, the same trades
The same 30 trades on an ES-type instrument, built by both bars types. From the worked example in the user manual.
Every open, high, low and close is a trade that happened. No grid prices, no filler bricks.
Each brick holds every trade from its opening trade to its closing trade.
Fills, stops and targets in Strategy Analyzer use prices that were really there.
Use it as is, learn from it, or change it yourself or with AI like Claude.
How it works
A brick doesn't close on the clock. It closes as soon as price has moved far enough from the previous brick's close, counted in whole ticks.
Every value comes from a trade.
Why it matters
Indicators and strategies read the open, high, low and close of each bar. On NC Renko Bars those are always prices that traded, so an order filled at a brick's open gets a price that was really there, and stops and targets use the real extremes.
| NC Renko Bars | NinjaTrader Renko | |
|---|---|---|
| Settings | Step and Reverse set separately | One brick size, reversal fixed at 2 bricks |
| Open | The brick's first real trade | A grid price |
| Close | The real trade that reached the distance | A grid price |
| High / Low | The real extremes of the brick | Replaced by the open and close once the brick finishes |
| Price jumps | One brick that closes at the real price | Extra filler bricks with 0 volume |
Settings
How far price must move with the last brick to add another one. A smaller Step gives more bricks and more detail.
How far price must move against the last brick to turn. A larger Reverse keeps you with the trend longer. Twice the Step is classic Renko; equal to Step is symmetric; smaller than Step turns sooner than it continues.
On: each session starts a fresh brick, so overnight gaps never close a brick. Off: one continuous chart across days.
Bricks are built from tick data, so more days take longer to load. Use the Candlestick chart style to see each brick's real high and low.
| Instrument | Tick size | Step 6 ticks | Reverse 12 ticks |
|---|---|---|---|
| ES, MES ยท NQ, MNQ | 0.25 | 1.50 points | 3.00 points |
| YM, MYM | 1 | 6 points | 12 points |
| CL, MCL | 0.01 | 0.06 | 0.12 |
| GC, MGC | 0.10 | 0.60 | 1.20 |
Who it's for
You trade Renko with a strategy and want the Strategy Analyzer to run on the same bricks you'll see live.
You need a Renko series your NinjaScript can rely on, as the chart or as an extra data series.
You want to see how a NinjaTrader bars type works inside, from real, readable code.
Before you buy
Real prices come at a price of their own. Here's what to expect.
Make it yours
Use it as is, learn from it, or change it yourself or with AI like Claude. No coding experience needed to start.
// in State.Configure: add NC Renko 6/12 as an extra series AddDataSeries(new BarsPeriod { BarsPeriodType = (BarsPeriodType)55, Value = 6, // Step Size (ticks) Value2 = 12 // Reverse Size (ticks) });
FAQ
Yes. In the Strategy Analyzer or Market Replay, pick NC Renko Bars V1.1 as the Type and enter Step Size and Reverse Size as you would on a chart. You need historical tick data for the whole test period.
A finished brick never changes. With Calculate set to On bar close, a strategy sees each brick once it's finished. With On each tick or On price change, it also sees the brick still building, which keeps changing until it closes.
That's by design. Each brick runs from its own first trade to the trade that closed it, and price can jump past a target, so the brick closes where price really traded.
NC Renko Bars are built from tick data. Your data connection must provide historical tick data for the days you load; otherwise only live trades build bricks.
Brick size N in NinjaTrader Renko uses the same distances as Step N and Reverse 2N. The bricks still differ slightly, because NC Renko Bars measure from real closes instead of a fixed grid.
Turn it on to look at each session on its own, for example when you day trade futures and don't want overnight gaps in your bricks. Leave it off for one continuous chart across days with no unfinished bricks at session ends.
With the merge policy Merge back adjusted, NinjaTrader shifts older contracts by the rollover difference, so past bricks show prices that never traded. To see prices as they traded, choose Merge non back adjusted or Do not merge under Tools → Options → Market data.
In the NinjaScript Editor, open the BarsTypes folder, right-click NCRenkoBars and remove it. Then choose Tools → Import → NinjaScript Add-On and select the 1.1 zip. If both versions are installed, they claim the same bars type id, and the import shows errors or the bars appear twice.
Yes. They register as bars type 55, with the Step Size as Value and the Reverse Size as Value2, both in ticks. Add them as an extra series with AddDataSeries in State.Configure, or check that the chart uses them with Bars.BarsPeriod.BarsPeriodType == (BarsPeriodType)55.
It's a rare edge case. A brick can't close on its first trade, so after a sudden jump right after a brick closes, the new brick can open beyond its own target and close on its next trade. Its color (close compared with open) can then be the opposite of the direction it closed in. The next brick follows the direction it closed in.
99.00 USD
Choose the License Type That Fits Best
Check Out What Else is Available