New Rate - PREMIUM v2New Rate - PREMIUM v2
New Rate - PREMIUM v2 is an intraday Opening Range Breakout (ORB) strategy built around a strict one-trade-per-day execution model.
The strategy defines a price range using the first N candles of a user-defined session, freezes the High/Low at the close of candle N, and places OCO stop orders exactly at those levels. The first breakout fills, the opposite order is canceled, and no further trades are allowed until the next trading day.
This script is published for educational and research purposes, with documented mechanics and backtest settings to support transparency and reproducibility.
How the strategy works
Session range construction
The user selects a minutes-based timeframe, a session start time, and the number of candles N. During the session window, the strategy tracks the highest High and lowest Low formed by the first N candles. These candles are visually highlighted on the chart.
Range freeze
When candle N closes, the range is locked. Horizontal High/Low lines are drawn and extended forward. An optional 50% midpoint can be displayed for reference.
OCO breakout execution
Immediately after the range is frozen, the strategy places:
A buy stop at the frozen High
A sell stop at the frozen Low
Orders are linked using OCO (One-Cancels-Other) logic. When one side fills, the opposite order is automatically canceled.
Exit management
Two exit frameworks are available:
Tick-based exits: stop-loss and take-profit are fixed distances in ticks from entry.
Risk/Reward exits: optional stop at the opposite side of the range, with TP calculated as RR × risk.
Both modes can display SL/TP boxes projected forward for visual review.
Daily execution lock
After the first filled trade of the day, the strategy blocks any new entries until the next daily reset. This enforces strict discipline and prevents over-trading.
Visual features
Configurable High/Low lines and labels (color, style, width, alignment)
Optional midpoint (50%) line
Session background highlight with adjustable opacity
Optional SL/TP boxes with configurable colors, borders, and projection length
Weekday filter (trade only selected days)
Settings used for the published backtest (replication)
The performance screenshots included with this publication were generated using the following configuration:
Market & chart
Symbol: FX:XAUUSD
Timeframe: 15 minutes
Session & range
Session start: as configured on chart (exchange time)
Range candles (N): 1
Auto range end: enabled (TF × N)
Line extension: 20 bars
Exits
Exit mode: SL/TP by ticks
Stop-loss: 1500 ticks
Take-profit: 2000 ticks
Weekdays
Monday to Friday enabled
Strategy Properties (TradingView settings)
Initial capital: 1,000 USD
Commission: 0.1 (as set in Strategy Properties)
Slippage: 1 tick
Users should adjust commission, slippage, and position sizing to match their own broker and execution conditions.
Backtest context and limitations
This strategy uses stop orders that may fill intrabar depending on TradingView’s execution model.
Results vary by symbol, timeframe, session selection, and trading costs.
Past performance does not guarantee future results.
This script is not financial advice.
Originality and usefulness
While opening-range breakouts are a known concept, this strategy’s implementation focuses on:
Exact range-freeze timing: orders are armed precisely at the close of the N-th candle.
True OCO + hard daily lock: one-and-done execution enforced at the engine level.
Dual exit framework: fixed-tick and RR exits analyzed with the same SL/TP visual logic.
Operational safeguards: weekday filters and drawing limits designed for stable long-term backtesting.
NEW
AlAlawi StrategyHello Experts / Trolls;
I had written this strategy for a while and although I know how to color my charts, I wish for some expert advice or just some trolls to bring light to the codes weakness area's.
Period = isdwm?timestamp(2012, 01, 01, 00, 00):isintraday?timestamp(2018, 04, 01, 00, 00):timestamp(2018, 04, 01, 00, 00)
The above line of code for example lets my 4H and 1H charts suffer from a small size of testing and I need to change the dates manually, any idea to let a more dynamic approach and accomodate a 1 minute to 4h charts solution without having to play with the dates manually every time.
I also see a huge difference in results when applying this script on a Heikin-Ashi vs Candlestick chart!
So when pyramiding (upto 15) is applied on this strategy, the numbers starts boosting like crazy too!
This is a rough code for now, let me know where to work on the code or just like and share your opinion on this.

