Learn › Risk management

Time Stops: Exiting Because Time Ran Out, and When It Helps or Hurts

A time stop closes a trade that hasn't worked within N bars. We simulate 20,000 trades for momentum and mean-reversion edges, how to pick N, swap and weekends.

Intermediate 10 min read 22 October 2026

What you will learn
  • A time stop closes a trade that has reached neither its stop nor its target within N bars, on the idea that a good entry tends to show itself quickly
  • In our simulation a time stop helped a momentum-style edge when N was close to the edge's lifetime, but made a mean-reversion edge worse at every N we tried
  • The right test is the average remaining result of trades still open at bar N, not the share of winners you would cut
  • A time stop can raise the win rate while lowering expectancy, and it counts bars, which does not protect you from holding over a weekend

A time stop closes a trade because N bars have passed and it has reached neither its Stop loss nor its target, not because price hit any level. It sounds like a minor rule, but it can make a system better or worse, depending on whether the system’s edge pays out quickly or slowly. This article simulates 20,000 trades for two kinds of edge to show both sides, then sets out how to pick N from your own system’s data.

Why exit on time

There are three main reasons.

  1. A good entry tends to show itself quickly. If you entered because you expected buying pressure, and 20 bars later price is still flat, the reason for the trade may be gone. What is left is a bet on price wandering around
  2. Capital and attention are tied up. An open trade uses margin and a slot in your risk budget. If you cap how many trades you hold at once, a stalled trade is a good trade you didn’t take
  3. Swap runs every night. A trade held over the server’s day change pays or receives swap, and one set night (usually Wednesday) is charged three times. The longer you hold, the more it adds up. Details in What is swap

All three are sound reasons, but none of them proves that a trade which stalls will end worse than an average trade. That is the question you have to measure.

A simulation: two kinds of edge

We built simulated prices in node, with a random swing of 0.2R per bar (R = the stop distance). The stop sits at −1R, the longest hold is 500 bars, and each model runs 20,000 trades. Then we gave it two edges that look quite different.

  • Momentum-style edge (target +2R). 45% of trades are real signals: price has an upward drift of +0.05R per bar for the first 20 bars, then runs out of steam. The other 55% are false signals that slowly fade, drifting −0.02R per bar for the first 30 bars
  • Mean-reversion edge (target +1.5R). Entry comes when price is stretched 1.5R from its mean. In half the trades price is pulled back toward the mean, with the gap halving every 40 bars. In the other half the mean has moved and price just wanders

All of this is simulated price, not a real market. The numbers are built to show the mechanism, not to estimate the results of any system.

How long winners take

Before adding a time stop, look at how many bars winners take to reach the target. In the momentum model without a time stop, 50% of winners reach the target within 45 bars, 75% within 83 bars and 90% within 132 bars. Half the losers hit the stop within 30 bars.

N = 20 Median 45 90% of winners = 132 Winners: bar that hits +2R Losers: bar that hits −1R 050100150200 Bars held until the trade ends (10-bar bins)
Simulated prices, not a real market. A momentum-style system with a 1R stop and a 2R target, no time stop. Trades held over 200 bars (about 2% of all trades) are not shown. Losers end sooner than winners, but the two groups overlap heavily.

Notice that although the real edge only lasts 20 bars, many winners still arrive long after that, because a random walk does reach +2R some of the time. Those late winners are mostly luck, not edge.

Results with a time stop

Momentum-style edge, closing at the close of bar N if the trade is still open:

Time stopWin rateExpectancy (before swap)Avg hold (bars)After swapClosed on time
None39.8%0.194R53.30.127R0%
5 bars54.8%0.061R5.00.055R98.4%
10 bars55.8%0.127R9.80.115R91.1%
20 bars56.2%0.254R18.00.232R71.3%
40 bars50.1%0.201R29.50.164R45.3%
80 bars44.9%0.196R42.10.143R21.1%

Mean-reversion edge:

Time stopWin rateExpectancy (before swap)Avg hold (bars)After swap
None59.1%0.476R48.40.416R
10 bars57.6%0.120R9.80.108R
20 bars59.7%0.206R18.30.183R
40 bars60.5%0.317R30.30.280R
80 bars59.6%0.420R41.90.367R
Momentum-style edge 0.127 None 0.115 10 0.232 20 0.164 40 0.143 80 Mean reversion 0.416 None 0.108 10 0.183 20 0.280 40 0.367 80 Time stop at N bars · expected value per trade after swap (R)
Simulated prices, not a real market. The blue bar is no time stop, green is better, red is worse. An assumed swap of 0.03R per night is deducted. The momentum-style edge gains when N is close to the lifetime of the edge; mean reversion gets worse at every N tested.

Four things stand out.

  1. N shorter than the edge’s lifetime hurts both. Cutting at 5–10 bars exits before the edge has had time to work
  2. The momentum edge gains at N = 20. Expectancy before swap rises from 0.194R to 0.254R, because the trades still open at bar 20 include many false signals that keep fading. Cutting them gets money back
  3. Mean reversion gets worse at every N. Even at 80 bars, expectancy before swap drops by 0.056R (about 12%). This edge pays slowly, and a trade that has moved further against you is more stretched, so the pull back is stronger. The time stop cuts exactly the trades with the most left in them
  4. The win rate is misleading. In the momentum model a 10-bar time stop wins 55.8%, far above no time stop, yet its expectancy is lower, because a trade closed on time for a tiny profit still counts as a win. More in A high win rate doesn’t mean profit

We ran two more variants to check the conclusions don’t come from a lucky setting. If the momentum model’s false signals don’t fade and just wander, expectancy before swap at N = 20, 40 and 80 is 0.434R, 0.430R and 0.424R, against 0.420R with no time stop, practically the same, while N = 5 drops to 0.115R. And if the mean-reversion trades whose mean has moved keep drifting −0.01R per bar, the time stop is still worse at every N (0.286R with none against 0.249R at 80 bars).

A time stop doesn’t create profit. It helps when trades that stall have a negative average remaining result. If stalled trades only wander, it saves cost and time and nothing else. If they still carry edge, it throws money away.

Picking N from data: the remaining-result test

A common tip is to set N where 80–90% of winners have already reached the target. It sounds safe, but the numbers above say it isn’t enough. In the mean-reversion model 80% of winners reach the target within 78 bars, yet cutting at 80 bars still costs 12% of expectancy. The real cost is not the winners you cut, it is every trade still open, including the ones in the red that would have come back.

The better approach asks a single question: for trades still open at bar N, if you held them under the original rules, how much more would they make on average from that point?

  1. Take the trade list from a backtest without a time stop. You need the price for every bar while each trade was open, or at least the floating profit at the bar you want to test
  2. Select the trades still open at bar N
  3. For each, take the final result minus the floating profit at bar N, then average
  4. Subtract the costs that holding on would add, such as swap for the extra nights
  5. If the result is still clearly positive, don’t cut at that N. If it is near zero or negative, that bar is where a time stop starts to pay
+0.44 +0.40 +0.37 +0.36 +0.35 +0.14 +0.08 −0.08 0.00 +0.01 Mean reversion: open trades still have value leftMomentum: almost nothing left after bar 20 0.40.20 510204080Bar N · average result from bar N to the end, for trades still open (R)
Simulated prices, not a real market, before swap. Where the line is above zero, cutting at that bar throws away expected value that is still there. At zero or below, holding on only adds cost and risk.

In the simulation, momentum trades still open at bar 20 (71.7% of trades) went on to average −0.082R from there, which is why the N = 20 row improves. Check: 0.194 − 0.717 × (−0.082) = 0.253R, close to the 0.254R in the table (the gap is rounding). Mean-reversion trades still open at bar 80 still went on to average +0.348R, so cutting there loses expectancy. The bar-by-bar data inside each trade is the same data used in MAE and MFE.

Watch two things. Few trades are still open at distant bars, so the average swings a lot; you need several hundred trades or more. And don’t sweep N one bar at a time and keep the best. Look for a range where the remaining result stays negative, then check it on another stretch of data. The reason is in Overfitting: peak or plateau.

Our backtest results

In our backtest on gold, using a box breakout system with a wide stop and a near target, we tried closing trades held longer than a set time, from 15 to 240 minutes, on M15 and M5. No setting beat not cutting at all. The per-trade data from the same system explains why. 82% of winners pulled back through the entry price before winning. Winners that pulled back more than 10 dollars were held about 64 minutes, and losers about 96 minutes. Along the way winners and losers look the same, so time can’t tell them apart.

This was tested in MT5. The data set has real ticks only for 2026; the 2022–2025 runs used ticks generated from 1-minute bars. Backtest results do not predict future results, and they are not returns you should expect. The result applies to that system only. Other systems have to be measured on their own.

