US/SPY- Financial Regime Index Swing Strategy Credits: concept inspired by EdgeTools Bloomberg Financial Conditions Index (Proxy)
Improvements: eight component basket, inverse volatility weights, winsorization option( statistical technique used to limit the influence of outliers in a dataset by replacing extreme values with less extreme ones, rather than removing them entirely), slope and price gates, exit guards, table and gradients.
Summary in one paragraph
A macro regime swing strategy for index ETFs, futures, FX majors, and large cap equities on daily calculation with optional lower time execution. It acts only when a composite Financial Conditions proxy plus slope and an optional price filter align. Originality comes from an eight component macro basket with inverse volatility weights and winsorized return z scores that produce a portable yardstick.
Scope and intent
Markets: SPY and peers, ES futures, ACWI, liquid FX majors, BTC, large cap equities.
Timeframes: calculation daily by default, trade on any chart.
Default demo: SPY on Daily.
Purpose: convert broad financial conditions into clear swing bias and exits.
Originality and usefulness
Unique fusion: return z scores for eight liquid proxies with inverse volatility weighting and optional winsorization, then slope and price gates.
Failure mode addressed: false starts in chop and early shorts during easy liquidity.
Testability: all knobs are inputs and the table shows components and weights.
Portable yardstick: z scores center at zero so thresholds transfer across symbols.
Method overview in plain language
Base measures
Return basis: natural log return over a configurable window, standardized to a z score. Winsorization optional to cap extremes.
Components
EQ US and EQ GLB measure equity tone.
CREDIT uses LQD over HYG. Higher credit quality outperformance is risk off so sign is flipped after z score.
RATES2Y uses two year yield, sign flipped.
SLOPE uses ten minus two year yield spread.
USD uses DXY, sign flipped.
VOL uses VIX, sign flipped.
LIQ uses BIL over SPY, sign flipped.
Each component is smoothed by the composite EMA.
Fusion rule
Weighted sum where weights are equal or inverse volatility with exponent gamma, normalized to percent so they sum to one.
Signal rule
Long when composite crosses up the long threshold and its slope is positive and price is above the SMA filter, or when composite is above the configured always long floor.
Short when composite crosses down the short threshold and its slope is negative and price is below the SMA filter.
Long exit on cross down of the long exit line or on a fresh short signal.
Short exit on cross up of the short exit line or on a fresh long signal, or when composite falls below the force short exit guard.
What you will see on the chart
Markers on suggestion bars: L for long, S for short, LX and SX for exits.
Reference lines at zero and soft regime bands at plus one and minus one.
Optional background gradient by regime intensity.
Compact table with component z, weight percent, and composite readout.
Table fields and quick reading guide
Component: EQ US, EQ GLB, CREDIT, RATES2Y, SLOPE, USD, VOL, LIQ.
Z: current standardized value, green for positive risk tone where applicable.
Weight: contribution percent after normalization.
Composite: current index value.
Reading tip: a broadly green Z column with slope positive often precedes better long context.
Inputs with guidance
Setup
Calc timeframe: default Daily. Leave blank to inherit chart.
Lookback: 50 to 1500. Larger length stabilizes regimes and delays turns.
EMA smoothing: 1 to 200. Higher smooths noise and delays signals.
Normalization
Winsorize z at ±3: caps extremes to reduce one off shocks.
Return window for equities: 5 to 260. Shorter reacts faster.
Weighting
Weight lookback: 20 to 520.
Weight mode: Equal or InvVol.
InvVol exponent gamma: 0.1 to 3. Higher compresses noisy components more.
Signals
Trade side: Long Short or Both.
Entry threshold long and short: portable z thresholds.
Exit line long and short: soft exits that give back less.
Slope lookback bars: 1 to 20.
Always long floor bfci ≥ X: macro easy mode keep long.
Force short exit when bfci < Y: macro stress guard.
Confirm
Use price trend filter and Price SMA length.
View
Glow line and Show component table.
Symbols
SPY ACWI HYG LQD VIX DXY US02Y US10Y BIL are defaults and can be changed.
Realism and responsible publication
No performance claims. Past is not future.
Shapes can move intrabar and settle on close.
Execution is on standard candles only.
Honest limitations and failure modes
Major economic releases and illiquid sessions can break assumptions.
Very quiet regimes reduce contrast. Use longer windows or higher thresholds.
Component proxies are ETFs and indexes and cannot match a proprietary FCI exactly.
Strategy notice
Orders are simulated on standard candles. All security calls use lookahead off. Nonstandard chart types are not supported for strategies.
Entries and exits
Long rule: bfci cross above long threshold with positive slope and optional price filter OR bfci above the always long floor.
Short rule: bfci cross below short threshold with negative slope and optional price filter.
Exit rules: long exit on bfci cross below long exit or on a short signal. Short exit on bfci cross above short exit or on a long signal or on force close guard.
Position sizing
Percent of equity by default. Keep target risk per trade low. One percent is a sensible starting point. For this example we used 3% of the total capital
Commisions
We used a 0.05% comission and 5 tick slippage
Legal
Education and research only. Not investment advice. Test in simulation first. Use realistic costs.
指標和策略
Point of Control (POC)**Point of Control (POC) Indicator**
This indicator identifies the price level where the most trading volume occurred over a specified lookback period (default: 365 days). The POC represents a significant support/resistance level where the market found the most acceptance.
**Key Features:**
- **POC Line**: Bright green horizontal line showing the highest volume price level
- **Volume Profile Analysis**: Divides price range into rows and calculates volume distribution
- **Value Area (Optional)**: Shows VAH and VAL levels containing 70% of total volume
- **Customizable**: Adjust lookback period, price resolution, colors, and line width
**How to Use:**
- POC acts as a magnet - price often returns to test these high-volume levels
- Strong support/resistance zone where significant trading activity occurred
- Useful for identifying key price levels for entries, exits, and stops
- Higher lookback periods (365 days) show longer-term significant levels
**Settings:**
- Lookback Period: Number of bars to analyze (default: 365)
- Price Rows: Calculation resolution - higher = more precise (default: 24)
- Toggle Value Area High/Low for additional context
---
My Rate Of Change. Buy equities if crosses up from 0, Sell equities and switch to commodities like Gold if crosses down 40
Prev 1-Min Volume • 5% Max Shares (TTP-ready)💡 Overview
This tool was built to help Trade The Pool (TTP) traders comply with the new “5% per minute volume” rule — without needing to calculate anything manually.
It automatically tracks the previous 1-minute volume, calculates 5% of it, and compares that to your planned order size.
If your planned size is within the limit, it shows green ✅.
If you’re above, it flashes red 🚫.
And when liquidity spikes allow for more size, you’ll see a green glow and 🔔 alert — so you can size up confidently without breaking the rule.
⚙️ Features
✅ Auto-calculates 5% volume cap from the previous 1-min candle
✅ Displays previous volume, max allowed shares, and your planned size
✅ TTP “different volume” scaling option (e.g. 0.69 for 45M vs 65M real volume)
✅ Per-bar slice suggestion for 10s scalpers
✅ Corner selector (top-left, top-right, bottom-left, bottom-right)
✅ Visual glow and 🔔 alert when liquidity window opens
✅ Compact and real-time responsive on 10s charts
All-in-One: EMA, ORB, PM, and Anchored VWAPAll-in-One: EMA, ORB, PM, and Anchored VWAP... ema 9/20/50/100/20 + opening range break + premarket high and lows + vwap all in one indicator enjoy.. all these can be turned on and off if you only want vwap and ema or pm and orb etc..
Rolling Pivot RibbonRolling Pivot Ribbon
This indicator displays historical and developing pivot levels across multiple days,
creating a dynamic "ribbon" effect as pivots roll forward through time.
DESIGNED FOR: Intraday timeframes (≤1D). Shows warning on higher timeframes.
USE CASE: Identify key support/resistance levels, track pivot evolution, and spot
price interaction zones with enhanced visual clarity.
WHY?
There comes a time in every Pinescript developer's evolution, they feel compelled to write a script that draws many lines, possibly triangles, into the future. This is mine. It's both totally useless, and a constant source of comfort to me.
KEY FEATURES:
• Multiple pivot calculation methods (Classic, Camarilla)
• Historical pivot tracking with configurable lookback period (default 4 days)
• Real-time "developing" pivots that update intraday based on current day's HLC
• Gradient fills between adjacent pivot levels for visual depth
• 13 pivot levels: PP, R1-R6, S1-S6
TASTY MODE (Advanced):
• Intelligent filtering: only shows lines that price has recently intersected
• Dynamic transparency: opacity adjusts based on intersection frequency
• Auto-cleanup: removes stale lines that haven't been touched in X days
• Smart extensions: lines that see more action project further into the future
• Focus mode options to reduce chart clutter
VISUAL CONTROLS:
• Toggle individual pivot levels on/off
• Customizable colors and transparency for lines and fills
• Flexible label positioning (left-align or right-align)
• Adjustable projection length for pivot lines (defaults to 1. Set to 0 for just a ribbon)
EMA & ORB/PM LevelsScript that combines EMA and opening range and Premarket high and low levels all in one so you can save using three indicators and just use this one.
AMF PG Strategy v2.3AMF PG Strategy v2.3
1. Core Philosophy: Filtered and Volatility-Aware Trend Following
"AMF PG Strategy" is an advanced trend-following system designed to adapt to the dynamic nature of modern markets. The strategy's core philosophy is not just to follow the trend but also to wait for the right conditions to enter the market.
This is not a "black box." It is a rules-based framework that gives the user full control over various market filters. By requiring multiple conditions to be met simultaneously, the strategy aims to filter out low-quality signals and focus only on high-probability trend opportunities.
2. Core Engine: AMF PG Trend Following
At the heart of the strategy is a proprietary, volatility-aware trend-following mechanism called AMF PG (Praetorian Guard). This engine operates as follows:
Dynamic Bands: Creates a dynamic upper and lower band around the price that is constantly recalculated. The width of these bands is not fixed; It dynamically adjusts based on recent market volatility, volume flow, and price expansion. This adaptive structure allows the strategy to adapt to both calm and high-volatility markets.
Entry Signals: A buy signal is triggered when the price rises above the upper band. A sell signal is triggered when the price falls below the lower band. However, these signals are executed only when all the active filters described below give the green light.
Trailing Stop-Loss: When a position is entered, the opposite band automatically acts as a trailing stop-loss level. For example, when a buy position is opened, the lower band follows the price as a stop-loss. This allows for profit retention and trend continuation.
3. Multi-Layered Filter System: Understanding the Market
The power of this strategy comes from its modular filter system, which allows the user to filter market conditions based on their own analysis. Each filter can be enabled or disabled individually in the settings:
Filter 1: Trend Strength (ADX Filter): This filter confirms whether there is a strong trend in the market. It uses the ADX (Average Directional Index) indicator and only allows trades if the ADX value is above a certain threshold. This helps avoid trading in weak or directionless markets. It also confirms the direction of the trend by checking the position of the DMI (+DI and -DI) lines.
Filter 2: Sideways Market (Chop Index Filter): This filter determines whether the market is excessively choppy or directionless. Using the Chop Index, this filter aims to protect against fakeouts by blocking trades when the market is highly indecisive.
Filter 3: Market Structure (Hurst Exponent Filter): This is one of the strategy's most advanced filters. It analyzes the current market behavior using the Hurst Exponent. This mathematical tool attempts to determine whether a market tends to trend (permanent), tends to revert to the mean (anti-permanent), or moves randomly. This filter ensures that signals are generated only when market structure supports trending trades.
4. Risk Management: Maximum Drawdown Protection
This strategy includes a built-in capital protection mechanism. Users can specify the percentage of their capital they will tolerate to decline from its peak. If the strategy's capital reaches this set drawdown limit, the protection feature is activated, closing all open positions and preventing new trades from being opened. This acts as an emergency brake to protect capital against unexpected market conditions.
5. Automation Ready: Customizable Webhook Alerts
The strategy is designed for traders who want to automate their signals. From the Settings menu, you can configure custom alert messages in JSON format, compatible with third-party automation services (via Webhooks).
6. Strategy Backtest Information
Please note that past performance is not indicative of future results. The published chart and performance report were generated on the 4-hour timeframe of the BTCUSD pair with the following settings:
Test Period: January 1, 2016 - October 31, 2025
Default Position Size: 15% of Capital
Pyramiding: Closed
Commission: 0.0008
Slippage: 2 ticks (Please enter the slippage you used in your own tests)
Testing Approach: The published test includes 423 trades and is statistically significant. It is strongly recommended that you test on different assets and timeframes for your own analysis. The default settings are a template and should be adjusted by the user for their own analysis.
MACD (classic) + Divergences (wicks & bodies, fast/slow)macd with divergences. Wicks + bodies. Two settings for right bar
Gold THB per Baht (XAU -> Thai baht gold)What it does
This indicator converts international gold prices (XAU) into Thai retail “baht gold” price (THB per 1 baht gold weight) in real time. It multiplies the XAU price (per troy ounce) by USD/THB and converts ounces to Thai baht-weight using the exact gram ratios.
Formula
THB per baht gold = XAU (USD/oz) × USDTHB × (15.244 / 31.1035) × (1 + Adjustment%) + FlatFeeTHB
1 troy ounce = 31.1035 g
1 Thai baht gold = 15.244 g
Conversion factor ≈ 0.490103
Key Levels: Prior Open & Close (D/W/M/Q/Y)This indicator plots the previous period's open and close levels for multiple timeframes—daily, weekly, monthly, quarterly, and yearly—on your chart. It uses Pine Script's request.security() function to pull the prior period's open and close prices for each timeframe, then draws horizontal dotted lines extending to the right at those levels. Each line is labeled and color-coded for easy distinction. These levels can help highlight potential support/resistance areas, but they are reference points only and not trading signals.
SJ WaveTrendWaveTrend Indicator – Full English Brief for TradingView
Description:
The WaveTrend Oscillator (WT) is a momentum-based indicator originally developed by LazyBear, designed to identify overbought and oversold market conditions with high precision. It is conceptually similar to the RSI and Stochastic Oscillator but uses a wave-based mathematical approach to detect turning points in price action earlier and more smoothly.
⸻
🔍 How It Works
WaveTrend analyzes the difference between price and its moving average (typically the exponential moving average of the Typical Price).
It then applies multiple layers of smoothing to filter out noise and produce two oscillating lines — WT1 (fast) and WT2 (slow).
The crossing points between WT1 and WT2 are used to identify momentum shifts:
• When WT1 crosses above WT2 from below the oversold zone → Bullish signal
• When WT1 crosses below WT2 from above the overbought zone → Bearish signal
⸻
⚙️ Core Formula Concept
The WaveTrend calculation typically follows this process:
1. Compute the Typical Price (TP) = (High + Low + Close) / 3
2. Calculate the Exponential Moving Average (EMA) of TP over a short length
3. Determine the Raw Wave (ESA) and De-trended Price Oscillator (DPO)
4. Apply double smoothing to produce the final WT1 and WT2 values
These smoothed waves behave like energy waves that expand and contract based on market volatility — hence the name WaveTrend.
⸻
📈 Interpretation
• Overbought Zone: WT values above +60 to +70
• Oversold Zone: WT values below -60 to -70
• Crossovers: WT1 crossing WT2 signals a potential trend reversal
• Divergence: When price makes a new high/low but WT does not, it signals momentum weakening
⸻
🧠 Trading Insights
• Best used on higher timeframes (H1 and above) for trend confirmation, and on lower timeframes (M15–M30) for precise entries.
• Combine with ADX, EMA Cloud, or Volume Filters to confirm real momentum shifts and avoid false signals.
• You can highlight WT Diff (WT1 - WT2) to visualize momentum expansion and contraction; large positive or negative differences often precede strong reversals.
Consecutive Gap FinderLooks for consecutive gaps based on daily chart using ATR multiplier.
Highlights them when a certain number are found.
Iani Indicator 📊 **Iani Indicator**
**Clean and simple trend direction tool**
**Description:**
Iani Indicator is a compact and easy-to-read visual tool based on EMA crossovers to identify market bias: **Buy, Sell, or Neutral**.
* The background between EMAs shows the current trend:
🟩 **Green** – bullish trend (Buy)
🟥 **Red** – bearish trend (Sell)
🟨 **Yellow** – flat / neutral zone
* Text labels “Buy”, “Sell”, or “Neutral” appear automatically when direction changes.
* Works smoothly on any timeframe – ideal for both scalping and swing trading.
**Purpose:**
To give traders a clear, noise-free view of market direction at a glance.
---
👉 Short version (for TradingView “Short Description” field):
**Simple EMA-based indicator showing Buy, Sell, or Neutral bias with clean background colors.**
Day Range Divider DTSCopied it for DTS purposes to ensure proper tracking, testing, and verification within the DTS workflow. This copy is intended for reference, analysis, and any required adjustments without affecting the original version.
Sector Relative StrengthThis indicator measures a stock's Real Relative Strength against its sector benchmark, helping you identify stocks that are outperforming or underperforming their sector peers.
The concept is based on the Real Relative Strength methodology popularized by the r/realdaytrading community.
Unlike traditional relative strength calculations that simply compare price ratios, this indicator uses a more sophisticated approach that accounts for volatility through ATR (Average True Range), providing a normalized view of true relative performance.
Key Features
Automatic Sector Detection
Automatically detects your stock's sector using TradingView's built-in sector classification
Maps to the appropriate SPDR Sector ETF (XLK, XLF, XLV, XLY, XLP, XLI, XLE, XLU, XLB, XLC)
Supports all 20 TradingView sectors
Sector ETF Mappings
The indicator automatically compares your stock against:
Technology: XLK (Technology Services, Electronic Technology)
Financials: XLF (Finance sector)
Healthcare: XLV (Health Technology, Health Services)
Consumer Discretionary: XLY (Retail Trade, Consumer Services, Consumer Durables)
Consumer Staples: XLP (Consumer Non-Durables)
Industrials: XLI (Producer Manufacturing, Industrial Services, Transportation, Commercial Services)
Energy: XLE (Energy Minerals)
Utilities: XLU
Materials: XLB (Non-Energy Minerals, Process Industries)
Communications: XLC
Default: SPY (for Miscellaneous or unclassified sectors)
Customizable Settings
Comparison Mode: Choose between automatic sector comparison or custom symbol
Length: Adjustable lookback period (default: 12)
Smoothing: Apply moving average to reduce noise (default: 3)
Visual Clarity
Green line: Stock is outperforming its sector
Red line: Stock is underperforming its sector
Zero baseline: Clear reference point for performance
Clean info box: Shows which ETF you're comparing against
How It Works
The indicator calculates relative strength using the following methodology:
Rolling Price Change: Measures the price movement over the specified length for both the stock and its sector ETF
ATR Normalization: Uses Average True Range to normalize for volatility differences
Power Index: Calculates the sector's strength relative to its volatility
Real Relative Strength: Compares the stock's performance against the sector's power index
Smoothing: Applies a moving average to reduce single-candle spikes
Formula:
Power Index = (Sector Price Change) / (Sector ATR)
RRS = (Stock Price Change - Power Index × Stock ATR) / Stock ATR
Smoothed RRS = SMA(RRS, Smoothing Length)
RSI + MFIRSI and MFI combined, width gradient fields if OS or OB, shows divergences separate for wicks and bodies, shows dots when mfi and rsi oversold at the same time.
Continuation Probability (0–100)This indicator helps measure how likely the current candle trend will continue or reverse, giving a probability score between 0–100.
It combines multiple market factors trend, candle strength, volume, and volatility to create a single, intuitive signal.
RSI + Elder Bull-Bear pressure RSI + Bull/Bear (Elder-Ray enhanced RSI)
What it is
An extended RSI that overlays Elder-Ray Bull/Bear Power on the same, zero-centered scale. You get classic RSI regime cues plus a live read of buy/sell pressure, with optional smoothing, bands, and right-edge value labels.
Key features
RSI with bands – default bands 30 / 50 / 70 (editable).
Bull/Bear Power (Elder) – ATR-normalized; optional EMA/SMA/RMA/HMA smoothing.
One-pane overlay – RSI and Bull/Bear share a common midline (RSI-50 ↔ panel 0).
Right-edge labels – always visible at the chart’s right margin with adjustable offsets.
How to read it
Cyan line = RSI (normalized)
Above the mid band = bullish regime; below = bearish regime.
Green = Bull Power, Red = Bear Power
Columns/lines above 0 show buy pressure; below 0 show sell pressure.
Smoothing reduces noise; zero-line remains your key reference.
Trade logic (simple playbook)
Entry
BUY (primary):
RSI crosses up through 50 (regime turns bullish), and
Bull (green) crosses up through 0 (buy pressure confirms).
SELL (primary):
RSI crosses down through 50, and
Bear (red) crosses down through 0 (sell pressure confirms).
Alternative momentum entries
Aggressive BUY: Bull (green) pushes above RSI-80 band (strong upside impulse).
Aggressive SELL: Bear (red) pushes below RSI-30 band (strong downside impulse).
Exits / trade management
In a long: consider exiting or tightening stops if Bear (red) dips below the 0 line (rising sell pressure) or RSI loses 50.
In a short: consider exiting or tightening if Bull (green) rises above 0 or RSI reclaims 50.
Tip: “0” on the panel is your pressure zero-line (maps to RSI-50). Most whipsaws happen near this line; smoothing (e.g., EMA 21) helps.
Defaults (on first load)
RSI bands: 30 / 50 / 70 with subtle fills.
Labels: tiny, pushed far right (large offsets).
Bull/Bear smoothing: EMA(21), smoothed line plot mode.
RSI plotted normalized so it overlaps the pressure lines cleanly.
Tighten or loosen the Bull/Bear thresholds (e.g., Bull ≥ +0.5 ATR, Bear ≤ −0.5 ATR) to demand stronger confirmation.
Settings that matter
Smoothing length/type – balances responsiveness vs. noise.
Power/RSI Gain – visual scaling only (doesn’t change logic).
Band placement – keep raw 30/50/80 or switch to “distance from 50” if you prefer symmetric spacing.
Label offsets – move values clear of the last bar/scale clutter.
Good practices
Combine with structure/ATR stops (e.g., 1–1.5× ATR, swing high/low).
In trends, hold while RSI stays above/below 50 and the opposite pressure line doesn’t dominate.
In ranges, favor signals occurring near the mid band and take profits at the opposite band.
Disclaimer: This is a research/visual tool, not financial advice at any kind. Test your rules on multiple markets/timeframes and size positions responsibly.
Prev Daily Closes — Prev1 & Prev2 (intraday) RAJESH MAYEKARit gives last 2 days close line. when last 2 days close broke you get momentum for BTST
Altseason Probability (BTC.D • USDT • TOTAL3 • DXY)Testing phase, workig out the kinks.
Works by aggregating several factors to define altseason probability in any given moment
Candle Breakout StrategyShort description (one-liner)
Candle Breakout Strategy — identifies a user-specified candle (UTC time), draws its high/low range, then enters on breakouts with configurable stop-loss, take-profit (via Risk:Reward) and optional alerts.
Full description (ready-to-paste)
Candle Breakout Strategy
Version 1.0 — Strategy script (Pine v5)
Overview
The Candle Breakout Strategy automatically captures a single "range candle" at a user-specified UTC time, draws its high/low as a visible box and dashed level lines, and waits for a breakout. When price closes above the range high it enters a Long; when price closes below the range low it enters a Short. Stop-loss is placed at the opposite range boundary and take-profit is calculated with a user-configurable Risk:Reward multiplier. Alerts for entries can be enabled.
This strategy is intended for breakout style trading where a clearly defined intraday range is established at a fixed time. It is simple, transparent and easy to adapt to multiple symbols and timeframes.
How it works (step-by-step)
On every bar the script checks the current UTC time.
When the first bar that matches the configured Target Hour:Target Minute (UTC) appears, the script records that candle’s high and low. This defines the breakout range.
A box and dashed lines are drawn on the chart to display the range and extended to the right while the range is active.
The script then waits for price to close outside the box:
Close > Range High → Long entry
Close < Range Low → Short entry
When an entry triggers:
Stop-loss = opposite range boundary (range low for longs, range high for shorts).
Take-profit = entry ± (risk × Risk:Reward). Risk is computed as the distance between entry price and stop-loss.
After entry the range becomes inactive (waitingForBreakout = false) until the next configured target time.
Inputs / Parameters
Target Hour (UTC) — the hour (0–23) in UTC when the range candle is detected.
Target Minute — minute (0–59) of the target candle.
Risk:Reward Ratio — multiplier for computing take profit from risk (0.5–10). Example: 2 means TP = entry + 2×risk.
Enable Alerts — turn on/off entry alerts (string message sent once per bar when an entry occurs).
Show Last Box Only (internal behavior) — when enabled the previous box is deleted at the next range creation so only the most recent range is visible (default behavior in the script).
Visuals & On-chart Info
A semi-transparent blue box shows the recorded range and extends to the right while active.
Dashed horizontal lines mark the range high and low.
On-chart shapes: green triangle below bar for Long signals, red triangle above bar for Short signals.
An information table (top-right) displays:
Target Time (UTC)
Active Range (Yes / No)
Range High
Range Low
Risk:Reward
Alerts
If Enable Alerts is on, the script sends an alert with the following formats when an entry occurs:
Long alert:
🟢 LONG SIGNAL
Entry Price:
Stop Loss:
Take Profit:
Short alert:
🔴 SHORT SIGNAL
Entry Price:
Stop Loss:
Take Profit:
Use TradingView's alert dialog to create alerts based on the script — select the script’s alert condition or use the alert() messages.
Recommended usage & tips
Timeframe: This strategy works on any timeframe but the definition of "candle at target time" depends on the chart timeframe. For intraday breakout styles, use 1m — 60m charts depending on the session you want to capture.
Target Time: Choose a time that is meaningful for the instrument (e.g., market open, economic release, session overlap). All times are handled in UTC.
Position Sizing: The script’s example uses strategy.percent_of_equity with 100% default — change default_qty_value or strategy settings to suit your risk management.
Filtering: Consider combining this breakout with trend filters (EMA, ADX, etc.) to reduce false breakouts.
Backtesting: Always backtest over a sufficiently large and recent sample. Pay attention to slippage and commission settings in TradingView’s strategy tester.
Known behavior & limitations
The script registers the breakout on close outside the recorded range. If you prefer intrabar breakout rules (e.g., high/low breach without close), you must adjust the condition accordingly.
The recorded range is taken from a single candle at the exact configured UTC time. If there are missing bars or the chart timeframe doesn't align, the intended candle may differ — choose the target time and chart timeframe consistently.
Only a single active position is allowed at a time (the script checks strategy.position_size == 0 before entries).
Example setups
EURUSD (Forex): Target Time 07:00 UTC — captures London open range.
Nifty / Index: Target Time 09:15 UTC — captures local session open range.
Crypto: Target Time 00:00 UTC — captures daily reset candle for breakout.
Risk disclaimer
This script is educational and provided as-is. Past performance is not indicative of future results. Use proper risk management, test on historical data, and consider slippage and commissions. Do not trade real capital without sufficient testing.
Change log
v1.0 — Initial release: range capture, box and level drawing, long/short entry by close breakout, SL at opposite boundary, TP via Risk:Reward, alerts, info table.
If you want, I can also:
Provide a short README version (2–3 lines) for the TradingView “Short description” field.
Add a couple of suggested alert templates for the TradingView alert dialog (if you want alerts that include variable placeholders).
Convert the disclaimer into multiple language versions.






















