NC Grid Hedger Description
NC Grid Hedger is a semi-automated grid and hedging strategy for NinjaTrader 8, and it comes with the full C# source code. One full-size contract rides the move while a micro grid trades against it, scalping pullbacks. Honestly, sometimes the code beats the results, and this is one of those cases. Treat it as a framework to test and learn from.
How it works. On a supported future such as ES, NQ, CL or GC, it adds the matching micro. Each cycle starts with LONG or SHORT. The hedge trades Position Size contracts (1): with Level Type on Tick, by a limit at the last price; with Auto, by a limit or stop at an edge of the opening range (Opening Range Start 9:30 to End 9:45). Once it fills, the grid runs in its direction: Number Of Levels (10) steps of Level Size Value ticks (5), or the range height split into those levels. A micro opens at market against the hedge and micro limits wait at each level between, so the micro position grows as price moves against it, up to 10 micros by default. Each micro takes profit one level back. The hedge targets the last level, where the micros' stop sits, and its own stop is Risk Level Value steps (1) behind. If that stop fills and FLIP is on, a new hedge starts the other way. Everything closes at market once combined open profit passes Unrealized Target (300). There's no daily loss limit, and positions are kept overnight.
What you see. The opening range is two hash lines, blue while it forms and violet-red after. Each grid level gets a short white line, the hedge stop a plum one. Chart Trader gets six buttons: LONG, SHORT, CLOSE ALL, FLIP on or off, LIMIT or STOP-M for Auto, and BE to move the hedge stop to break-even. It calculates on each tick.
How to use it. Start with Tick levels, then try Auto: LIMIT waits for a pullback to the range edge, STOP-M for a break of it. Entries come only from the buttons, so the Strategy Analyzer can't test them; run it on Sim101 or Market Replay first, and use it at your own risk.
Make it yours. Like all my frameworks, it comes with a code review video explaining the logic and the order handling. Use it as is, learn from the code, or change it yourself or with AI like Claude. You could start cycles on a range breakout, add a daily loss limit, or re-arm a micro level after its profit. Clear regions for buttons, grid, orders and executions make it an easy base to build on. Have some good trades!