Tested by BacktestingMax
Turtle Soup strategy backtest
Does the Turtle Soup strategy work?
Mostly no. Linda Raschke's standard rules, which enter on the same day, lost money on 4 out of 6 markets. Her next-day version did better, but only a little. We backtested Turtle Soup on daily charts of 6 markets: EUR/USD, GBP/USD, USD/JPY, AUD/USD, gold and silver. The years were 2007 to 2025, after trading costs, at 1% risk per trade. Turtle Soup trades false breakouts. A false breakout is when price goes below a recent low, or above a recent high, and then turns back. When price makes a new 20-day low and turns back up, the strategy buys. It also sells short at new 20-day highs (sells first, to make money if price falls). R is the money a trade risked: 1% of the account just before it. In our backtest, the standard rules made money on 2 out of 6 markets: gold +74.4% and silver +7.2%. Their 1,133 trades won 16.8% of the time and lost 0.115R each on average. Turtle Soup Plus One, Raschke's own variant, enters on the next day. Its 599 trades won 32.9% of the time and made +0.057R on average. It made money on 4 out of 6 markets. On 3 US stock indices, from 2019 to 2025, the standard rules lost money on all 3.
6 backtests 2007–2025 Trading costs included Tested 23 November 2026
Where it worked 6 backtests- Made money
- 2 of 6 tests, with the standard rules
- Made money in both periods
- 1 2007–2018 and again 2019–2025
- Best backtest
- +74% Gold, daily chart: account growth 2007–2025
- Only with the 200-day trend
- 0 tests made money in both periods, compared with 1 with the standard rules
Made money in both periods
- Gold, daily
The results
Results on every market
Each box shows one backtest of the Turtle Soup with the standard rules, from 2007 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 2007–2018 and 2019–2025, or passed all four of our checks (see "How a test passes" further down).
| Market | daily |
|---|---|
| EUR/USD | −26% Lost money |
| GBP/USD | −46% Lost money |
| USD/JPY | −54% Lost money |
| AUD/USD | −50% Lost money |
| Gold | +74% Made money in both periods |
| Silver | +7% Made money overall, lost in one period |
All the numbers, test by test
| Market | Chart | Trades | Win rate | Profit factor | Result | Max drawdown | 2007–2018 | 2019–2025 | Monte Carlo drawdown | Trading costs |
|---|---|---|---|---|---|---|---|---|---|---|
| EUR/USD | daily | 190 | 17.9% | 0.81 | −25.7% | −37.4% | −23.1% | −3.3% | −47.3% | $480 |
| GBP/USD | daily | 215 | 12.1% | 0.73 | −45.6% | −62.0% | −10.9% | −38.9% | −62.4% | $742 |
| USD/JPY | daily | 182 | 14.8% | 0.48 | −54.0% | −54.0% | −35.0% | −29.3% | −61.2% | $425 |
| AUD/USD | daily | 214 | 12.6% | 0.65 | −49.9% | −55.2% | −25.9% | −32.3% | −66.6% | $687 |
| Gold | daily | 162 | 23.5% | 1.54 | +74.4% | −18.4% | +1.7% | +71.5% | −32.0% | $880 |
| Silver | daily | 170 | 22.4% | 1.05 | +7.2% | −25.6% | +22.3% | −12.3% | −41.9% | $2,307 |
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. 2007–2018 and 2019–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 6 backtests show
Most standard trades were stopped out early, and trading costs were not the reason. 77.0% of the 1,133 standard trades closed at the stop-loss, and 57.2% (648 out of 1,133) closed at the stop-loss on the day they opened. The median trade lasted 4.4 hours. On EUR/USD and gold trades in 2019–2025, the median stop-loss was 12.8 pips from the entry on EUR/USD and $4.37 on gold, about 18% of the average daily range. Trading costs took only 0.052R per trade on average, so the problem was being stopped out on the first day, not costs. The money came from trades that lasted: 261 trades reached the trailing stop or the 3-day exit, and they made +3.04R each on average, with 190 of them winning. Without its 5 best trades, every market, gold included, would have lost money.
Turtle Soup Plus One, Raschke's version that waits one day, doubled the win rate. Turtle Soup Plus One won 32.9% of its 599 trades, compared with 16.8% of the 1,133 standard trades. Its stop-loss was about 3 times further from the entry: the median was 39.0 pips on EUR/USD and $15.19 on gold, about 55% to 59% of the average daily range. Only 33.1% of its trades closed on the day they opened, compared with 57.2% of the standard trades. It made money on 4 out of 6 markets, and on 5 out of 6 in 2019–2025. Most gains were small. GBP/USD made +33.5% in our backtest, and no other market made more than +10.8%.
Gold was the only market where the standard rules made a lot, and almost all of it came in 2019–2025. Gold made +74.4% from 2007 to 2025: +71.5% in 2019–2025 and only +1.7% in 2007–2018. On gold, buys and sells both made money. The 61 buys made +37.5R and the 101 sells made +27.9R. Silver made +7.2%: +22.3% in 2007–2018 and −12.3% in 2019–2025. The 4 currency pairs all lost money, from −25.7% on EUR/USD to −54.0% on USD/JPY. Their max drawdown, the biggest fall from the highest balance, was 37.4% to 62.0%.
Buying after a new 20-day low lost much more than selling short after a new 20-day high. With the standard rules, the 545 buys lost 143.0R in total and the 588 sells made +12.7R. With Plus One, the 291 buys lost 0.35R and the 308 sells made +34.4R. In many of our other backtests, buys did better than sells. Here it was the other way round.
Same day or next day
Entering the next day doubled the win rate and moved the stop-loss further away
Standard is Raschke's same-day entry. Plus One enters on the next day. Each row adds up every trade on the 6 markets, 2007–2025, after trading costs. 'Won' is the share of trades that made money. 'Average trade' is the total result in R divided by the number of trades.
| Version | Trades | Won | Median stop-loss, share of the daily range | Closed the same day | Average trade | Markets that made money |
|---|---|---|---|---|---|---|
| Standard | 1,133 | 16.8% | 18% | 57.2% | −0.115R | 2 out of 6 |
| Plus One | 599 | 32.9% | 55–59% | 33.1% | +0.057R | 4 out of 6 |
The stop-loss distance is the median, as a share of the average daily range, measured on EUR/USD and gold trades in 2019–2025. For Plus One it was 55% on EUR/USD and 59% on gold; for the standard rules it was about 18% on both.
Stock indices
On stock indices, the standard rules lost money on all 3
A separate test of the standard rules, from 2019 to 2025, after trading costs. 'Won' is the share of trades that made money. 'Result' is how much the $10,000 account grew or shrank. The last two columns show the result in each half of the years.
| Market | Trades | Won | Result 2019–2025 | 2019–2022 | 2023–2025 |
|---|---|---|---|---|---|
| S&P 500 | 78 | 15.4% | −11.0% | +4.2% | −14.6% |
| Nasdaq 100 | 78 | 14.1% | −22.8% | −4.4% | −19.2% |
| Dow Jones | 84 | 10.7% | −35.8% | −15.6% | −24.0% |
In all, the 3 indices had 240 trades, 13.3% of them won, and they lost 74.9R. Each index had fewer than 100 trades. ICT traders use the name 'Turtle Soup' for a sweep of an old high or low on intraday charts, often on the Nasdaq (NQ). This test uses Raschke's daily rules, not ICT's.
Buys and sells
Buying after a new 20-day low lost money, and selling short after a new 20-day high made money
Each bar adds up the result of one kind of trade on the 6 markets, from 2007 to 2025, after trading costs. A buy is a trade after a new 20-day low. A sell is a trade after a new 20-day high.
- Standard, buys545 trades −143.0R
- Standard, sells588 trades +12.7R
- Plus One, buys291 trades −0.35R
- Plus One, sells308 trades +34.4R
The Plus One buys lost almost nothing in total: −0.35R over 291 trades.
The strategy
What the Turtle Soup is
Linda Raschke is a trader who co-wrote the book 'Street Smarts' with Laurence Connors in 1995. Turtle Soup is one of its strategies. The name comes from the Turtles, a famous group of breakout traders. A breakout is when price moves above the highest price, or below the lowest price, of a recent period. The Turtles bought when price broke above its 20-day high and sold short when it broke below its 20-day low. Raschke noticed that these breakouts often fail: price breaks the level, then falls back. Turtle Soup trades against them. When price makes a new 20-day low and then turns back up, it buys, expecting the breakdown to be false. When price makes a new 20-day high and then turns back down, it sells short. Raschke's rule also asks that the old low is at least 4 trading days old. Traders who follow ICT (Inner Circle Trader) often use the name 'Turtle Soup' for something different. They mean a sweep: price runs past an old high or low on an intraday chart and then reverses. They often use it on the Nasdaq (NQ). We test Raschke's daily rules, not the ICT version. Our stock index test below uses the same daily rules on the indices.
- Markets
- EUR/USD, GBP/USD, USD/JPY, AUD/USD, gold and silver. Each market is a separate backtest with its own account.
- Charts
- Daily setups; orders worked on 15-minute candles. The 20-day levels and the ATR come from daily candles. But a stop order can only be placed after price has traded below the old low during the day, so the backtest works the orders on 15-minute candles.
- Years
- 2007 to 2025. We call 2007–2018 the older years and 2019–2025 the newer years. A trade counts in the period in which it closed.
- Account and risk
- A $10,000 account on each market. Every trade is sized so that a loss at the stop-loss costs 1% of the account just before the trade. The % results are the change in that account.
- Trade size
- Our backtest account can hold trades worth up to 30 times its balance (leverage). The stop-losses were often close to the entry, so a 1% risk sometimes needed a trade bigger than 30 times the balance. Then the trade was made smaller, and it risked less than 1%. This happened to 14 out of 1,133 standard trades and 2 out of 599 Plus One trades.
- Exits
- The stop-loss just below today's low, then from the next day a trailing stop just below the previous day's low, or a close at the start of day 4. The backtest cannot move a stop order, so it checks the trailing stop and closes the trade at the open of the next 15-minute candle. In the version with a take-profit, the take-profit is a limit order (an order that waits at a set price). It pays no spread and fills only when price trades through it.
- Trading costs
- The only cost is the spread: the gap between the buy price and the sell price. There is no commission. On the currency pairs 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. A pip is 0.0001, or 0.01 on USD/JPY. The spread is $0.30 an ounce on gold and $0.020 on silver. The silver spread is wider than our backtest engine's own, to match a retail broker. In the separate index test, the spread is 0.4 points on the S&P 500, 1.5 on the Nasdaq 100 and 2.0 on the Dow Jones. The entry is a stop order, and in our backtest engine a stop order pays no spread. A trade that closes at the stop-loss, the trailing stop or the 3-day exit pays half the spread. No slippage is added: a stop fills at its price, unless price jumps past it. With the standard rules, trading costs took 0.052R per trade on average, and silver paid the most, 0.122R. With Turtle Soup Plus One, they took 0.020R per trade.
- Price gaps
- A stop-loss does not protect against a gap, a jump in price between two candles. With the standard rules, 8 out of 1,133 trades lost more than 1.5R, and 5 of them were held over a weekend. The market reopened on Sunday beyond the stop-loss. With Plus One, 4 out of 599 trades lost more than 1.5R, and all of them were filled when the market reopened far beyond the order's level. The worst Plus One trade lost 6.0R: AUD/USD in October 2011. Its order was 7.6 pips from the stop-loss, and the market opened 37 pips past the order.
- Overnight fees
- Not included. Brokers charge (or sometimes pay) a fee for each night a trade stays open. A trade can stay open until the start of day 4. The median standard trade lasted 4.4 hours, and the median Plus One trade 40.2 hours.
- 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. The strategy skips any candle that opens on a Friday at 17:00 New York time or later, and any day with no price change (a market holiday). Our gold prices on 3 April 2015 and silver prices on 1 June 2023 have wrong prices for some minutes. No gold trade opened on 3 April 2015 and no silver trade on 1 June 2023. We left out the DAX and the FTSE 100. Our data for them has wrong prices at quiet evening times. One wrong low can make a false 20-day break, exactly what this strategy trades. We did not test crypto: our backtest engine charges Bitcoin a fixed amount per trade that is far too big in the early years.
- Index test
- A separate test of the standard rules only, on the S&P 500, Nasdaq 100 and Dow Jones, from 2019 to 2025. In this test, the two periods are 2019–2022 and 2023–2025. We do not use index data before 2019: our index data before mid-2018 has hours with no price change on short charts, and the entries need 15-minute candles.
The rules we tested
- Each day, find the old low: the lowest low of the previous 20 days. It counts only if it was made at least 4 trading days before today. Days run from 17:00 to 17:00 New York time, like a daily candle. The strategy needs 20 finished days before its first trade.
- When price trades below the old low today (a new 20-day low), place a buy stop order just above the old low. A stop order opens the trade only when price reaches its level. The order sits 5% of the average daily range above the old low. The average daily range is the ATR (average true range) of the last 20 days. Raschke wrote 5 to 10 ticks, the smallest price steps of a futures contract.
- Put the stop-loss, the price where a losing trade closes, just below today's low: one hundredth of the ATR below it. Raschke wrote 1 tick. While today's low keeps falling before the order fills, place the order again with the lower stop-loss and a new size. If price is already back above the entry level when the order would be placed, skip that day. The order lasts until the end of the day.
- Size every trade so that a loss at the stop-loss costs 1% of the account.
- Exit at the stop-loss. From the next day, a trailing stop (a stop-loss that follows the trade) sits just below the previous day's low. It only moves up. If a trade is still open after 3 days, close it at the start of day 4.
- Sells work the other way round: when price trades above the old 20-day high (made at least 4 trading days ago), sell short with a stop order 5% of the ATR below it, and put the stop-loss just above today's high. One trade is open at a time. If a buy and a sell are both possible on one day, the one that triggers first is used.
The method
How we tested it
The test
- Markets
- EUR/USD, GBP/USD, USD/JPY, AUD/USD, Gold and Silver
- Charts
- daily candles
- Dates
- January 2007 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 2007 to 2018 and again from 2019 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 2019 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 Turtle Soup be improved?
We tried 4 changes to the standard rules, one at a time, on the same 6 markets. In the table, each change is one version. One changes the entry: Plus One. One is a filter: only trade with the 200-day trend. One adds a take-profit at 2R. One drops the 4-day rule. If you pick the best change and judge it on the same years you used to pick it, it almost always looks better than it really is. So we picked the best change using 2007–2018 only: the change that made money on the most markets. Then we checked it on 2019–2025, the years we did not use to pick it. Tests with fewer than 100 trades count when we pick the best change, but not in 'Made money in both periods' or 'Passed all four checks'.
| Version | Made money 2007–2018years used to pick the best version | Made money 2019–2025years not used to pick it | Made money in both periods | Passed all four checks |
|---|---|---|---|---|
| Standard: enter the same day Raschke's rules as written above, with nothing changed. | 2 of 6middle test −17.0% | 1 of 6middle test −20.8% | 1 | 0 |
| Turtle Soup Plus One: enter the next day Raschke's own variant. Day 1 makes a new 20-day low (the old low is at least 4 days old) and closes at or below the old low. On day 2 only, place a buy stop order at the old low itself. The stop-loss is just below the lower of day 1's low and day 2's low. The exits stay the same. Sells work the other way round, at a new 20-day high. | 3 of 6middle test −2.2% | 5 of 6middle test +6.8% | 1 | 1 |
| Only with the 200-day trendBest on 2007–2018 Only buy when the last daily close is above the 200-day simple moving average (the average of the last 200 daily closes). Only sell short when it is below. The entry and the exits stay the same. | 5 of 6middle test +3.5% | 2 of 6middle test −10.8% | 0 | 0 |
| Take profit at 2R Add a take-profit at 2R from the entry: twice as far from the entry as the stop-loss. It is a limit order, so it fills only when price trades through it. The other exits stay. | 1 of 6middle test −10.5% | 1 of 6middle test −4.8% | 0 | 0 |
| Without the 4-day rule The old 20-day low can have been made any number of days earlier, not only 4 or more. Everything else stays the same. | 2 of 6middle test −45.5% | 2 of 6middle test −13.7% | 1 | 0 |
The 200-day trend filter looked best on 2007–2018, the years we used to pick. In those years, 5 out of 6 markets made money with it, compared with 2 out of 6 with the standard rules. But it did not hold up. In 2019–2025, only 2 out of 6 made money with it (EUR/USD +5.7% and gold +3.4%), and over 2007–2025 only 1 out of 6 did (gold, +14.8%). It also made only 410 trades, compared with 1,133. Turtle Soup Plus One did better on the newer years. It made money on 5 out of 6 markets in 2019–2025, compared with 1 out of 6 with the standard rules, and on 4 out of 6 over 2007–2025. GBP/USD and USD/JPY made money in both periods, and GBP/USD also passed all four of our checks. USD/JPY had only 95 trades, so the table above does not count it. Plus One made money on only 3 out of 6 markets in 2007–2018, and 3 of its 6 markets had fewer than 100 trades. So it looks better than the standard rules, but we cannot call it proven. The 2R take-profit did not help. 2 out of 6 markets made money (gold +0.8% and silver +3.0%). Gold fell from +74.4% to +0.8%, because the take-profit cut off the big winners. Its 1,137 trades (a few more, because some trades closed sooner) lost 100.6R in total, compared with 130.2R for the standard rules. Dropping the 4-day rule gave about 4 times as many trades (4,723). It lost less per trade (−0.019R, compared with −0.115R), and 2 out of 6 markets made money. But the max drawdowns grew to 56.4% to 89.5%. So in this test, the 4-day rule mainly cut the number of trades. It did not make the average trade better.
Questions
Questions traders ask
What is the Turtle Soup strategy?
Turtle Soup is a strategy from the 1995 book 'Street Smarts', by Linda Raschke and Laurence Connors. It trades against breakouts that fail. Price makes a new 20-day low, the lowest price of the last 20 days. If the old low was made at least 4 trading days ago, the strategy places a buy stop order a little above the old low. If price turns back up and fills the order, the stop-loss sits just below the day's low. It sells short the same way at a new 20-day high. A trade closes at the stop-loss, at a trailing stop, or after 3 days. In our backtest on 6 markets, from 2007 to 2025, the standard rules made money on 2 out of 6 markets and lost 0.115R per trade on average.
What is Turtle Soup Plus One?
Turtle Soup Plus One is Raschke's own variant, and it waits one day. Day 1 makes a new 20-day low (the old low is at least 4 days old) and closes at or below the old low. On day 2 only, you place a buy stop order at the old low, with the stop-loss just below the lower of the two days' lows. Sells work the other way round, at a new 20-day high. In our backtest, Plus One won 32.9% of its 599 trades, compared with 16.8% of the standard 1,133 trades. It made +0.057R per trade, compared with −0.115R. It made money on 4 out of 6 markets, and on 5 out of 6 in 2019–2025. But it made money on only 3 out of 6 in 2007–2018, and 3 of its 6 markets had fewer than 100 trades.
Is ICT Turtle Soup the same as Raschke's?
No. ICT traders use the name 'Turtle Soup' for a sweep of an old high or low on an intraday chart, often on the Nasdaq (NQ). Raschke's rules use daily charts and 20-day highs and lows. We tested only Raschke's daily rules, on 3 stock indices from 2019 to 2025. In our backtest, they lost money on all 3: the S&P 500 −11.0%, the Nasdaq 100 −22.8% and the Dow Jones −35.8%. The 240 trades won 13.3% of the time and lost 74.9R in total. This test does not tell you whether the ICT version works.
What is the win rate of Turtle Soup?
In our backtest, the standard rules won 16.8% of 1,133 trades, after trading costs. By market it went from 12.1% on GBP/USD to 23.5% on gold. Turtle Soup Plus One won 32.9% of 599 trades. Most standard trades (77.0%) closed at the stop-loss, and 57.2% of all standard trades closed there on the day they opened. That is the main reason the win rate is low. A low win rate can still make money, if the wins are big. The 261 standard trades that reached the trailing stop or the 3-day exit made +3.04R each on average. But the standard rules still lost 0.115R per trade on average.
Keep exploring
Related strategies we tested
Chart patterns Wyckoff spring backtest Made money in 2 of 30 tests, 0 of them in both periods. Best: Dow Jones, 15-minute, +131% Turtle trading Turtle Trading System 1 (20/10) backtest Made money in 7 of 10 tests, 4 of them in both periods. Best: Silver, daily, +29% Donchian Channels Donchian channel breakout strategy backtest Made money in 9 of 30 tests, 5 of them in both periods. Best: USD/JPY, 1-hour, +102%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 TurtleSoup(Strategy):
"""Turtle Soup (Linda Raschke, "Street Smarts"): buy the false breakdown of a 20-day low,
sell the false breakout of a 20-day high. The setup is on daily candles, the entry is a stop
order that can only be placed once price has already traded beyond the old extreme during
the same day, so the strategy runs on 15-minute candles and builds its own daily candles.
Raschke's rule: "When price makes a new 20-day low and the previous 20-day low was made at
least 4 sessions earlier, buy on a stop 5-10 ticks above that previous low; stop 1 tick
below today's low; trail and hold 1-3 days." Shorts are the mirror at 20-day highs.
The trading day runs from 17:00 New York to 17:00 New York, like a daily candle. Candles
after Friday 17:00 until Sunday 17:00 (the weekend) are ignored for the daily candles. A
finished day with no price movement (high = low, a holiday) is not a day. ATR is the simple
average of the true range of the last 20 finished days (true range uses the day before's
close). A tick is 1% of that ATR and the "5-10 ticks" buffer is 5% of it.
Standard (all switches off), buys (sells mirror them):
Setup at the start of each day, L = the lowest low of the last 20 finished days, and
j = how many days ago it was made (1 = yesterday; if it was made twice, the
latest). The setup counts only when j is 4 or more. It needs 20 finished days.
Arm the day is armed for a buy once a 15-minute candle trades below L.
Entry a stop order to buy at L + 0.05 ATR, with a stop-loss at today's lowest low so
far - 0.01 ATR. Today's low can keep falling before the order fills, so at
each new candle the resting order is cancelled and placed again with the new
stop-loss and size. If the candle that armed the day already closed above the
entry level, the day is skipped (a stop order below the price would fill at
once, like a market order). The order is for that day only: it is cancelled on
the last candle before 17:00 New York. One trade per side per day, one trade
at a time.
Size 1% of the account lost at the stop-loss, from the entry level. When that is
less than the smallest trade size the market allows, the trade is skipped.
Exits the stop-loss, or a trailing level: at each new day after the entry day, the
low of the day just finished - 0.01 ATR, if higher than the level before (it
starts at the stop-loss). The engine can't move a stop, so when a candle's
low reaches the trailing level the trade closes at the next candle's open.
A trade still open when the 4th day after the entry day starts (the entry day
is day 0, so after day 3) also closes at the open of the next candle.
If a buy and a sell setup are both possible on one day, the one that arms first is used.
The changes, one at a time:
plus_one = 1 Turtle Soup Plus One (Raschke's own variant) instead of the same-day
entry. Day 1 trades below L (an old low made 4 or more days before)
and CLOSES at or below L. On the next day only, a stop order to buy at
L itself (no buffer), placed at the end of day 1, with the stop-loss
0.01 ATR below the lower of day 1's low and day 2's low so far (placed
again while day 2's low falls). Same size and exits (day 2 is the
entry day).
trend_filter = 1 only buy when the last finished day's close is above the 200-day
simple average of daily closes, only sell short when it is below. No
trades until 200 days exist.
target_2r = 1 add a take-profit 2R from the entry level (R = entry level - the
stop-loss). It fills only when price trades through it. The other
exits stay.
any_age = 1 drop the 4-day rule: the old 20-day low can have been made any number
of days earlier (1 or more).
"""
params = {"days": Param(type=int, default=20, min=5, max=60),
"min_age": Param(type=int, default=4, min=1, max=30),
"buffer_atr": Param(type=float, default=0.05, min=0.0, max=1.0),
"tick_atr": Param(type=float, default=0.01, min=0.0, max=0.5),
"hold_days": Param(type=int, default=3, min=1, max=20),
"trend_days": Param(type=int, default=200, min=20, max=250),
"plus_one": Param(type=int, default=0, min=0, max=1),
"trend_filter": Param(type=int, default=0, min=0, max=1),
"target_2r": Param(type=int, default=0, min=0, max=1),
"any_age": Param(type=int, default=0, min=0, max=1)}
lookback = 5
def init(self, ctx):
self.ny = ctx.clock("America/New_York")
p = ctx.params
self.n, self.min_age = p.days, p.min_age
self.buf, self.tick = p.buffer_atr, p.tick_atr
self.hold, self.trend_days = p.hold_days, p.trend_days
self.plus_one, self.trend_filter = p.plus_one, p.trend_filter
self.target_2r, self.any_age = p.target_2r, p.any_age
self.keep = max(self.trend_days, self.n) + 10
self.highs, self.lows, self.closes = [], [], [] # finished counted days, oldest first
self.trs = [] # true range of the last 20 finished days
self.n_days = 0 # finished counted days so far
self.atr = None
self.key = None # the day in progress (17:00 to 17:00 New York)
self.d_text, self.d_num = None, 0
self.cur_hi, self.cur_lo, self.cur_close = -1e18, 1e18, 0.0
self.fin_hi = self.fin_lo = self.fin_close = None # the day that just finished
self.ready = False # the day's levels exist
self.L = self.H = None # lowest low / highest high of the last 20 finished days
self.L_age = self.H_age = 0
self.dead = {1: False, -1: False} # this side was looked at today
self.done = {1: False, -1: False} # this side traded today
self.armed = None # the resting entry order: side, level, prior, order, sl, tick, for_n
self.trade = None # our open trade: side, entry_n, level, init, trailed
self.closing = False
self.p1_key = None # the day whose Plus One setup was checked at its last candle
self.p1_fallback = False
# ---- days ----------------------------------------------------------------------------------
def civil_days(self, y, m, d):
"""Days since 1970-01-01 (a Thursday) of a calendar date."""
if m <= 2:
y -= 1
era = y // 400
yoe = y - era * 400
doy = (153 * ((m + 9) % 12) + 2) // 5 + d - 1
return era * 146097 + yoe * 365 + yoe // 4 - yoe // 100 + doy - 719468
def roll(self, ctx, key):
"""The first counted candle of a new day: finish the old day, set today's levels."""
counted = False
old_key = self.key
if old_key is not None and self.cur_hi > self.cur_lo:
hi, lo, cl = self.cur_hi, self.cur_lo, self.cur_close
if self.closes:
pc = self.closes[-1]
self.trs.append(max(hi - lo, abs(hi - pc), abs(lo - pc)))
if len(self.trs) > 20:
self.trs.pop(0)
self.highs.append(hi)
self.lows.append(lo)
self.closes.append(cl)
if len(self.closes) > self.keep:
self.highs.pop(0)
self.lows.pop(0)
self.closes.pop(0)
self.n_days += 1
self.fin_hi, self.fin_lo, self.fin_close = hi, lo, cl
counted = True
self.key = key
self.cur_hi, self.cur_lo = -1e18, 1e18
self.atr = sum(self.trs) / 20.0 if len(self.trs) >= 20 else None
self.dead = {1: False, -1: False}
self.done = {1: False, -1: False}
a = self.armed
if a is not None and a["for_n"] != self.n_days: # an order from an earlier day
self.cancel_armed(ctx)
self.ready = False
if not self.plus_one and self.atr is not None and len(self.lows) >= self.n:
self.L, self.L_age = self.extreme(self.lows[-self.n:], True)
self.H, self.H_age = self.extreme(self.highs[-self.n:], False)
self.ready = True
# Plus One, a late check: the last candle of the old day never came, so no order was
# placed at its end.
self.p1_fallback = (self.plus_one == 1 and counted and old_key != self.p1_key)
return counted
def extreme(self, window, is_low):
"""(the lowest low or highest high of the window, how many days ago it was made)."""
v = min(window) if is_low else max(window)
i = len(window) - 1
while window[i] != v:
i -= 1
return v, len(window) - i
def trend_ok(self, side, closes, extra=None):
seq = closes + [extra] if extra is not None else closes
td = self.trend_days
if len(seq) < td:
return False
sma = sum(seq[-td:]) / td
return seq[-1] > sma if side == 1 else seq[-1] < sma
# ---- the bar -------------------------------------------------------------------------------
def on_bar(self, ctx):
ny = self.ny
d = ny.date
if d != self.d_text:
self.d_text = str(d)
self.d_num = self.civil_days(d.year, d.month, d.day)
key = self.d_num + (1 if ny.hour >= 17 else 0)
if (key + 3) % 7 >= 5:
return # Friday 17:00 to Sunday 17:00 New York: not part of any day
h, l, c = ctx.high[0], ctx.low[0], ctx.close[0]
counted = False
rolled = key != self.key
if rolled:
counted = self.roll(ctx, key)
if h > self.cur_hi:
self.cur_hi = h
if l < self.cur_lo:
self.cur_lo = l
self.cur_close = c
mod = ny.minute_of_day
last_bar = mod < 1020 and mod + ctx.timeframe_minutes >= 1020 # the last candle before 17:00
pos = ctx.position
if pos is not None:
if self.trade is None:
self.open_trade(pos)
self.manage(ctx, pos, h, l, counted)
return
self.trade, self.closing = None, False
a = self.armed
if a is not None and a["order"] is not None and a["order"].fill_price is not None:
self.done[a["side"]] = True # it filled and was stopped out inside one candle
self.armed = None
if self.armed is not None:
if last_bar:
self.cancel_armed(ctx) # an order is for its day only
else:
self.refresh(ctx)
if self.armed is not None:
return
if self.plus_one == 1:
if last_bar:
self.plus_one_setup(ctx, self.cur_hi, self.cur_lo, c, self.lows, self.highs, self.closes,
self.n_days + 1, self.atr_with(self.cur_hi, self.cur_lo), early=True)
self.p1_key = key
elif self.p1_fallback and rolled:
self.p1_fallback = False
if self.n_days >= 1 and self.fin_hi is not None:
self.plus_one_setup(ctx, self.fin_hi, self.fin_lo, self.fin_close, self.lows[:-1],
self.highs[:-1], self.closes[:-1], self.n_days, self.atr, early=False)
elif not last_bar:
self.check_arm(ctx, h, l, c)
def atr_with(self, hi, lo):
"""The ATR the next day will have once the day in progress (hi, lo) finishes."""
if len(self.trs) < 19 or not self.closes:
return None
pc = self.closes[-1]
tr = max(hi - lo, abs(hi - pc), abs(lo - pc))
return (sum(self.trs[-19:]) + tr) / 20.0
# ---- entries -------------------------------------------------------------------------------
def check_arm(self, ctx, h, l, c):
"""Standard Turtle Soup: arm on the first candle that trades beyond the old extreme."""
if not self.ready:
return
for side in (1, -1):
if self.dead[side] or self.done[side]:
continue
level_old = self.L if side == 1 else self.H
broke = l < level_old if side == 1 else h > level_old
if not broke:
continue
self.dead[side] = True # one look per side per day
age = self.L_age if side == 1 else self.H_age
if not ctx.gate("setup_age_ok", self.any_age == 1 or age >= self.min_age):
continue
if self.trend_filter == 1 and not ctx.gate("trend_ok", self.trend_ok(side, self.closes)):
continue
tick = self.tick * self.atr
level = level_old + side * self.buf * self.atr
if not ctx.gate("not_already_past_entry", c < level if side == 1 else c > level):
continue
extreme = self.cur_lo if side == 1 else self.cur_hi
sl = extreme - side * tick
size = ctx.size_by_risk_pct(0.01, stop=sl, entry=level)
if not ctx.gate("size_fits", size > 0):
continue
order = self.send(ctx, side, level, sl, size, "soup")
if order is not None:
self.armed = {"side": side, "level": level, "prior": None, "order": order, "sl": sl,
"tick": tick, "for_n": self.n_days}
return
def plus_one_setup(self, ctx, hi, lo, cl, lows, highs, closes, for_n, atr, early):
"""Plus One: day 1 (hi, lo, cl) traded beyond the old 20-day extreme and closed beyond it
too; place the stop order at the old extreme for the next day. early = placed on the
last candle of day 1; otherwise on the first candle of day 2."""
n = self.n
if atr is None or len(lows) < n:
return
for side in (1, -1):
level, age = self.extreme(lows[-n:] if side == 1 else highs[-n:], side == 1)
if not (lo < level if side == 1 else hi > level):
continue
if not ctx.gate("setup_age_ok", self.any_age == 1 or age >= self.min_age):
continue
if not ctx.gate("closes_beyond_level", cl <= level if side == 1 else cl >= level):
continue
if self.trend_filter == 1 and not ctx.gate(
"trend_ok", self.trend_ok(side, closes, cl) if early else self.trend_ok(side, closes + [cl])):
continue
tick = self.tick * atr
prior = lo if side == 1 else hi
extreme = prior
if not early: # day 2 has started: its range so far counts too
extreme = min(prior, self.cur_lo) if side == 1 else max(prior, self.cur_hi)
price = ctx.close[0]
if not ctx.gate("not_already_past_entry", price < level if side == 1 else price > level):
return
sl = extreme - side * tick
size = ctx.size_by_risk_pct(0.01, stop=sl, entry=level)
if not ctx.gate("size_fits", size > 0):
return
order = self.send(ctx, side, level, sl, size, "plus1")
if order is not None:
self.armed = {"side": side, "level": level, "prior": prior, "order": order, "sl": sl,
"tick": tick, "for_n": for_n}
return
def send(self, ctx, side, level, sl, size, name):
tag = name + ("_long" if side == 1 else "_short")
kw = {"tp_r": 2} if self.target_2r == 1 else {}
if side == 1:
return ctx.buy(size=size, stop=level, sl=sl, tag=tag, **kw)
return ctx.sell(size=size, stop=level, sl=sl, tag=tag, **kw)
def refresh(self, ctx):
"""Today's extreme may have moved: place the resting order again with the new stop-loss and size."""
a = self.armed
side = a["side"]
extreme = self.cur_lo if side == 1 else self.cur_hi
if a["prior"] is not None:
extreme = min(extreme, a["prior"]) if side == 1 else max(extreme, a["prior"])
sl = extreme - side * a["tick"]
if sl == a["sl"]:
return
size = ctx.size_by_risk_pct(0.01, stop=sl, entry=a["level"])
self.cancel_armed(ctx)
self.dead[side] = True
if size <= 0:
return
order = self.send(ctx, side, a["level"], sl, size, "plus1" if a["prior"] is not None else "soup")
if order is not None:
a["order"], a["sl"] = order, sl
self.armed = a
def cancel_armed(self, ctx):
a = self.armed
if a is not None and a["order"] is not None:
ctx.cancel_order(a["order"].order_id)
self.armed = None
# ---- the open trade ------------------------------------------------------------------------
def open_trade(self, pos):
side = 1 if pos.is_long else -1
self.trade = {"side": side, "entry_n": self.n_days, "level": pos.sl_price, "init": pos.sl_price,
"trailed": False}
self.done[side] = True
self.armed = None
def manage(self, ctx, pos, h, l, counted):
"""Trail the level from each finished day's low (high), and close after the hold time."""
t = self.trade
if self.closing:
return
side = t["side"]
if counted:
k = self.n_days - t["entry_n"]
if k > self.hold:
ctx.gate("exit_time", True)
ctx.close_position(pos.position_id)
self.closing = True
return
if k >= 1 and self.atr is not None:
tick = self.tick * self.atr
new = self.fin_lo - tick if side == 1 else self.fin_hi + tick
if (new - t["level"]) * side > 0:
t["level"], t["trailed"] = new, True
if t["trailed"] and (l <= t["level"] if side == 1 else h >= t["level"]):
ctx.gate("exit_trail", True)
ctx.close_position(pos.position_id)
self.closing = True
Your turn
Test the Turtle Soup yourself
Change the settings, the market or the stop-loss and see the result in seconds. Ask the BacktestingMax AI: Backtest Turtle Soup Plus One on GBP/USD, daily chart, from 2007 to 2025: when a day makes a new 20-day low (an old low at least 4 days old) and closes at or below it, buy with a stop order at the old low the next day, with the stop-loss just below the lower of the two days' lows, exit at a trailing stop below the previous day's low or after 3 days, and risk 1% 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 23 November 2026.