Time stops, swap and weekends

Swap. In the simulation we deducted an assumed swap of 0.03R per night, treating bars as H1 (24 bars per day) and spreading the cost evenly per bar. In reality swap is charged once at the server’s day change. As an example, if you risk 100 dollars per trade (1R) and swap is 3 dollars a night:

  • No time stop: average hold 53.3 bars = 2.22 nights, so on average 2.22 × 3 = 6.66 dollars, or 0.067R, taking 0.194R down to 0.127R
  • 20-bar time stop: average hold 18.0 bars = 0.75 nights, so 2.25 dollars, or 0.0225R, taking 0.254R down to 0.232R

The more negative the swap, the more a time stop is worth. If swap is positive (you receive it), it works the other way and holding longer earns money. Swap varies by broker and instrument; check the symbol specification in MT5, including the triple-swap night.

Count bars, not clock hours. No bars form while the market is closed. An H1 trade opened on Friday night with a 20-bar time stop will stay open over the weekend, because it hasn’t reached 20 bars yet. If your system shouldn’t hold over the weekend, it needs a separate rule; don’t rely on the time stop for that.

Closing before the weekend is a calendar time stop. Forex closes at 17:00 New York time on Friday, which is around 04:00–05:00 on Saturday morning, Thai time (UTC+7), depending on US daylight saving time. Closing first removes the risk of Monday’s open jumping past your stop; see Weekend gap risk. But the cost is the same as above: you give up the trade’s remaining result and pay the spread again to re-enter. A short-term system loses almost nothing; a system that holds for days may lose a lot. Measure it with the same remaining-result test, using “trades still open on Friday afternoon” in place of bar N.

End-of-day exits. Many day-trading systems close everything before the server’s day change, to avoid swap and avoid holding through the thinnest part of the day. The catch is that spreads often widen near the day change, so closing a little earlier beats closing right at it. Times are in Forex market hours in Thai time.

Using a time stop well

  1. Know how your edge pays. Breakouts and momentum should show results quickly, so a time stop has a chance to help. Reversion to a mean pays slowly, and a short time stop usually hurts
  2. Measure the remaining result at bar N from trades without a time stop before you set it. Don’t rely on winner percentiles alone
  3. Don’t set N shorter than the edge’s lifetime. If you don’t know the lifetime, start with a long N that cuts few trades and move in from there
  4. Count the full cost of holding, including swap, the triple-swap night and weekend risk. Keep a pre-weekend rule separate from the time stop
  5. Look at expectancy per trade and per unit of time in the market together. A time stop shortens holds. If there is always a new signal waiting, the time you get back is worth something. If not, expectancy per trade is what matters

The time stop is one of the exits compared in 7 trailing stop methods. If your system already uses a trailing stop, test the time stop together with it, not separately, because both cut the same group of trades.

Before cutting a trade because time is up, ask how trades like this one, still open at this point, ended in the past. If you can’t answer, you’re not ready to set a time stop.

Common mistakes

  • Cutting out of impatience, not by rule. Closing a flat trade because you’re bored, then keeping another because it feels like it will go, is choosing after seeing price. Your test results no longer apply
  • Celebrating a higher win rate. A time stop turns losers that haven’t hit the stop yet into small winners. The win rate rises, but expectancy may fall
  • Using one N for every system. Each edge pays at its own pace. A number that helps a breakout system can wreck a mean-reversion one
  • Forgetting that bars stop when the market closes. A bar-count time stop does not prevent holding over a weekend
  • Tuning N on one stretch of data. The best value in one year is often noise. You need similar results across several periods before using it for real

Frequently asked questions

How many bars should a time stop be?

There is no universal number. Measure it on your own system's trades. Look at how trades still open at bar N went on to do from that point. If the average is still positive after costs, don't cut at that bar. If it is near zero or negative, that is where a time stop starts to pay.

Can MT5 set a time stop on an order?

Not for an open position. The Expiration field only applies to pending orders. To use a time stop you have to note the time and close the trade yourself, or use an EA that has the rule built in.

Should I close everything before the weekend?

It really does remove the risk of a Monday gap, but it is a kind of time stop and has the same cost. You give up whatever expected value the trade still had, and pay the spread again if you re-enter. A system that holds for days can lose more than it saves.

This is general education, not investment advice. Trading is risky and you may lose all of your capital.

Tools Chat on LINE