NC Retro Resistance Description
NC Retro Resistance is a previous day levels strategy for NinjaTrader 8, and it comes with the full C# source code. Yesterday's high and low are levels many traders watch, so I wanted a simple strategy that trades the reactions there with fixed rules. The honest part: it fades the levels, so a trend day that runs straight through hits the stop. That's what the Reverse switch is for.
How it works. At Last Bar Time (16:00 by default) it takes the high and low since the previous Last Bar Time and builds a grid of levels: Range Divider (4) cuts the range into quarter steps, and Range Span (2) extends the grid two ranges above and below. Next day, on the first bar after Open Time (9:45) only, if price closed inside yesterday's range, it places two limit orders for Position Size (1): a sell at yesterday's high and a buy at yesterday's low. When one fills, the other is canceled. The target is one step back inside the range, the stop Risk Levels (1) steps outside. With Reverse on (off by default), a stop order at the same price flips the position; the reverse trade targets one more step out, with its stop back at yesterday's level. Waiting orders are canceled at No Orders After (15:00), and an open trade is closed at market at Exit Bar Time (15:55), or on the last bar of an early-closing session. One trade a day plus its reverse, fully automated.
What you see. Yesterday's high and low show as orchid dashed lines, and with Plot Levels on, the grid shows as short gray dashed lines (Levels Length Bars 5). The Open Time bar turns blue when price is inside the range, and on days without a trade the background turns dark red after No Orders After. It calculates on bar close.
How to use it. The default times fit US stocks on New York time, so adjust them to your chart and use a regular-hours session. Exit Bar Time must come before the session's last bar, so with the defaults use 5-minute bars or smaller. Risk Levels 2 gives the stop more room but risks twice the target. 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 a trend filter, skip days with a tiny range, or allow a second trade after a winner. Range, grid, entries and order handling each have their own methods, so there's room for your own filters. Have some good trades!