ORB + Trend-Day Score + LaRSI — Strategy by wonderfulRiceafb80

By wonderfulRiceafb80

Performance Metrics

Description

ORB + TREND-DAY SCORE + LaRSI (STRATEGY) - RELEASE NOTES v2.0Date: 2026-11-29Script: orb_trend_day_score_larsi.pineDISCLAIMERFor training and educational purposes only. This script and these notes are not financial, investment or trading advice, and nothing here is a recommendation to buy or sell any security. Backtest results are hypothetical: they assume zero commissions and 1 cent of slippage, and they do not guarantee future performance. Trading involves substantial risk of loss. Test on a paper or simulated account first, and consult a licensed financial professional before trading real money.WHAT THIS SCRIPT DOESA 30-minute Opening Range Breakout (ORB) for SPY on the 5-minute chart, filtered by the trend-day score. Instead of buying the breakout candle, it waits for price to pull back to the range and confirm, then manages the trade with a stop, a target and alerts on every entry and exit. It is a strategy script, so it also shows backtest results in TradingView's Strategy Tester.CHANGES IN THIS RELEASE (compared with v1.0)- New entry options: - Retest (new default): after a qualifying breakout, wait for price to dip back to the range high and close back above it. - LaRSI pullback: wait for the Laguerre RSI to dip below 20 and cross back up. - Breakout close: the v1.0 behaviour, entering on the breakout candle.- New exit option, "R-multiple target": the target is a multiple of your risk, where R = entry price minus stop price. 1.0 means take profit when the gain equals the risk.- New optional break-even stop: once price has moved a set number of R in your favour, the stop moves to the entry price.- Shorts are now off by default.- New exit alerts: every closed trade sends TARGET, STOP, BREAKEVEN or EOD, with exit price and profit or loss.- New alert when the stop moves to break-even.- New chart labels: teal WAIT on a qualifying breakout, BUY RETEST or BUY LaRSI on entry. The grey SKIP labels are unchanged.- The Laguerre RSI value is shown in the Data Window.- Not in this version: the "Show SKIP labels" and "Skip months" settings from the v1.0 indicator.HOW IT WORKS1. Opening range: the high and low from 9:30 to 10:00 ET (purple shading). The midpoint of the range is the stop.2. Breakout: the first 5-minute candle that closes above the range high, between 10:00 AM and 3:30 PM ET. Only the first breakout of the day counts.3. Score: each ticked condition that is true adds 1 point. If the score is below "Minimum score", a grey SKIP label appears and there is no trade that day. If it passes, a teal WAIT label appears.4. Entry (Retest): the strategy waits for a candle that dips to within 0.1 x range of the range high and closes back above it. It buys at that candle's close and sends a BUY alert. If any candle closes below the midpoint first, the setup is cancelled and there is no trade that day.5. Exit: whichever comes first of: - the target - the stop (midpoint, or the entry price once break-even has triggered) - 3:55 PM ET (or the last bar of a half-day session) An exit alert is sent.CHART SETUP (important)- Symbol: AMEX:SPY- Timeframe: 5 minutes- Session: Regular trading hours. Right-click the chart > Settings > Symbol > Session: Regular trading hours. With extended hours on, the gap filter reads the wrong open.- Chart type: regular candles.RECOMMENDED SETTINGSPreset A - Lower drawdown (recommended) ORB group - Opening range ends: 1000 - Last entry time: 1530 - Stop: Midpoint - Exit: R-multiple target - R-multiple target: 1.0 - Move stop to break-even: off - Take longs: on - Take shorts: off - Entry: Retest - Retest: pullback within 0.1 - LaRSI alpha / level: 0.2 / 20 (only used when Entry = LaRSI pullback) Trend-day score group - Gap: on, 0.3 - Narrow range: on, 1.0 - Volume: on, 1.5 - NYSE A/D: on, 1000 - VIX above yesterday, VIX level, QQQ/IWM, NR7, Gap fade, News: all off - Minimum score: 2Preset B - More profit, larger drawdown Same as Preset A, except: - R-multiple target: 1.5 - Move stop to break-even: optional. In testing it made losses smaller but lowered total profit.Preset C - Original target Same as Preset A, except: - Exit: 1x range target (target = range high + 1 range width; this is the script default)Optional- Take shorts: turning this on with the Retest entry added about $3,600 over 10 years, with a larger drawdown. It is your call. Keep shorts off if you use the LaRSI entry, because LaRSI shorts lost money.Properties tab- Initial capital: your account size.- Order size: the backtest uses 95% of equity. Use much less for real trading.- Commission: your broker's actual commission.- Slippage: at least 1 tick.- Process orders on bar close: on (leave as is).SETTINGS GUIDE (new settings only)- Entry - Retest (default): waits for a pullback to the range high and a close back above it. - LaRSI pullback: waits for Laguerre RSI to dip below the level and cross back up while price stays above the midpoint. This gives far fewer trades (about 6 a year). - Breakout close: enters on the breakout candle, as in v1.0.- Retest: pullback within x x range: how close to the range high the pullback must come. Default 0.1.- LaRSI alpha: lower is smoother and slower. Default 0.2.- LaRSI pullback level: default 20. Higher levels lost money in testing.- Exit - 1x range target: range high + 1 range width. Behaves like about 1.25R on Retest entries. - R-multiple target: entry + x times R. - Hold to close: no target; exits on the stop or at 3:55 PM ET.- R-multiple target: x x R: 1.0 = take profit when the gain equals the risk.- Move stop to break-even after x R: once price reaches entry + x R, the stop moves to the entry price, so a full reversal costs about $0. It has no effect with a 1R target, because the trade has already exited at that point.ALERTSCreate an alert on the strategy and choose "alert() function calls only". One alert covers all messages:- Entry: ORB BUY RETEST SPY @ price | stop price- Break-even: ORB STOP MOVED TO BREAK-EVEN SPY @ price- Exit: ORB EXIT LONG TARGET / STOP / BREAKEVEN / EOD SPY @ price | P/L amountAlerts fire at the close of the 5-minute candle.BACKTEST SUMMARYSPY 5-minute, Nov 2016 to Nov 2026, regular trading hours, longs only, Retest entry, default score filters, 95% of a $100,000 account per trade, $0 commission, 1 tick slippage.Exit Trades Win % Profit factor Net Max drawdown1x range target (Preset C) 378 51.3 1.20 +$9,211 $3,972 (3.9%)1R target (Preset A) 378 56.3 1.22 +$9,082 $3,371 (3.3%)1.5R target (Preset B) 378 48.4 1.22 +$10,635 $3,907 (3.7%)1x range target + break-even 1R 378 47.1 1.21 +$8,530 $3,705 (3.6%)Other results:- With 2 cents per share of extra slippage, the 1x range target still made +$6,020 (profit factor 1.13).- LaRSI pullback entry, longs only: 64 trades, profit factor 1.96, +$3,216, max drawdown 2.3%. That is too few trades to rely on.- The 1.5R and break-even rows came from a simplified test version of the same rules. The other rows came from the full v2.0 script.- The exit settings were compared on the full 10 years, so their differences (under $1,500) may be partly luck.- The edge is small and not yet statistically proven. Buying and holding SPY returned about +216% over the same period.KNOWN LIMITATIONS- Built and tested only on SPY 5-minute. Other symbols and timeframes are untested.- The score uses outside data (USI:ADD, CBOE:VIX, QQQ, IWM). If your TradingView plan lacks that data, those filters may not work.- Signals and alerts come at the close of the 5-minute candle. Real fills can be worse than the backtest, especially on fast days.- The break-even stop takes effect from the candle after price reaches the trigger level.- Settings that look best on past data often do worse in the future. Change one setting at a time and keep it for 30-50 trades before judging.Release NotesORB + TREND-DAY SCORE + LaRSI - v2.1 (2026-11-29)For education only. Not financial advice. Backtests are hypothetical; test on paper first.WHAT IT DOES30-minute opening range breakout on SPY (5-min chart). Trades only when thetrend-day score is 2 or more, waits for a pullback, then takes 1 trade max per day.WHAT'S NEW- Default exit: 1R target (profit = risk). Lowest drawdown in every test period.- Chart markers: 1 breakout, 2 pullback, 3 entry, 4 exit (green win / red loss).- Alerts on every entry and exit (TARGET / STOP / EOD with P/L).- LaRSI line moved to its own indicator, "LaRSI pane (ORB)", so candles stay clear.- New options (off by default): LaRSI or RSI pullback entry, break-even stop, second breakout the other way.CHART SETUPSPY, 5-minute, regular trading hours only.SETTINGS (defaults)Entry: Retest | Exit: R-multiple 1.0 | Stop: MidpointTake longs: on | Take shorts: offScore filters: Gap, Narrow range, Volume, NYSE A/D | Minimum score: 2For more profit with slightly more drawdown, set R-multiple to 1.5.Use a much smaller order size than the backtest's 95% for real trading.RECOMMENDED SETTINGSPreset A - Lower drawdown (recommended) ORB group - Opening range ends: 1000 - Last entry time: 1530 - Stop: Midpoint - Exit: R-multiple target - R-multiple target: 1.0 - Move stop to break-even: off - Take longs: on - Take shorts: off - Entry: Retest - Retest: pullback within 0.1 - LaRSI alpha / level: 0.2 / 20 (only used when Entry = LaRSI pullback) Trend-day score group - Gap: on, 0.3 - Narrow range: on, 1.0 - Volume: on, 1.5 - NYSE A/D: on, 1000 - VIX above yesterday, VIX level, QQQ/IWM, NR7, Gap fade, News: all off - Minimum score: 2Preset B - More profit, larger drawdown Same as Preset A, except: - R-multiple target: 1.5 - Move stop to break-even: optional. In testing it made losses smaller but lowered total profit.Preset C - Original target Same as Preset A, except: - Exit: 1x range target (target = range high + 1 range width; the v2.0 default)Preset A is the script default from v2.1. In both test periods the 1x range target was never the best choice: 1R had the smallest drawdown and 1.5R made the most money.Optional- Take shorts: keep off. With the Retest entry, shorts were about break-even over 10 years (211 trades, profit factor 1.02, +$568), and max drawdown rose from 3.9% to 6.5%. LaRSI shorts lost money.- Minimum score: keep at 2. Lowering it to 1 roughly tripled the trades and wiped out the edge (profit factor 1.01, max drawdown 14%).- Allow a breakout the other way: optional. It added about $2,100 in 2017-2021 but nothing in 2022-2026 (+$35, with a slightly larger drawdown), so it is off by default.ALERTSAlert > Condition: this strategy > "alert() function calls only" > Create.Create the alert after adding the script and choosing your settings.Properties tab- Initial capital: your account size.- Order size: the backtest uses 95% of equity. Use much less for real trading.- Commission: your broker's actual commission.- Slippage: at least 1 tick.- Process orders on bar close: on (leave as is).RESULTS (10 years, 2016-2026, longs only, 1R target)378 trades, 56% wins, profit factor 1.22, +9.1%, max drawdown 3.3%.Shorts on or minimum score 1 made results worse. SPY buy & hold: +216%.LIMITSTested only on SPY 5-min. The edge is small and not proven.Alerts fire at candle close; real fills can be worse.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView