Grid Backtest Analyzer
A neutral grid stands buy limits below the current price and sell limits above it, spaced by a fixed step, with each fill closing on a one-step round trip back the other way. That's the standard convention behind every grid bot. This analyzer replays your pasted bars through that convention on the box, step, and kill switch you set, and reports whether the grid would have survived, how much it made per completed cycle, and how deep it went underwater along the way. It reads each bar's close to decide when a level crosses, not the wick, so it's a conservative reference for how the grid held up, not a tick-perfect fill sim.
Value is the dollar swing for a full 1.0 price move on one level's size. 1 ES contract is $50 a point. A EURUSD standard lot is about $100,000 per 1.0 ($10 a pip), a mini lot $10,000, a micro lot $1,000. For shares, use share count times price step.
Spread plus commission for one open-and-close pair, in the same units as the box. If this is at or above the step, every completed cycle loses money before the grid even moves.
One bar per line, oldest first, any timeframe. A leading date or a trailing volume column is fine and gets ignored.
No run yet
Set the box and step, paste your bars, and hit Run. Or load an example.
How the replay works. Levels are built from the box low to the box high, spaced by the step. Levels below the box midpoint are standing buys; above it, standing sells. When a close crosses down through a buy level, a long opens there; when a close later crosses back up through that level plus one step, it closes for a step's worth of profit minus your cost. Sells work the same way in reverse, opening on an upward cross above the midpoint and covering one step lower. Any level can refill the moment it closes, the way a live grid bot re-arms its orders. The kill switch checks 2 things after every bar: open levels above your max, or floating loss past your max drawdown. The first one tripped ends the run, flattening every open level at that bar's close and booking the loss. If neither trips, the grid is still working when your data runs out, and any open levels are marked to the last close so you can see what they're carrying. A bar whose high or low pokes outside the box gets counted even if the close comes back in, since a standing order out there would have been live for the wick. Keyboard: Ctrl+Enter runs it, 1 to 3 load the examples, C copies the read.
Educational tool only, not financial advice. This grades a defined grid against the exact path you pasted. A different path, a different step, or slippage worse than your cost input changes every number here, and a grid that survived one stretch of data can still get run over by the next one.
Built by Jason Parker, founder of Trading Ranges.