Previous day high and low breakout strategy
On ES futures, the previous day high and low breakout lost $99,527 after costs and ran a $100,000 account down to its margin on March 19, 2026. The run stops there.
BreakoutIntraday1-minute barsBacktested Nov 6, 2026
Previous day high and low breakout backtest, the result
Contract
E-mini S&P 500
-
−$99.5K
Net after costs
After $62,739 in fees and slippage
-
3 of 11
Years that made money
January 2016 to March 2026
-
−$101K
Largest drawdown
Peak to trough, 1 contract
-
−$45
Average trade
2,198 trades
Net after costs by month, January 2016 to March 2026.
Previous day high and low breakout rules
Buy a close above the prior day's high or sell a close below its low, with the prior day's midpoint as the stop.
A drawing of the rules on a made-up day, not a result.
- The levels are the prior day session's high and low, 9:30 to 16:00 New York.
- In the day session, the first one-minute close above the prior high buys and the first below the prior low sells short, once a day, until 15:00.
- The stop is the prior day's midpoint.
- Whatever is still open is closed at 15:45 New York.
- Decides on
- 1-minute bars
- Holds
- Nothing overnight
- Parameters
- open minute 570, close minute 960, last entry 900, exit minute 945
Results by year
It made money in 3 of 11 years on ES. Its best year was 2018, +$12,983, and its worst 2025, −$52,317. The account was closed out on March 19, 2026, so the years stop there.
| Year | Net | Trades | Win rate | Drawdown | Buy and hold |
|---|---|---|---|---|---|
| 2016 | −$7,957 | 214 | 46% | −$15,057 | +$11,497 |
| 2017 | −$9,033 | 195 | 42% | −$9,874 | +$21,936 |
| 2018 | +$12,983 | 211 | 49% | −$13,282 | −$8,589 |
| 2019 | −$8,228 | 214 | 46% | −$12,409 | +$35,436 |
| 2020 | −$28,281 | 221 | 46% | −$32,813 | +$27,761 |
| 2021 | +$12,960 | 215 | 52% | −$10,256 | +$51,361 |
| 2022 | −$1,984 | 226 | 49% | −$30,547 | −$45,939 |
| 2023 | +$3,423 | 218 | 45% | −$16,724 | +$38,435 |
| 2024 | −$8,860 | 211 | 43% | −$29,123 | +$42,947 |
| 2025 | −$52,317 | 225 | 43% | −$61,506 | +$37,010 |
| 2026, Jan to Mar | −$12,232 | 48 | 35% | −$15,741 | +$24,355 |
Previous day high and low breakout backtest results
On ES it lost $36,788 before costs, then paid $62,739 in fees and slippage.
- Net = before costs − fees − slippage
- ES: −$36,788 − $7,789 − $54,950 = −$99,527
The interval holds zero: this test cannot tell the average trade from no edge.
Previous day high and low breakout code and Pine Script
The strategy as the backtest ran it, and the Pine Script our compiler wrote from it for TradingView.
1from atlantive import BUY, NEW_YORK, SELL, Bars, Session, Strategy2 3 4class PreviousDayBreakout(Strategy):5 """Previous day high and low breakout, New York day session.6 7 The levels are the prior day session's high and low, 9:30 to 16:00 New York. In the day8 session, the first one-minute close above the prior high buys and the first below the prior low9 sells short, once a day, until 15:00. The stop is the prior day's midpoint, tested on every10 one-second close; whatever is still open at 15:45 is closed. The clock is one-second bars; the11 minute closes are built from them.12 """13 14 data = "bars"15 16 class Params:17 open_minute: int = 57018 close_minute: int = 96019 last_entry: int = 90020 exit_minute: int = 94521 clip: int = 122 23 class State:24 clock: Session(zone=NEW_YORK)25 bars: Bars(interval_ns=1_000_000_000)26 day_high: float27 day_low: float28 session_day: int29 prior_high: float30 prior_low: float31 mid: float32 prior_day: int33 minute_key: int34 minute_of: int35 minute_day: int36 minute_close: float37 traded_day: int38 39 def on_event(self, view, ev, orders):40 self.clock.update(ev)41 if not self.bars.update(ev):42 return43 minute = self.clock.prev_minute44 second = self.clock.prev_second45 day = self.clock.prev_day46 high = float(self.bars.prev_high)47 low = float(self.bars.prev_low)48 close = float(self.bars.prev_close)49 late = second + 1 >= self.p.exit_minute * 60 or day != self.traded_day50 if view.position > 0:51 if close <= self.mid or late:52 orders.ioc(side=SELL, qty=self.p.clip)53 elif view.position < 0:54 if close >= self.mid or late:55 orders.ioc(side=BUY, qty=self.p.clip)56 key = day * 1440 + minute57 if key != self.minute_key:58 # The minute minute_of closed with minute_close: judge the breakout on it.59 m = self.minute_of60 in_window = m >= self.p.open_minute and m < self.p.last_entry61 if self.minute_key != 0 and in_window and view.position == 0:62 if self.prior_day == self.minute_day and self.traded_day != self.minute_day:63 if self.minute_close > self.prior_high:64 orders.ioc(side=BUY, qty=self.p.clip)65 self.traded_day = self.minute_day66 elif self.minute_close < self.prior_low:67 orders.ioc(side=SELL, qty=self.p.clip)68 self.traded_day = self.minute_day69 self.minute_key = key70 self.minute_of = minute71 self.minute_day = day72 self.minute_close = close73 if minute >= self.p.open_minute and minute < self.p.close_minute:74 if self.session_day != day:75 if self.session_day != 0:76 self.prior_high = self.day_high77 self.prior_low = self.day_low78 self.mid = (self.day_high + self.day_low) / 2.079 self.prior_day = day80 self.session_day = day81 self.day_high = high82 self.day_low = low83 else:84 self.day_high = max(self.day_high, high)85 self.day_low = min(self.day_low, low) 1//@version=62// PreviousDayBreakout, exported from Atlantive.3// Chart simulation: decisions use completed bars; market orders fill at the next bar open.4// Native fills, fees, data gaps and session boundaries can differ. Re-test on the target symbol.5// Use standard time-based candles and the strategy's timeframe, not synthetic chart prices.6// Pine v6 trims old trade records at its order limit; the strategy keeps calculating.7// Margin is explicitly disabled to retain the native signal simulation's sizing.8strategy("PreviousDayBreakout", overlay=true, initial_capital=100000.0, commission_type=strategy.commission.cash_per_contract, commission_value=1.68, default_qty_type=strategy.fixed, default_qty_value=1, calc_on_every_tick=false, process_orders_on_close=false, slippage=0, margin_long=0, margin_short=0)9 10if timeframe.in_seconds() != 111 runtime.error("PreviousDayBreakout was exported for the 1 second timeframe; set the chart to 1S.")12 13open_minute = input.int(570, "open_minute", minval=-9007199254740991, maxval=9007199254740991)14close_minute = input.int(960, "close_minute", minval=-9007199254740991, maxval=9007199254740991)15last_entry = input.int(900, "last_entry", minval=-9007199254740991, maxval=9007199254740991)16exit_minute = input.int(945, "exit_minute", minval=-9007199254740991, maxval=9007199254740991)17clip = input.int(1, "clip", minval=-9007199254740991, maxval=9007199254740991)18 19_q_safe_int(x) =>20 if math.abs(x) > 900719925474099121 runtime.error("an integer left the exact chart range; this run cannot be compared faithfully")22 int(x)23_q_int(x) => _q_safe_int(x < 0 ? math.ceil(x) : math.floor(x))24_q_iadd(a, b) => _q_safe_int(a + b)25_q_imul(a, b) =>26 if a != 0 and math.abs(b) > 9007199254740991 / math.abs(a)27 runtime.error("an integer multiplication left the exact chart range; this run cannot be compared faithfully")28 _q_safe_int(a * b)29 30_q_high = _q_int(math.round(high * 1000000000.0))31_q_low = _q_int(math.round(low * 1000000000.0))32_q_close = _q_int(math.round(close * 1000000000.0))33 34var float day_high = 0.035var float day_low = 0.036var int session_day = 037var float prior_high = 0.038var float prior_low = 0.039var float mid = 0.040var int prior_day = 041var int minute_key = 042var int minute_of = 043var int minute_day = 044var float minute_close = 0.045var int traded_day = 046// clock: completed chart bar's opening timestamp (America/New_York).47_q_clock_prev_minute = hour(time, "America/New_York") * 60 + minute(time, "America/New_York")48_q_clock_prev_second = _q_clock_prev_minute * 60 + second(time, "America/New_York")49_q_clock_prev_weekday = (dayofweek(time, "America/New_York") + 5) % 750_q_clock_prev_day = int(timestamp("UTC", year(time, "America/New_York"), month(time, "America/New_York"), dayofmonth(time, "America/New_York"), 0, 0) / 86400000)51// Current clock: this chart bar's scheduled close, known without a future bar.52// A native next event after a data gap can carry a later time.53_q_clock_minute = hour(time_close, "America/New_York") * 60 + minute(time_close, "America/New_York")54_q_clock_second = _q_clock_minute * 60 + second(time_close, "America/New_York")55_q_clock_weekday = (dayofweek(time_close, "America/New_York") + 5) % 756_q_clock_day = int(timestamp("UTC", year(time_close, "America/New_York"), month(time_close, "America/New_York"), dayofmonth(time_close, "America/New_York"), 0, 0) / 86400000)57_q_clock_seen = 158int minute_l = na59int second_l = na60int day = na61float high_l = na62float low_l = na63float close_l = na64bool late = false65int key = na66int m = na67bool in_window = false68 69minute_l := _q_int(_q_clock_prev_minute)70second_l := _q_int(_q_clock_prev_second)71day := _q_int(_q_clock_prev_day)72high_l := _q_high * 1.073low_l := _q_low * 1.074close_l := _q_close * 1.075late := _q_iadd(second_l, 1) >= _q_imul(exit_minute, 60) or day != traded_day76if _q_int(strategy.position_size) > 077 if close_l <= mid or late78 _q_qty1 = _q_int(clip)79 if _q_qty1 <= 080 runtime.error("market order quantity must be a positive whole unit")81 _q_pos1 = _q_int(strategy.position_size)82 if _q_pos1 < 0 or _q_pos1 > 0 and _q_qty1 < _q_pos183 runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")84 strategy.order("q1", strategy.short, _q_qty1)85else if _q_int(strategy.position_size) < 086 if close_l >= mid or late87 _q_qty2 = _q_int(clip)88 if _q_qty2 <= 089 runtime.error("market order quantity must be a positive whole unit")90 _q_pos2 = _q_int(strategy.position_size)91 if _q_pos2 > 0 or _q_pos2 < 0 and _q_qty2 < -_q_pos292 runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")93 strategy.order("q2", strategy.long, _q_qty2)94key := _q_int(_q_iadd(_q_imul(day, 1440), minute_l))95if key != minute_key96 m := _q_int(minute_of)97 in_window := m >= open_minute and m < last_entry98 if minute_key != 0 and in_window and _q_int(strategy.position_size) == 099 if prior_day == minute_day and traded_day != minute_day100 if minute_close > prior_high101 _q_qty3 = _q_int(clip)102 if _q_qty3 <= 0103 runtime.error("market order quantity must be a positive whole unit")104 _q_pos3 = _q_int(strategy.position_size)105 if _q_pos3 > 0 or _q_pos3 < 0 and _q_qty3 < -_q_pos3106 runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")107 strategy.order("q3", strategy.long, _q_qty3)108 traded_day := _q_int(minute_day)109 else if minute_close < prior_low110 _q_qty4 = _q_int(clip)111 if _q_qty4 <= 0112 runtime.error("market order quantity must be a positive whole unit")113 _q_pos4 = _q_int(strategy.position_size)114 if _q_pos4 < 0 or _q_pos4 > 0 and _q_qty4 < _q_pos4115 runtime.error("this order would add to or partially reduce a position, so its trade ledger would not be faithful")116 strategy.order("q4", strategy.short, _q_qty4)117 traded_day := _q_int(minute_day)118 minute_key := _q_int(key)119 minute_of := _q_int(minute_l)120 minute_day := _q_int(day)121minute_close := close_l122if minute_l >= open_minute and minute_l < close_minute123 if session_day != day124 if session_day != 0125 prior_high := day_high126 prior_low := day_low127 mid := (day_high + day_low * 1.0) / 2.0128 prior_day := _q_int(day)129 session_day := _q_int(day)130 day_high := high_l131 day_low := low_l132 else133 day_high := math.max(day_high, high_l)134 day_low := math.min(day_low, low_l) How it was tested
The published rules, never tuned on the data, with real costs on every fill. Every strategy here is tested the same way.
- Market data
- CME Globex 1-minute bars, Jan 2, 2016 to Jul 31, 2026
- Rules
- As published, with the published parameters, never tuned on this data
- Size
- 1 contract on every trade
- Contract
- The most traded one, rolled as the market moved
- Fees
- The broker's $0.50 a side, plus CME's and the NFA's fees when the window opens
- Slippage
- 1 tick a side on ES, 2 in NQ's regular session and 3 outside it, 1 on other markets, where it was not measured
- Stops and entries
- Tested on 1-second closes and filled at the next bar
- Contracts traded
- ES: 43 contracts, ESH6 to ESU6NQ: 43 contracts, NQH6 to NQU6
- Costs paid
- ES: $7,789 in fees, $54,950 in slippageNQ: $8,197 in fees, $46,440 in slippage
- Warm-up
- None: each contract reads only its own bars
- Flagged days
- ES: NoneNQ: None Days the data holds too few bars for. Flagged, not removed.
Could you pass
a prop firm challenge
with the previous day high and low breakout?
A backtest says whether a strategy makes money. Our AI runs its trades through the rules of every prop firm account, then tells you which one it would pass and at what size.
No card needed. Free credits every month.
- Most money: Blue Guardian Futures Direct 50K, $5,084
- Best payout odds: Funded Futures Family Straight to Funded 50K, 98%
- Fastest pass: Phidias Express to Live 50K, 11 days
$5,084
Median net across 2,000 simulated runs
- Evaluation
- None
- First payout
- 97%
- Fees paid
- $1,521
Median net across 2,000 simulated runs
Questions about the previous day high and low breakout
What is the previous day high and low breakout?
Buy a close above the prior day's high or sell a close below its low, with the prior day's midpoint as the stop. Atlantive backtested it on CME futures from January 2016 to July 2026 after costs.
Is the previous day high and low breakout profitable on ES futures?
Not in this backtest: on ES futures from January 2016 to March 2026 it lost $99,527 after costs, over 2,198 trades, positive in 3 of 11 years; on NQ it lost $47,987. Buying and holding one ES contract over the same window made $236,212. The average trade was −$45, its 95% interval −$99 to $8. These are hypothetical results of a backtest, not of trading.
What are the previous day high and low breakout's rules?
The levels are the prior day session's high and low, 9:30 to 16:00 New York. In the day session, the first one-minute close above the prior high buys and the first below the prior low sells short, once a day, until 15:00. The stop is the prior day's midpoint. Whatever is still open is closed at 15:45 New York. Its parameters are the published ones, never tuned on the data it was tested on.
How was the previous day high and low breakout backtested?
On CME Globex data from January 2016 to July 2026, one contract, on 1-minute bars, rolled to the most traded contract as the market moved, with the broker's and CME's fees and the slippage measured on each market. Stops and entries were tested on 1-second closes and filled at the next bar. Nothing was fitted to the data.
Can I run the previous day high and low breakout in TradingView?
Yes. The page carries its Pine Script, written by Atlantive's compiler from the same code the backtest ran, for TradingView's strategy tester. A chart's fills and fees can differ from the backtest's, so test it again on the symbol you trade.
Can I change the previous day high and low breakout and test it again?
Yes. Rerun it in Atlantive: a new chat opens with the strategy's rules in the box, for you to read, change and send. The agent writes the code, backtests it on the market and window you name, and reports the result with its costs.