Testing and analysis
Overlapping Forex Trades: How to Backtest Position Limits
Published ForeXpert team日本語で読む

To backtest overlapping forex trades, decide how many positions can be open at once, which event takes priority, and how to log signals you skip. With the same chart and entry criteria, changing the number of available slots can change which trades you take.
We'll compare a one-position limit with a two-position limit using the same signals on one currency pair. The example also shows why a signal timestamp, an order timestamp, and a fill timestamp belong in separate fields when an order can wait before it fills.
What counts as an overlapping trade?
Two trades overlap when the second position opens before the first one closes. Suppose one position opens at 10:00 and closes at 11:00, and another fills at 10:15. The positions overlap from 10:15 to 11:00. If a signal at 10:15 instead generates a limit order that fills after 11:00, the positions themselves do not overlap.
The tricky case in a manual backtest is a signal that meets your entry criteria while another trade is still open. A one-position rule can require you to wait until that position closes before accepting a fresh signal. A two-position rule can let you take the next candidate if a slot is available. You'll also need to know what an opposite-direction signal does, since closing the existing trade changes the state for every subsequent decision.
Automated tests make similar choices in their settings. TradingView, for example, has a setting that limits successive entries in the same direction. In a manual test, write down your own count and the policy for opposite-direction signals so you can apply them consistently as you replay the chart. TradingView strategy properties
How to backtest overlapping forex trades

1. Define what takes up a slot
For a single-pair test, you could count every filled entry that remains open as one slot. If you test across several currency pairs, specify whether each pair has a separate limit or the pairs share one pool. If your trading interface groups several same-direction entries into a single line, document how the individual entries count in your test.
With pending orders, decide whether submitting the order reserves a slot or a slot is checked at the time of the fill. If an unfilled order reserves capacity, write down when canceling it frees that capacity. If you check only at the fill, decide what happens when two orders qualify for the last slot, including whether the remaining order stays active or is canceled. An order expiry rule gives you another way to make the lifetime of a pending order explicit.
2. Set the order for exits and entries
A new signal can appear on the same bar as an exit. If your test evaluates both at the close, one workable convention is to process the existing exit first, then check whether you can submit a new order. An intrabar decision needs to use the sequence available at the moment of that decision. In either case, state when the new order is assumed to fill.
A candle's open, high, low, and close leave much of the intrabar path unknown. Flag cases where you cannot establish the sequence and apply your documented convention. The same issue occurs when a stop and a target are touched on one candle.
3. Give simultaneous candidates a priority
When two candidates compete for one slot, you could process whichever was confirmed first. If both qualify at the same timestamp, use a predefined setup order or skip both under a rule written before the replay. Put the deciding field in your notes so you can tell whether the tie was resolved as intended.
Choose a rule you can apply using the information available at that moment. For instance, whichever candidate had the better eventual exit would require looking ahead. If you add an instruction to close an existing trade on an opposite signal, your exit rule has also changed. Record that change before interpreting a comparison between runs.
Comparing one and two open positions
This fictional example starts with no open positions. A, B, and C are same-direction candidates on the same pair. An accepted entry fills immediately at the listed time, exits go first when timestamps match, and skipped signals expire immediately. A and B have fixed exit events for this illustration.
| Time | Event | One slot | Two slots |
|---|---|---|---|
| 10:00 | A signals | Open A | Open A |
| 10:15 | B signals | Skip B | Open B |
| 10:30 | A exits, C signals | Close A, open C | Close A, open C |
| 10:45 | B's exit condition is met | No action | Close B |
B is a candidate in both runs. A list restricted to completed trades would hide that fact in the one-slot run. Immediately after 10:30, the first run holds C, while the second holds B and C. That creates two stretches of overlapping exposure in the second run, first during A and B and then during B and C.
Suppose instead that you check the entry first at 10:30. Both tests still have all their slots occupied at that point. Both would skip C. A timestamp by itself cannot explain that difference, so add a short note such as “checked after A closed” to the row when the sequence matters.
What to record in a manual backtest
Keep one row per candidate with its signal time, currency pair, direction, the open count just before the decision, and the action and reason. If you submit an order, add the time it fills or the time you cancel it. For filled entries, link the exit time so you can reconstruct the intervals during which trades were open together.
For B in the one-slot run, the row might read “10:15, long, one position open, skipped, limit reached.” Keeping that row lets you distinguish an eligible setup blocked by your cap from a setup whose conditions never became true. See how to log skipped setups for ways to keep the reason short and consistent.
In ForeXpert, you can step through past charts bar by bar, place orders, and review closed trades in the history screen. Keep the candidate rows and your open counts in a separate note, then match the entries you accepted with the history. A short ID in your notes is helpful when several events occur around the same time.

To isolate the effect of the cap, run the same dates with the same signal criteria, exit rules, and cost assumptions. Compare the number of candidates, the number blocked by the cap, and the number that actually opened. Then look at when positions overlapped and which later candidates appeared while capacity was still occupied. A change to one entry can affect later decisions because it changes when a slot becomes available again.
Two runs with the same open count can still respond differently to price changes if their positions differ in size or direction. When reviewing total profit and loss, look at the stretches where positions shared a direction so you can trace how the overlap affected your historical result. A backtest does not guarantee future performance, and live trading can result in losses.
FAQ
Should I use a one-position limit?
Use the limit that matches the rules you want to rehearse. A cap of one is straightforward if your process always waits until the current position closes. If your process allows additional entries, specify what can trigger each addition and how the existing trades exit.
Can I reuse a signal when a slot opens?
Decide before replaying the chart. If a candidate stays eligible, write down when you check it again, when it expires, and which changes invalidate it. If your method requires a fresh signal, keep the original row marked as skipped and wait for a new candidate.
Can I combine trade histories from different currency pairs?
Combining completed trades shows which trades each individual test accepted. To reproduce a cap shared across pairs, align the candidates and exits to one time basis and process them in chronological order against the shared slots. A trade in one pair can occupy the last slot and block a candidate that would have been accepted in a separate test.
Summary
Before the next replay, write down what counts as a slot, how you order competing events, and what happens to skipped candidates. As you advance the chart, add the decision and its reason to each candidate row. When you compare two caps, find the first signal where the decisions diverge and follow what happens to capacity from that point.


