NC NinzaRenko BreakOut Bot Description
NC NinzaRenko BreakOut Bot is a NinzaRenko strategy for NinjaTrader 8, and it comes with the full C# source code. I built it to catch the runs NinzaRenko bars show and to sit out the chop in between: stay flat while bars keep touching a channel around the average, and jump in when one breaks clear. The honest part: there's no fixed stop or target, it leaves when the chop returns or when you say so. It doesn't check the bar type, so it also runs on other bars.
How it works. A middle line uses one of 7 MA types (EMA by default, or HMA, SMA, VWMA, TMA, TEMA, WMA) over Period bars (50), with bands at ATR Multiplier (1.5) times the ATR of the same period. A bar is trending up when it sits fully above the top band and DMI is above zero, and trending down when it sits below the bottom band with DMI below zero; anything else is choppy. It buys at market when an up-closing bar is the first trending-up bar after a choppy one, and sells short on the mirror signal. With the exit on (default), it closes at market on the first choppy bar. Position Size is 1, one trade at a time, calculated on bar close.
What you see. The middle line, the two blue band lines, and DMI in its own panel. Bars are dark green when trending up, dark red when trending down and dark orange when choppy. Six buttons are added to Chart Trader: ON/OFF (it starts off, so nothing trades live until you click it), CLOSE to exit at market, LONG and SHORT to allow each side, BE to set a stop one tick in profit, and EXIT ON/OFF for the choppy exit.
How to use it. Signals are automatic, but you decide when the bot is on and which sides it trades. Click BE once a trade has moved your way, since there's no stop otherwise. Turn the exit off only to ride a strong run through some chop, and watch it then. A bigger ATR Multiplier waits for cleaner breaks. In the Strategy Analyzer it takes every signal with the choppy exit on. Run it on Sim101 and in the Strategy Analyzer first, and use it at your own risk.
Make it yours. Use it as is, learn from the code, or change it yourself or with AI like Claude. You could add an ATR-based stop loss, an automatic break-even after a set number of ticks, or a session window. Buttons, channel logic and orders are separate parts, so it's an easy base to build on. Have some good trades!