Myth Busting E04 - Sneaky Pivot [PyneSys] — Strategy by PyneSys

By PyneSys

Performance Metrics

Description

This strategy trades a reversal at yesterday's range right after the New York open. If the first 15-minute candle tags yesterday's high or low and the second candle turns the other way, it trades the break of that second candle, back toward the other side of the range. The idea comes from The Rumers' video. We wrote this script ourselves, so you can test the rules on your own charts.The four levelsAll times are New York time (America/New_York, so daylight saving is handled). The regular session is 09:30-16:00.- Range high and range low: yesterday's regular-session high and low.- Swing high and swing low: looking left from the start of yesterday's session, the script finds the first candle beyond the range level, follows that run of candles and keeps its extreme. Extended-hours candles count when the chart shows them. No candle beyond the level means no swing level that day.Longs are only taken at the lower levels, shorts only at the upper ones.How it works1. The 09:30 candle has to reach one side: its low reaches the range low for a long, or its high reaches the range high for a short. A candle that reaches both is skipped.2. The 09:45 candle, the "sneaky" candle, has to close the other way: green for a long, red for a short. If it doesn't, there is no trade that day.3. The stop goes one tick beyond the lowest low (long) or highest high (short) from 09:30 through the sneaky candle. The target is the other side of yesterday's range.4. When the sneaky candle closes, a stop order goes one tick beyond its high (long) or low (short). It is live during the next candle only, so the earliest entry is the 10:00 candle. An unfilled order is cancelled.5. If the entry price would not sit between the stop and the target, no order is placed.6. The trade ends at the stop or the target. A trade still open at the last regular candle (16:00, or 13:00 on listed early-close days) is closed at that candle's close. One trade a day at most.Where we had to decideThe video teaches the setup on a few chart examples and leaves some details open. Our choices:- How long the entry order stays live: one candle.- How far back to look for a swing level: as far as the loaded candles go.- Which target: the other side of yesterday's range. The swing level is a setting.- When to close a trade that hits neither level: at the session close.- The one-tick buffer on the stop and the entry.- "At the line" means the candle reaches the level. Coming close only counts if you set a level tolerance.SettingsThe defaults are the rules as taught. Everything else is a variant we added for research; change one at a time. No setting was chosen for its result.- Entry timing: Break (default); Early (market order at the sneaky candle's close, filled at the next open); Candle close (the next candle must close beyond the sneaky candle, then a market order); Half candle (limit order at the sneaky candle's midpoint, live for two candles); Late (the next candle must trade beyond it, then a market order).- Level tolerance: lets the first candle miss the level by this multiple of the daily ATR(14). 0 means it has to reach the line.- Allow the sneaky candle up to 10:15: the first opposite-colored candle from 09:45 through 10:15 counts.- Swing levels from daily extremes instead of the 15-minute run.- Target at the swing level instead of the range level.- Non-trading and early-close dates (YYYYMMDD, comma-separated): for CFDs and other symbols that keep trading on US exchange holidays. Leave them empty for exchange-listed stocks.Chart and propertiesUse standard 15-minute candles; the script stops with an error on any other timeframe. It is meant for symbols with a New York regular session: US stocks and ETFs, US index futures, and CFDs that follow them. The first session gives no levels, and a level tolerance needs 14 completed sessions for its ATR. Everything uses confirmed candles, and nothing is plotted into the past.Properties: initial capital 1,000,000, a fixed size of 1 unit, no pyramiding, orders filled on the next candle. The large capital only keeps high-priced symbols from running out of funds, so the percentage returns mean nothing; look at the trades instead. When a stop and a target fall inside the same 15-minute candle, TradingView's broker emulator assumes which one filled first. It does not see the ticks.On the chart: range levels in blue, swing levels in purple, and after a sneaky candle the stop (red), target (green) and entry level (orange). A plotted entry level does not mean the order filled.CostsCommission and slippage are zero by default, so the rules can be compared across very different markets before costs. That is not a claim that trading is free: these results are gross, not what you would keep. Set your own commission and slippage in Properties before you judge the results. Spread, funding and similar costs are not modeled. For this strategy costs matter a lot: the stop is often close to the entry, so even a small cost per trade eats a large part of the risk.What this script is notThis description makes no performance claim, and no TradingView backtest is reported here. Our research ran the same code in PyneCore on stored 15-minute data; those numbers are not this script's Strategy Tester output. Your results depend on the symbol, the data feed, the loaded history, the extended-hours setting and your Properties. The setup fires at most once a day, so short histories give few trades. This is a research implementation, and past results do not predict future ones.How to use it1. Open a symbol with a New York regular session on a standard 15-minute chart and load as much history as you can.2. Add the strategy and keep the defaults to test the rules as taught.3. For CFDs, fill in the non-trading and early-close dates for your period.4. Set commission and slippage for your instrument and broker.5. Check single days: the levels, the sneaky candle, the entry level and the fills in the List of Trades.6. Try one variant at a time, for example a level tolerance of 0.25.License: MPL-2.0. Copyright 2026 PyneSys LLC.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView