Tested by BacktestingMax
Parabolic SAR flip strategy backtest
Does the Parabolic SAR flip strategy make money?
Mostly no. With the standard rules (the default settings, nothing added), 7 of our 36 backtests made money from 2019 to 2025, after trading costs, all on 4-hour or daily charts. The Parabolic SAR (stop and reverse) is an indicator that puts a dot, the SAR, under the price in an uptrend and over it in a downtrend. When price reaches the dot, the dot jumps to the other side: a flip. The flip strategy closes the trade at each flip and opens one in the other direction. We used the default settings (0.02, 0.02, 0.2), which set how fast the dot catches up with the price. We tested 9 markets: 4 currency pairs, gold, silver and 3 stock indices, each on 15-minute, 1-hour, 4-hour and daily charts. All 18 tests on 15-minute and 1-hour charts lost money. Only 5 tests made money in both 2019–2022 and 2023–2025: gold and USD/JPY on 4-hour charts, and EUR/USD, gold and silver on daily charts. Of three changes we tried, slower settings (0.01, 0.01, 0.1) helped on 1-hour charts in both periods, but not on 4-hour and daily charts in 2023–2025. Waiting for the candle that reached the SAR to close did not clearly help, with or without a close beyond the SAR.
36 backtests 2019–2025 Trading costs included Tested 2 November 2026
Where it worked 36 backtests- Made money
- 7 of 36 tests, with the standard rules
- Made money in both periods
- 5 2019–2022 and again 2023–2025
- Best backtest
- +76% Gold, 4-hour chart: account growth 2019–2025
- Slower settings: 0.01, 0.01, 0.1
- 5 tests made money in both periods, compared with 5 with the standard rules
Made money in both periods
- EUR/USD, daily
- USD/JPY, 4-hour
- Gold, 4-hour
- Gold, daily
- Silver, daily
Lost money on every market
- 15-minute charts
- 1-hour charts
The results
Results on every market
Each box shows one backtest of the Parabolic SAR flip strategy with the standard rules, from 2019 to 2025, after trading costs: the % result, and a small chart of the account balance. The solid line is the account balance and the dashed line is the starting balance. Green results made money; red results lost money. Under each result: whether it made money in both 2019–2022 and 2023–2025, or passed all four of our checks (see "How a test passes" further down).
| Market | 15-minute | 1-hour | 4-hour | daily |
|---|---|---|---|---|
| EUR/USD | −100% Lost money. Account down 90% by Aug 2019 | −95% Lost money. Account down 90% by Oct 2023 | −37% Lost money | +4% Made money in both periods |
| GBP/USD | −100% Lost money. Account down 90% by Jul 2019 | −88% Lost money | −27% Lost money | +5% Made money overall, lost in one period |
| USD/JPY | −100% Lost money. Account down 90% by Dec 2019 | −25% Lost money | +73% Made money in both periods | −17% Lost money |
| AUD/USD | −100% Lost money. Account down 90% by Aug 2019 | −97% Lost money. Account down 90% by Jun 2024 | −59% Lost money | −9% Lost money |
| Gold | −99% Lost money. Account down 90% by Dec 2019 | −53% Lost money | +76% Made money in both periods | +28% Passed all four checks |
| Silver | −99% Lost money. Account down 90% by Mar 2019 | −92% Lost money. Account down 90% by Jul 2022 | −24% Lost money | +15% Made money in both periods |
| S&P 500 | −100% Lost money. Account down 90% by Feb 2021 | −58% Lost money | −45% Lost money | +6% Made money overall, lost in one period |
| Nasdaq 100 | −97% Lost money. Account down 90% by Jul 2022 | −17% Lost money | −2% Lost money | 0.0% Lost money |
| DAX | −98% Lost money. Account down 90% by Oct 2021 | −36% Lost money | −21% Lost money | −6% Lost money |
All the numbers, test by test
| Market | Chart | Trades | Win rate | Profit factor | Result | Max drawdown | 2019–2022 | 2023–2025 | Monte Carlo drawdown | Trading costs |
|---|---|---|---|---|---|---|---|---|---|---|
| EUR/USD | 15-minute | 3,520 | 29.3% | 0.73 | −99.7% | −99.7% | −99.6% | −23.0% | −99.7% | $7,048 |
| EUR/USD | 1-hour | 3,810 | 33.6% | 0.78 | −94.8% | −94.8% | −86.9% | −60.3% | −96.1% | $3,357 |
| EUR/USD | 4-hour | 970 | 36.8% | 0.88 | −37.4% | −42.4% | −22.1% | −19.6% | −53.7% | $1,154 |
| EUR/USD | daily | 168 | 42.3% | 1.07 | +4.2% | −10.6% | +3.3% | +0.9% | −15.7% | $94 |
| GBP/USD | 15-minute | 4,098 | 29.9% | 0.64 | −99.5% | −99.6% | −99.3% | −34.1% | −99.6% | $4,553 |
| GBP/USD | 1-hour | 3,862 | 34.6% | 0.88 | −88.2% | −88.6% | −67.0% | −64.4% | −92.2% | $5,668 |
| GBP/USD | 4-hour | 971 | 37% | 0.93 | −27.0% | −44.3% | +10.7% | −34.1% | −50.5% | $1,591 |
| GBP/USD | daily | 173 | 39.9% | 1.07 | +4.6% | −8.0% | +9.6% | −4.6% | −15.9% | $115 |
| USD/JPY | 15-minute | 6,249 | 32.7% | 0.79 | −99.6% | −99.6% | −99.4% | −34.0% | −99.7% | $9,376 |
| USD/JPY | 1-hour | 3,652 | 35.9% | 0.98 | −25.2% | −56.5% | −32.0% | +10.0% | −73.6% | $9,017 |
| USD/JPY | 4-hour | 943 | 40% | 1.17 | +73.3% | −23.1% | +34.7% | +28.7% | −30.3% | $1,517 |
| USD/JPY | daily | 173 | 32.9% | 0.73 | −17.0% | −19.8% | −14.7% | −2.7% | −26.6% | $76 |
| AUD/USD | 15-minute | 4,281 | 30.8% | 0.77 | −99.7% | −99.7% | −99.5% | −33.8% | −99.7% | $10,711 |
| AUD/USD | 1-hour | 3,927 | 34.9% | 0.83 | −97.0% | −97.1% | −75.5% | −87.8% | −97.7% | $6,160 |
| AUD/USD | 4-hour | 1,026 | 36.3% | 0.81 | −59.3% | −63.4% | −34.8% | −37.6% | −67.3% | $1,535 |
| AUD/USD | daily | 173 | 37.6% | 0.87 | −9.1% | −18.6% | +4.6% | −13.1% | −22.2% | $138 |
| Gold | 15-minute | 3,608 | 30.8% | 0.76 | −98.7% | −98.8% | −98.4% | −18.5% | −99.0% | $11,752 |
| Gold | 1-hour | 3,442 | 35% | 0.94 | −52.8% | −69.4% | −40.1% | −21.2% | −77.5% | $7,758 |
| Gold | 4-hour | 903 | 37.9% | 1.16 | +76.1% | −28.9% | +22.3% | +44.0% | −31.0% | $1,784 |
| Gold | daily | 142 | 40.1% | 1.62 | +28.2% | −6.3% | +11.1% | +15.4% | −10.0% | $86 |
| Silver | 15-minute | 849 | 22.3% | 0.34 | −99.2% | −99.2% | −99.0% | −23.9% | −99.3% | $10,127 |
| Silver | 1-hour | 1,685 | 29.4% | 0.65 | −91.9% | −92.2% | −90.8% | −11.8% | −93.5% | $8,578 |
| Silver | 4-hour | 888 | 35.5% | 0.92 | −24.3% | −37.5% | −22.9% | −1.9% | −46.8% | $3,489 |
| Silver | daily | 139 | 42.4% | 1.35 | +14.7% | −7.6% | +10.8% | +3.5% | −9.7% | $233 |
| S&P 500 | 15-minute | 10,677 | 34.2% | 0.86 | −99.5% | −99.6% | −97.3% | −82.1% | −99.8% | $10,398 |
| S&P 500 | 1-hour | 3,653 | 35.6% | 0.95 | −57.5% | −63.7% | −16.3% | −49.2% | −81.6% | $5,910 |
| S&P 500 | 4-hour | 1,008 | 36.3% | 0.86 | −45.3% | −46.6% | −30.8% | −21.0% | −60.4% | $786 |
| S&P 500 | daily | 186 | 41.4% | 1.08 | +6.2% | −14.4% | −1.5% | +7.8% | −19.7% | $79 |
| Nasdaq 100 | 15-minute | 10,132 | 34.6% | 0.92 | −97.1% | −97.9% | −93.1% | −58.2% | −99.0% | $20,222 |
| Nasdaq 100 | 1-hour | 3,601 | 36.1% | 0.99 | −16.6% | −51.9% | +12.7% | −26.0% | −71.2% | $6,359 |
| Nasdaq 100 | 4-hour | 971 | 39.6% | 0.99 | −1.9% | −19.9% | −9.3% | +8.1% | −39.1% | $815 |
| Nasdaq 100 | daily | 173 | 41% | 1.00 | 0.0% | −6.5% | −1.0% | +1.1% | −16.4% | $54 |
| DAX | 15-minute | 7,772 | 33.7% | 0.94 | −98.2% | −98.7% | −95.9% | −55.4% | −99.0% | $10,628 |
| DAX | 1-hour | 3,549 | 35.4% | 0.97 | −35.7% | −71.2% | −17.3% | −22.3% | −72.8% | $3,594 |
| DAX | 4-hour | 986 | 36% | 0.93 | −21.4% | −37.9% | −22.1% | +0.9% | −46.3% | $461 |
| DAX | daily | 167 | 35.9% | 0.89 | −6.2% | −11.6% | −3.3% | −3.0% | −21.7% | $35 |
Profit factor is the money won divided by the money lost. Above 1 means the test made money. Max drawdown is the biggest fall from the highest balance. 2019–2022 and 2023–2025 show the result in each period on its own. Monte Carlo drawdown: we shuffled the trades into a random order 1,000 times; in 95% of those runs, the worst drawdown was this number or less. Result is the change in the account, with the risk of each trade set to 1% of the account at that time.
The account balance
The best test and the middle test
What we found
What the 36 backtests show
The SAR flipped about every 10 candles, whatever the chart. At every candle, the SAR moves part of the way toward the highest price of the trend (the lowest, in a downtrend). So its speed is counted in candles, not in hours. In a typical case (the median), the next flip came 10 or 11 candles later on all four charts. That was about 2.4 hours on 15-minute charts, and 13 days on daily charts. On each market, the SAR flipped 1,981 to 2,240 times a year on 15-minute charts, and 22 to 27 times a year on daily charts. Before costs, the trades were close to break-even on 15-minute, 1-hour and 4-hour charts, with the 9 markets of each chart added together. So the spread paid on every flip made them lose money (see the first table below).
On 15-minute and 1-hour charts, all 18 tests lost money, and all 9 tests on 15-minute charts lost more than 97% of their starting $10,000. On 4-hour charts, only gold (+76.1%) and USD/JPY (+73.3%) made money, and both made money in 2019–2022 and again in 2023–2025. On daily charts, 5 of the 9 markets made money, but only gold (+28.2%) and silver (+14.7%) made more than 10%. One market could do very differently on the next chart: USD/JPY made +73.3% on 4-hour charts, but lost 25.2% on 1-hour charts and 17.0% on daily charts.
Flips whose candle closed beyond the SAR looked better on a chart, but not for a trader who waited for that close. The flip candle is the candle in which price reached the SAR. In about half of the flips (48.9% to 51.5%, depending on the chart), it closed back where it came from. For example, price fell to the SAR in an uptrend, but the candle closed above it. R is the money a trade risked: 1% of the account at the time of the trade. With the standard rules, the trades from flips whose candle closed beyond the SAR made +0.163R each on 1-hour charts, on average, after costs. The trades from flips whose candle closed back lost 0.228R each. But the standard rules open the trade before the candle closes, so much of this difference is the move inside the flip candle. With the change 'Wait for the candle to close', the trade opens at the next candle's open, and the difference mostly disappeared. On 1-hour charts, the trades from flips that closed beyond lost 0.026R each, and the others 0.050R. On 4-hour charts, they lost 0.015R and 0.019R, and on daily charts the flips that closed back did better (see the second table below).
We tried three changes: slower settings, waiting for the candle to close, and waiting for a close beyond the SAR. The slower settings (0.01, 0.01, 0.1) did best. With them, the SAR flipped about 38% less often, and in a typical case the next flip came 15 to 18 candles later instead of 10 or 11. With the 9 markets of each chart added together, the trades made more, or lost less, for every $100 they risked, on every chart (see the last table below). The biggest change was on 1-hour charts: 3 of the 9 markets made money instead of none. USD/JPY made +170.3%, gold +82.7% and the DAX +64.0%, and all three made money in both periods. But in 2023–2025 alone, the slower settings did worse than the standard settings on 4-hour and daily charts. In those years, for every $100 risked, they lost $2.69 on 4-hour charts, where the standard settings made $0.22. On daily charts, they were about break-even ($0.06), compared with $1.00. The two ways of waiting for the close did not clearly help (see 'Can the Parabolic SAR flip strategy be improved?' further down).
Trades and trading costs
The SAR flipped about every 10 candles on every chart, so a typical trade lasted 2.4 hours on 15-minute charts and 13 days on daily charts
These numbers come from the standard rules, from 2019 to 2025. A typical trade is the median: half of the trades were shorter, half longer. The time in brackets includes weekends. The last three columns show what the trades made or lost for every $100 they risked, with the 9 markets of each chart added together. They show the result before trading costs, the trading costs, and the result after costs.
| Chart | Flips a year, on each market | A typical trade | Before costs | Trading costs | After costs |
|---|---|---|---|---|---|
| 15-minute | 1,981 to 2,240 | 10 candles (2.4 hours) | +$0.46 | $7.74 | −$7.28 |
| 1-hour | 499 to 564 | 11 candles (11 hours) | +$0.02 | $3.10 | −$3.07 |
| 4-hour | 129 to 147 | 10 candles (2.1 days) | +$0.79 | $1.61 | −$0.83 |
| Daily | 22 to 27 | 10 candles (13 days) | +$2.30 | $0.60 | +$1.70 |
Each trade risked 1% of the account at the time of the trade, and we added up what all the trades risked and what they made or lost. The trading cost is the spread, the gap between the buy price and the sell price. On a short chart, the stop-loss is closer to the entry. So a trade that risks 1% is bigger, and its spread takes a bigger share of the money it risks.
The flip candle
Flips whose candle closed beyond the SAR looked better on the chart, but not for a trader who waited for that close
The flip candle is the candle in which price reached the SAR. In about half of the flips, it closed back where it came from: for example, price fell to the SAR in an uptrend, but the candle closed above it. This table splits the trades by how the flip candle closed. Each result is the average result of one trade, in R, after trading costs, from 2019 to 2025, with the 9 markets of each chart together. R is the money a trade risked: 1% of the account at the time of the trade.
| Chart | Flip candles that closed back | Standard rules: flip candle closed beyond the SAR | Standard rules: flip candle closed back | Wait for the candle to close: flip candle closed beyond | Wait for the candle to close: flip candle closed back |
|---|---|---|---|---|---|
| 15-minute | 50.2% | +0.068R | −0.219R | −0.078R | −0.095R |
| 1-hour | 51.2% | +0.163R | −0.228R | −0.026R | −0.050R |
| 4-hour | 51.5% | +0.193R | −0.209R | −0.015R | −0.019R |
| Daily | 48.9% | +0.196R | −0.169R | +0.011R | +0.034R |
The standard rules open the new trade when price reaches the SAR, before the flip candle closes. When the candle then closes beyond the SAR, the price has already moved in the trade's favour, and this move is part of the trade's result. With the change 'Wait for the candle to close', the trade opens at the next candle's open, so it does not get that move. The share of flip candles that closed back counts all the flips. The trade results count the trades that the standard rules and the change each made.
The changes, chart by chart
The slower settings did better than the standard rules on every chart, but with the 9 markets together they still lost money on 15-minute, 1-hour and 4-hour charts
Each result is what the trades made or lost for every $100 they risked, after trading costs, from 2019 to 2025, with the 9 markets of each chart added together. In brackets: how many of the 9 markets made money from 2019 to 2025.
| Chart | Standard rules | Wait for the candle to close | Wait for a close beyond the SAR | Slower settings: 0.01, 0.01, 0.1 |
|---|---|---|---|---|
| 15-minute | −$7.28 (0 of 9) | −$7.79 (0 of 9) | −$6.64 (0 of 9) | −$4.67 (0 of 9) |
| 1-hour | −$3.07 (0 of 9) | −$3.59 (0 of 9) | −$2.46 (2 of 9) | −$0.45 (3 of 9) |
| 4-hour | −$0.83 (2 of 9) | −$1.46 (3 of 9) | −$1.41 (5 of 9) | −$0.27 (4 of 9) |
| Daily | +$1.70 (5 of 9) | +$2.46 (4 of 9) | +$1.56 (6 of 9) | +$3.04 (6 of 9) |
With two of the changes, many daily tests had fewer than 100 trades in 7 years, too few to judge on their own. That was 5 of the 9 with the slower settings, and 8 of the 9 with a close beyond the SAR. They include 4 of the 6 daily tests that made money with the slower settings, and 5 of the 6 with a close beyond the SAR. The standard rules and 'Wait for the candle to close' had at least 136 daily trades on every market.
The strategy
What the Parabolic SAR flip strategy is
The Parabolic SAR is an indicator that J. Welles Wilder published in 1978. SAR stands for stop and reverse. The indicator draws one dot for each candle: under the price in an uptrend, and over the price in a downtrend. In an uptrend, the dot moves up at every candle, even when price does not move. Each time, it closes part of the gap between the dot and the highest price of the trend so far. That part is called the acceleration factor. With the default settings, it starts at 0.02 (2% of the gap) and grows by 0.02 each time price makes a new high, up to 0.2 (20%). So the more new highs a trend makes, the faster the dot catches up with the price. In an uptrend, the dot never moves above the lowest price of the last two candles. When price falls to the dot, the trend flips: the dot jumps over the price, to the highest price of the uptrend, and the acceleration factor starts again at 0.02. A downtrend works the same way, in the opposite direction. Wilder used the dot as a stop-loss that follows the trend, and as the place to stop and reverse. The flip strategy does exactly that: when price reaches the dot, it closes the trade and opens a trade in the other direction. So it always has a trade open.
- Parabolic SAR
- 0.02, 0.02, 0.2: the acceleration factor starts at 0.02, grows by 0.02 at each new high (in a downtrend, at each new low) and stops at 0.2. These are Wilder's settings and the default on TradingView and most other charting platforms.
- Stop-loss
- The SAR. A new trade's first stop-loss is at the old trend's highest price (for a sell) or lowest price (for a buy). In a typical flip (the median), it was about 2 to 2.3 ATR from the price. ATR (average true range) is how far price moves in an average candle, over the last 14 candles. From the next candle on, the stop-loss is the SAR.
- Take-profit
- None. A trade stays open until price reaches the SAR.
- Risk per trade
- 1% of the account at the time of the trade, measured from the entry to the first stop-loss. The account started at $10,000. From the next candle on, the SAR moves closer to the price at every candle, so most trades that closed at the SAR lost less than 1% or made money.
- Price checks
- We worked out the SAR on the chart's candles, but checked the price every minute, on 1-minute candles. When a 1-minute candle reached the SAR, the old trade closed at the open of the next minute, and the new trade opened one minute later. So every stop and reverse happened at prices the market really traded at, about 1 to 2 minutes after price reached the SAR. To run this test in BacktestingMax, use a 1-minute chart and set 'chart' to the length of the SAR candles in minutes: 15, 60, 240 or 1440.
- Trading costs
- The spread, which is the gap between the buy price and the sell price. On currency pairs, the spread is in pips: a pip is 0.0001 on EUR/USD, GBP/USD and AUD/USD, and 0.01 on USD/JPY. The spread is 0.8 pips on EUR/USD, 1.2 on GBP/USD, 0.9 on USD/JPY and 1.0 on AUD/USD. It is $0.30 an ounce on gold and $0.020 on silver, and 0.4 points on the S&P 500, 1.5 on the Nasdaq 100 and 1.0 on the DAX. For silver, the Nasdaq 100 and the DAX, these are wider than our backtest engine's own spreads, to match a typical retail broker. Every order in this test is a market order or a stop-loss, so each trade pays half the spread when it opens and half when it closes. There is no commission.
- Smallest trade size
- A trade that risks 1% can be smaller than the smallest trade a market allows. The smallest trades are 1,000 units of a currency pair, 1 ounce of gold, 50 ounces of silver and 0.1 of an index contract. When that happens, the test skips the signal and waits for the next flip. With the standard rules, this skipped 18 silver, 15 DAX, 13 gold and 7 Nasdaq 100 signals on daily charts. Most of them were in 2020 and 2025, when prices moved the most. On 4-hour charts, it skipped 26 silver, 9 DAX and 3 Nasdaq 100 signals. On 1-hour charts, it skipped 1,847 silver signals and 126 on the other 8 markets together. The silver account lost more than 90% in July 2022, and 1,522 out of 1,847 came after that. On 15-minute charts, it skipped thousands of signals on each market, most of them after the account had lost more than 90%.
- Overnight fees
- Not included. Brokers charge a fee (a swap), or sometimes pay one, for each night a trade stays open. With the standard rules, half of the trades stayed open longer than 2.4 hours on 15-minute charts and 11 hours on 1-hour charts. On 4-hour charts it was 2.1 days, and on daily charts 13 days.
- Price data
- CFD prices: the prices a broker quotes for a CFD (contract for difference), the product most brokers outside the US offer for trading these markets. From 2019 to 2025, our data has a few minutes of prices after the weekly close at 17:00 New York time. This happened on 13 Fridays for the S&P 500 and 29 for the DAX. The test leaves out every candle that starts on a Friday at 17:00 New York time or later, so these minutes don't move the SAR or open a trade.
The rules we tested
- Work out the Parabolic SAR with the default settings (start 0.02, step 0.02, maximum 0.2) on the candles of the chart: 15-minute, 1-hour, 4-hour or daily. The SAR of each candle is set when the candle before it closes, and it stays the same during the candle.
- Stop and reverse: the SAR is the stop-loss of the open trade. When the SAR is under the price and price falls to it, close the buy and sell short. When the SAR is over the price and price rises to it, close the sell and buy. The new trade opens at about the same price (see 'Price checks'). Selling short means selling first and buying back later, so the trade makes money if price falls.
- There is no take-profit: every trade stays open until price reaches the SAR.
- A new trade's first stop-loss is at the old trend's extreme. For a sell, it is the highest price of the uptrend, or of the current candle if price went higher. For a buy, it is the lowest price of the downtrend, or of the current candle if price went lower. From the next candle on, the stop-loss is the SAR, which moves toward the price at every candle.
- Sometimes price reaches the new trade's first stop-loss during the flip candle, the candle in which price reached the SAR. Then the trade closes there, and the strategy waits for the next flip. This happened in 0.7% to 2.0% of the trades, depending on the chart.
- Size every trade so that a loss at its first stop-loss costs 1% of the account. Only one trade is open at a time.
The method
How we tested it
The test
- Markets
- EUR/USD, GBP/USD, USD/JPY, AUD/USD, Gold, Silver, S&P 500, Nasdaq 100 and DAX
- Charts
- 15-minute, 1-hour, 4-hour and daily candles
- Dates
- January 2019 to December 2025
- Account
- $10,000, risking 1% of the account on each trade
- Trading costs
- Included. Every trade pays that market's normal trading cost: the spread, which is the gap between the buy price and the sell price.
How a test passes
We call a test passed only if it meets all four checks. A strategy can make money in one backtest and still fail one of these checks.
- At least 100 trades. With fewer trades, a good result could be luck.
- It made money from 2019 to 2022 and again from 2023 to 2025. This shows whether the strategy kept working in the newer years, not only in the older ones.
- A profit factor (the money won divided by the money lost) of at least 1.2 from 2023 to 2025, after trading costs.
- In 95% of 1,000 random shuffles of the trades, the account must not fall more than 30% from its highest point.
Improvements
Can the Parabolic SAR flip strategy be improved?
We tried three changes, one at a time, on the same 36 tests. In the table, each change is one version. Two of them change when the new trade opens. Many traders wait for the flip candle to close before they trade a flip, and some trade it only if that candle closed beyond the SAR. We added 'Wait for a close beyond the SAR' after a first look at our results. There, the flips whose candle closed beyond the SAR looked better (see 'The flip candle' above). The third change is the slower setting 0.01, 0.01, 0.1, which many traders use to get fewer flips. If you pick the best change and judge it on the same years, it will almost always look good. So we picked the best change using 2019–2022 only, by the number of tests that made money, and then checked it on 2023–2025.
| Version | Made money 2019–2022years used to pick the best version | Made money 2023–2025years not used to pick it | Made money in both periods | Passed all four checks |
|---|---|---|---|---|
| Standard rules: stop and reverse at the SAR The rules under 'The rules we tested', with nothing changed. | 9 of 36middle test −22.5% | 10 of 36middle test −20.3% | 5 | 1 |
| Wait for the candle to close When price reaches the SAR, the trade still closes at the SAR. But the new trade opens only when that candle has closed, at the open of the next candle. Its first stop-loss is the SAR of that next candle. | 8 of 36middle test −25.8% | 8 of 36middle test −13.8% | 4 | 1 |
| Wait for a close beyond the SAR The same as waiting for the candle to close, but the new trade opens only if that candle closed beyond the SAR it reached. That means below the SAR for a sell, and above it for a buy. If the candle closed back on the other side, there is no new trade until the next flip. | 11 of 36middle test −7.0% | 12 of 36middle test −10.6% | 2 | 0 |
| Slower settings: 0.01, 0.01, 0.1Best on 2019–2022 The acceleration factor starts at 0.01, grows by 0.01 at each new high (or low), and stops at 0.1. So the SAR moves toward the price about half as fast, and it flips less often. Many traders suggest these settings for markets without a clear trend. | 15 of 36middle test −6.2% | 11 of 36middle test −13.5% | 5 | 1 |
The slower settings did better in 2019–2022, the years we used to pick the best change: 15 of 36 tests made money, compared with 9 with the standard settings. In 2023–2025, the years we kept for the check, 11 of 36 made money, compared with 10. But 4 of those 15, and 4 of those 11, were daily tests with fewer than 100 trades, too few to judge. Without them, 7 tests made money in 2023–2025 with the slower settings, compared with 10 with the standard settings, which had no such tests. The clearest gain was on 1-hour charts: USD/JPY, gold and the DAX made money there in both periods. In 2023–2025, the slower settings did worse than the standard settings on 4-hour and daily charts. Waiting for the candle to close made money in 8 of 36 tests in each period, a little less than the standard rules. Waiting for a close beyond the SAR made money in 11 tests in 2019–2022 and 12 in 2023–2025, but most results were small. In each period, 5 of them were daily tests with fewer than 100 trades. With this change, only 2 tests made money in both periods with at least 100 trades.
Passed all four checks with slower settings: 0.01, 0.01, 0.1
- S&P 500, daily
Questions
Questions traders ask
Does the Parabolic SAR strategy work?
Mostly no. In our backtest from 2019 to 2025, with trading costs, the Parabolic SAR flip strategy made money in 7 of 36 tests. We tested 9 markets, each on 15-minute, 1-hour, 4-hour and daily charts. All 7 were on 4-hour or daily charts. Only 5 tests made money in both 2019–2022 and 2023–2025: gold and USD/JPY on 4-hour charts, and EUR/USD, gold and silver on daily charts. One test passed all four of our checks: gold on daily charts. Before trading costs, with the 9 markets of each chart added together, the trades were close to break-even on 15-minute, 1-hour and 4-hour charts.
What is the best timeframe for the Parabolic SAR?
In our test, the daily chart, because the most markets made money there. With the standard settings, 5 of the 9 made money on daily charts, 2 of 9 on 4-hour charts, and none on 15-minute or 1-hour charts. The two biggest results were on 4-hour charts, though: gold made +76.1% and USD/JPY +73.3%. The SAR flips about every 10 candles on any chart, so short charts make many more trades. On 15-minute charts, the SAR flipped 1,981 to 2,240 times a year on each market. Every trade pays the spread (the gap between the buy price and the sell price), so more trades cost more. On 15-minute charts, the trades made 46 cents before costs for every $100 they risked, and paid $7.74 in trading costs. On daily charts, they made $2.30 before costs and paid $0.60.
What are the best Parabolic SAR settings?
In our test, the slower settings 0.01, 0.01 and 0.1 did better than the default 0.02, 0.02 and 0.2 on 1-hour charts, in both 2019–2022 and 2023–2025. On 1-hour charts, USD/JPY, gold and the DAX made money with them in both periods, while the default settings lost money on all 9 markets. With the slower settings, the SAR flipped about 38% less often, so there were fewer trades and lower trading costs. But in 2023–2025, they did worse than the default settings on 4-hour and daily charts. Settings that did best in one backtest often do worse later, so test them on your own market first.
Should you wait for the candle to close when the Parabolic SAR flips?
In our test, it did not clearly help. We tried waiting for the close and opening every new trade at the next candle's open. It did a little worse than the stop and reverse at the SAR on 15-minute, 1-hour and 4-hour charts, and a little better on daily charts. On 1-hour charts, for every $100 risked, it lost $3.59, compared with $3.07. In about half of the flips, the candle that reached the SAR closed back where it came from. Trading only the flips whose candle closed beyond the SAR opened about half as many trades on 1-hour, 4-hour and daily charts. The trades it kept were not clearly better than the ones it skipped. They did a little better on 15-minute and 1-hour charts, about the same on 4-hour charts, and worse on daily charts.
The strategy code we ran
This is the exact code from the BacktestingMax strategy engine. Paste it into the strategy editor in the app to run it on any market.
class ParabolicSarFlip(Strategy):
"""Parabolic SAR stop-and-reverse (J. Welles Wilder, 1978), plus the changes traders try.
The SAR is worked out on the candles of `chart` (in minutes: 60 = 1-hour candles) with
Wilder's rules, the same as the Parabolic SAR indicator in BacktestingMax:
- In an uptrend the SAR sits below the price. For each new candle it moves up by
AF x (EP - SAR). EP is the highest high of the trend so far. AF, the acceleration
factor, starts at af_start and grows by af_step each time the trend makes a new
high, up to af_max. The SAR never moves above the lows of the last two candles.
- When price falls below the SAR, the trend flips: the SAR jumps up to the EP (the
highest high of the uptrend), the EP becomes this candle's low and AF restarts.
- A downtrend is the mirror image.
Run it on a faster chart than `chart` (we used a 1-minute chart for every SAR chart:
chart = 15, 60, 240 or 1440), so that it can act in the middle of a SAR candle, like a
stop order at the SAR. On a chart as slow as `chart` itself, it can only act when a
candle closes.
Standard (all switches off): always in the market. The SAR is the stop of the open trade.
When price goes past it, close the trade at the next open of the fast chart, and open the
opposite trade once the old one has closed (one fast candle later). The new trade's stop
starts at the extreme of the trend that just ended (for a short: the highest high of the
uptrend, or this candle's high if that is higher) and from the next SAR candle on it
follows the SAR. Size: 1% of the account lost at that first stop.
The changes, one at a time:
wait_close = 1 open the new trade only when the SAR candle has closed, at the next
candle's open (the old trade still closes when price reaches the SAR)
close_beyond = 1 the same, but only if that candle closed beyond the SAR it touched
(below it for a sell, above it for a buy); if it closed back on the
old side, stay out until the next flip
af_start, af_step, af_max = 0.01, 0.01, 0.1 slower settings: the SAR moves more slowly
SAR candles that open on a Friday at 17:00 New York time or later are left out: the
markets in this test are closed then, but some index data has a few minutes of prices
after the close. Remove that rule for a market that trades at the weekend.
"""
params = {"chart": Param(type=int, default=60, min=1, max=1440),
"af_start": Param(type=float, default=0.02, min=0.001, max=1.0),
"af_step": Param(type=float, default=0.02, min=0.001, max=1.0),
"af_max": Param(type=float, default=0.2, min=0.01, max=1.0),
"wait_close": Param(type=int, default=0, min=0, max=1),
"close_beyond": Param(type=int, default=0, min=0, max=1)}
lookback = 5
def init(self, ctx):
name = {15: "M15", 30: "M30", 60: "H1", 240: "H4", 1440: "D1"}.get(ctx.params.chart)
if name is None or ctx.params.chart <= ctx.timeframe_minutes:
name = ctx.timeframe # no faster chart: the SAR candles are the chart's own
self.candles = ctx.tf(name)
self.af_rules = (ctx.params.af_start, ctx.params.af_step, ctx.params.af_max)
self.beyond = ctx.params.close_beyond == 1
self.wait = ctx.params.wait_close == 1 or self.beyond
self.ny = ctx.clock("America/New_York")
self.done = -1 # the last finished SAR candle already used
self.skip = set() # SAR candles to leave out (after the Friday close)
self.n = 0 # SAR candles used so far
self.up = None # the trend: True = up (SAR below the price)
self.sar = self.ep = self.af = None
self.next_sar = None # the SAR of the candle that is forming now
self.highs, self.lows = [], [] # the last two SAR candles used
self.cand_high = self.cand_low = None # the forming SAR candle so far
self.flipped = False # the trend already flipped during the forming candle
self.pending = None # "buy" / "sell": open this trade once the old one is gone
def on_bar(self, ctx):
view = self.candles
k = view.bar_index
# SAR candles that closed before this fast candle opened: use them first.
if k > self.done + 1 or (k > self.done and ctx.bar_time >= view.bar_time):
self.finish(k if ctx.bar_time >= view.bar_time else k - 1)
ny = self.ny
closed = ((ny.weekday == 4 and ny.hour >= 17) or ny.weekday == 5
or (ny.weekday == 6 and ny.hour < 17))
if closed:
self.skip.add(self.done + 1)
else:
self.watch(ctx)
# The SAR candle that this fast candle closed.
if k > self.done:
self.finish(k)
if ctx.position is None and self.pending is not None and not closed:
if not self.wait or not self.flipped:
self.open(ctx)
def watch(self, ctx):
"""Has price gone past the SAR of the forming candle?"""
h, l = ctx.high[0], ctx.low[0]
self.cand_high = h if self.cand_high is None else max(self.cand_high, h)
self.cand_low = l if self.cand_low is None else min(self.cand_low, l)
if self.next_sar is None or self.flipped:
return
if self.up and l < self.next_sar:
self.flip(ctx, "sell")
elif not self.up and h > self.next_sar:
self.flip(ctx, "buy")
def flip(self, ctx, side):
self.flipped, self.pending = True, side
pos = ctx.position
if pos is not None:
if pos.is_long == (side == "buy"):
self.pending = None # already in the new direction
else:
ctx.close_position() # fills at the next open of the fast chart
def open(self, ctx):
side, self.pending = self.pending, None
entry = ctx.close[0]
if self.flipped:
# Still inside the flip candle: the extreme of the trend that just ended (the EP),
# or this candle's own extreme so far if it went further.
stop = max(self.ep, self.cand_high) if side == "sell" else min(self.ep, self.cand_low)
else:
stop = self.next_sar # later: the SAR of the forming candle
if side == "buy":
if ctx.gate("sar_flipped_up", True) and ctx.gate("stop_below_price", stop < entry):
ctx.buy(size=ctx.size_by_risk_pct(0.01, stop=stop, entry=entry), sl=stop, tag="psar_long")
elif ctx.gate("sar_flipped_down", True) and ctx.gate("stop_above_price", stop > entry):
ctx.sell(size=ctx.size_by_risk_pct(0.01, stop=stop, entry=entry), sl=stop, tag="psar_short")
def finish(self, upto):
"""Add the SAR candles up to `upto` that have closed, and start a new forming candle."""
view = self.candles
for j in range(self.done + 1, upto + 1):
if j not in self.skip:
back = view.bar_index - j
if self.beyond and self.flipped and j == self.done + 1 and self.pending is not None:
# The flip candle has closed: keep the new trade only if it closed beyond
# the SAR it touched (still self.next_sar until add_candle below).
c = view.close[back]
if (c >= self.next_sar) if self.pending == "sell" else (c <= self.next_sar):
self.pending = None
self.add_candle(view.high[back], view.low[back])
self.done = upto
self.skip = {j for j in self.skip if j > upto}
self.flipped = False
self.cand_high = self.cand_low = None
def add_candle(self, h, l):
"""Wilder's Parabolic SAR, one closed candle at a time."""
p = self.af_rules # start, step, max
self.n += 1
if self.n == 2:
self.up = h > self.highs[-1]
self.ep, self.af = (h if self.up else l), p[0]
self.sar = self.lows[-1] if self.up else self.highs[-1]
elif self.n > 2:
sar = self.next_sar # the SAR this candle had
if self.up and l < sar: # the trend flips down
sar, self.up, self.ep, self.af = self.ep, False, l, p[0]
elif not self.up and h > sar: # the trend flips up
sar, self.up, self.ep, self.af = self.ep, True, h, p[0]
elif self.up and h > self.ep: # a new high: AF grows
self.ep, self.af = h, min(self.af + p[1], p[2])
elif not self.up and l < self.ep:
self.ep, self.af = l, min(self.af + p[1], p[2])
self.sar = sar
self.highs = (self.highs + [h])[-2:]
self.lows = (self.lows + [l])[-2:]
if self.n >= 2: # the SAR of the next candle
nxt = self.sar + self.af * (self.ep - self.sar)
self.next_sar = min(nxt, *self.lows) if self.up else max(nxt, *self.highs)
Your turn
Test the Parabolic SAR flip strategy yourself
Change the settings, the market or the stop-loss and see the result in seconds. Ask the BacktestingMax AI: Backtest the Parabolic SAR flip strategy (0.02, 0.02, 0.2) on gold, 4-hour chart: always in a trade, stop and reverse when price reaches the SAR, 1% risk per trade
.
Free account. No credit card needed.
See every strategy we tested Browse strategies shared by tradersBacktest on historical data with trading costs, run by BacktestingMax. Past results do not guarantee future results, and nothing here is financial advice. Updated 2 November 2026.