INVITE-ONLY SCRIPT

New Rate - PREMIUM v2

311
New Rate – Premium

Overview
New Rate – Premium is a breakout strategy built around a strict “one trade per day” rule. It forms an intraday range from the first N candles, freezes High/Low at the close of candle N, and places OCO stop orders exactly on those levels. The first breakout fills and the opposite order is canceled. Exits can be managed by fixed ticks or by risk/reward (RR). The script draws SL/TP boxes, keeps entry labels at a fixed distance from price, and lets you restrict trading to selected weekdays.

snapshot

How it works

Window & count: set timeframe, session start, and N candles. Those candles are highlighted and used to compute the range High/Low.

Freeze: when candle N closes, the strategy locks High/Low and draws the lines; a 50% midline is optional.

OCO placement: buy-stop on High and sell-stop on Low (one-cancels-other). The first fill cancels the other side.

Exits:
– Ticks mode: SL/TP are fixed distances in ticks from entry.
– RR mode: SL at the opposite side of the range; TP = RR × risk.
Visual SL/TP boxes are drawn in both modes.

Daily lock: after the first fill, no more entries for that day.
snapshot
Key features
  • First break only, one trade per day: hard discipline that avoids over-trading.
  • Automatic range end: timeframe × N candles (or manual end time).
  • Exact “at-the-break” entries: stop orders placed at frozen High/Low.
  • Flexible exits: fixed ticks or RR with opposite-side stop.
  • Clean visuals: High/Low and midline with configurable color/style/width; text alignment (left/center/right); session background with opacity.
  • SL/TP boxes: configurable colors, borders, width, and forward projection.
  • Entry labels with constant offset: “BUY” below bar, “SELL” above bar; distance in ticks so labels never sit on price.
  • Weekday filter: trade only the days you select (Mon–Fri).

Inputs (summary)
• Session & range: timeframe (minutes), start time, N candles, auto end (TF × N) or manual, line extension.
• Style: High/Low colors, styles, widths; midline on/off; label position; session background color and opacity.
• Exits: RR using the opposite extreme as SL, or “Use SL/TP by ticks”.
• SL/TP boxes: projection bars, SL color, TP color, border color and width, box limit.
• Weekdays: Monday–Friday selectors.
• Entry labels: show/hide, colors, size, vertical offset in ticks, optional X shift in bars.
snapshot
Backtest snapshot — FX:XAUUSD 30m
Range: 02 Jan 2024 00:00 → 12 Sep 2025 12:00 • Symbol/TF: FX:XAUUSD / 30m
• Net Profit: $1,599.77
• Gross Profit / Gross Loss: $3,929.47 / $2,329.70
• Max Drawdown: $112.73 (4.93%)
• Total Trades / Win rate: 440 / 48.41%
• Avg Trade: $3.64 (0.04%); Avg Winner / Avg Loser: $18.45 / $10.26
• Profit Factor / Sharpe / Sortino: 1.687 / 1.163 / 6.876
• Largest Win / Loss: $91.94 / $10.26
• Avg Bars in Trade: 1 (long), 2 (short)

Why this strategy is original

First-bar breakout accuracy: orders arm exactly when the N-th candle closes, so the very next bar can fill at the true break. This avoids the common ORB miss where the first post-range bar is skipped by delayed checks or market orders.

OCO + daily lock as a core mechanic: the engine enforces one-and-done behavior—no soft rules, no hidden retries—so test results match live logic.

Two exit frameworks, one visual language: switch seamlessly between fixed-tick and structural RR exits while managing both with the same SL/TP boxes for consistent analysis and education.

Readability by design: label offset, aligned High/Low text, and tunable session background keep charts uncluttered during long optimizations or multi-asset reviews.

Operational guardrails: drawing budgets, box limits, and weekday filters are integrated so backtests remain stable and realistic with trading hours.

Focused ORB specialization: no oscillators, no hidden bias—transparent, testable, and purpose-built for the opening-range dynamic you configure.
snapshot
Recommended use
• Session openings or early windows with a single, clean decision per day.
• Strict rules with exact entry levels and auditable exits.
• Benchmarking exits in both ticks and RR with apples-to-apples visuals.

Default strategy properties
• Initial capital: 10,000 USD; position sizing by % of equity (editable).
• Commissions default to 0% and slippage to 0; edit to match your broker/market.
• Drawing limits tuned to respect TradingView resource caps.

Best practices & compliance
• Educational use. Not financial advice.
• Past performance does not guarantee future results.
• Adjust slippage, commissions, and position sizing to your live context.
• Original implementation with documented mechanics; compliant with TradingView House Rules.

Example setup
TF 5m, start 08:00, N = 6 → auto end at 08:30
RR = 2 with SL at the opposite side of the range
Boxes: projection 10 bars; SL #9598a1; TP #ffbe1a; border #787B86; opacity 70
Days: Tuesday and Wednesday only
Labels: “BUY” below and “SELL” above, 10-tick offset

Glossary
• Opening range breakout (ORB): breakout of the configured initial range.
• One-cancels-other (OCO): filling one order cancels the other.
• Risk/reward (RR): target equals RR × risk distance.
• Tick: minimum price increment.
• Offset: fixed label separation from the bar extremum.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.