Ready to go further
Next: size your own grid
The grid calculator takes a start price, step and number of levels and shows how many positions are open and how large the loss is at each price.
What is included
- How the bot works, step by step
- The arithmetic of the ladder or grid, with tables
- How it fails and how to test it honestly
- The tools that check the numbers
Who it is for
- People thinking of using this kind of bot
- People already running one and wanting a stress test
- Readers comparing bot types before buying
- Not advice, and not a recommendation to use one
Key facts
- Forex grid trading places buy (or sell) orders at fixed steps on a currency pair, and closes each position at a small profit target when the price comes back.
- It earns small amounts in a range and loses in a trend, because every new level adds a position that is already on the wrong side.
- In the made-up example below, a 5 level grid with 0.1 lot at each level holds a -$300 floating loss at 1.0900 and -$800 at 1.0800 (calculated by us on 29 Oct 2026, exact).
- Three costs run alongside: spread when each level opens, swap for every night a level is held, and margin that rises with each added position.
- This page covers a currency pair. For the general idea see grid trading, and for the expert advisor version see grid EA.
How a grid works on a currency pair
Pick a price and a step, say 20 pips. A buy grid places a buy at the start price, another 20 pips lower, another 20 pips lower again, and so on, each with the same size. When the price rises 20 pips above any one of them, that position closes for the target. The bot is betting that the pair keeps moving up and down inside a range, collecting the step again and again. The general idea and spacing maths are on grid trading and in the grid calculator. For the expert advisor version, see grid EA.
On a currency pair three things are different from a grid on a spot coin:
- Leverage. The account holds only a slice of each position's value as margin, so more positions fit than the balance could buy outright. That also makes a bad run end faster.
- Swap. Holding a position past the daily rollover brings a charge or a credit, depending on the pair, the side and the day. It varies by broker.
- Spread. Each level is bought at the ask and closed at the bid, so the spread is paid on every position.
What the price trend does
In a range, price visits the same levels in both directions and each position closes for its step. In a down trend the buy grid fills level after level and nothing closes. The account is then holding several positions, all in loss, with the newest one furthest from the top. The loss grows faster than the price, because each fall of one pip now hurts every open level, not one. The margin requirement grows with each added position too.
A worked example: a 5 level grid in a fall
Every number is made up. A buy grid starts at 1.1000 with a step of 20 pips and 5 levels, so the levels are 1.1000, 1.0980, 1.0960, 1.0940, 1.0920. Each level is 0.1 lot, worth $1 per pip on a pair quoted in dollars. The spread is 1.2 pips, or $1.20 per level. The account is $2500 at 1:30 leverage, so each 0.1 lot needs the price times 10000 divided by 30 as margin. Spread is counted as paid when a level opens. Swap is left out of the table and added below. Everything was calculated by us on 29 Oct 2026 and is exact to the cent.
| Price | Levels open | Pips down, total | Floating loss | Margin held | Equity | Margin level |
|---|---|---|---|---|---|---|
| 1.0980 | 2 | 20 | -$20 | $732.00 | $2477.60 | 338.5% |
| 1.0960 | 3 | 60 | -$60 | $1096.00 | $2436.40 | 222.3% |
| 1.0940 | 4 | 120 | -$120 | $1458.67 | $2375.20 | 162.8% |
| 1.0920 | 5 | 200 | -$200 | $1820.00 | $2294.00 | 126.0% |
| 1.0900 | 5 | 300 | -$300 | $1816.67 | $2194.00 | 120.8% |
| 1.0800 | 5 | 800 | -$800 | $1800.00 | $1694.00 | 94.1% |
Read the table from the top. At 1.0980, one level has filled and the loss is -$20. By 1.0900 all 5 levels are open, with 300 pips of loss in total, -$300, and a margin level of 120.8 percent. The price is only 100 pips from the top, yet the grid is down 300 pips because five positions sit under it. At 1.0800, the loss is -$800 and the margin level has dropped to 94.1 percent. The grid has run out of levels, so it adds no new buys, but the account still carries them.
Swap. If each level is charged $0.30 a night (a made-up figure), five levels held 10 nights cost $15.00. In a long fall, this charge runs the whole time and does not depend on the price. On another pair or side, swap can be a credit instead.
The other direction. If the price rises 20 pips above a level, that level closes for 20 pips minus the 1.2 pip spread, which is 18.8 pips or $18.80 on 0.1 lot. Five full cycles in a range add up to $94.00, compared with -$300 of floating loss in the table at one fall to 1.0900. The asymmetry is the core risk of a grid: many small gains, one large floating loss.
How forex grids break, and what to check
- A trend outside the range. The levels run out, and the grid stops adding while the loss continues. See grid bot fees and costs and are grid bots profitable.
- Margin. Each added level lifts the margin held while equity falls. A margin call or stop out can close positions at the worst moment.
- Swap. A grid holds positions for days or weeks, so swap is not a small extra. Compare it with the step profit.
- Spread widening. At quiet hours or around news the spread widens, and a level can open or close at a worse price.
- Adding to the grid. Some designs grow the lot size at deeper levels. That is a martingale, with its own faster maths.
- Hedging the grid. Some designs open a sell to freeze the loss. That freezes exposure and not cost: see hedging strategy forex.
How to check a forex grid before using it
- Take the deepest fall in your test data, apply it to the full grid and compute the margin level, as in the table.
- Multiply the swap per night by the longest time the grid stayed open.
- Run the test with a wider spread, and with the data at tick detail if the grid acts inside bars.
- Write down the largest total open exposure and the lowest margin level in a journal.
What this page does not tell you
The numbers are made up, and the margin rules, swap rates and stop out levels differ by broker and by pair. A grid that survived one test period says little about the next.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
What is forex grid trading?
A method of placing buy or sell orders at fixed price steps on a currency pair, closing each for a small target. It collects small gains in a range and builds large floating losses in a trend.
How is it different from other grid trading?
A forex grid uses leverage and margin, pays spread on every level, and pays or earns swap for every night a level is held. Those three shape the risk.
What is swap in a grid?
Swap is a daily charge or credit for holding a position past the rollover. It depends on the pair, the side and the broker, and a grid that holds for weeks feels it.
Why does margin matter so much?
Every extra level adds margin while equity falls. The margin level can drop quickly in a trend, and a broker may close positions at a level that varies by broker.
Can a grid be tested?
Yes, with tick detail, a realistic and variable spread, swap and the deepest fall in the data. A bar-only test can hide what happens inside the step.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It is general education. All numbers are made up, and real spreads, swaps and margin rules differ.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss