50% Fib Trend Cloud + ATR BandsThis indicator plots two structural 50% fibonacci midpoints from recent confirmed 'left/right' swings that form a *cloud* of equilibrium, then adds a rolling 50% fibonacci range midpoint based on a lookback window that's wrapped in ATR bands. Importantly, it solves a specific trading problem:
Structural midpoints (macro context) are powerful but can lag when price escapes prior ranges. Enter rolling 50% fib + ATR ➡️ which restores real-time balance & tolerance (micro context). Together they show where price is balanced structurally, where it’s balanced right now, and how much volatility to tolerate before acting.
➖➖➖
🔑 Why this is different
Most tools either draw a single midpoint (ex., daily 50%) or ATR bands around a moving average. This script fuses dual swing-based 50% midpoints (structure) + a rolling 50% with ATR (flow), so you don’t lose context when price escapes prior ranges. The cloud tells you who’s in control (fast vs. slow structure). The rolling 50% + ATR tells you how far is “too far” now.
➖➖➖
🧠 What it does (at a glance)
🔸Structural Equilibrium × 2 (Fib1/Fib2)
Two independent 50% midpoints formed from swing pivots (configurable Left/Right bars + optional smoothing). Their gap is the Midpoint Cloud = structural “fair value” zone.
🔸Rolling 50% + ATR Bands
A rolling highest/lowest window computes an always-current 50% rolling midpoint plot; ±ATR × length envelopes define a soft value area and over-stretch boundaries.
🔸Actionable Visuals
Optional fill between Fib1/Fib2, labels, and candle-overlay modes to instantly read regime (above both / below both / between).
🔸Smart Defaults
Timeframe-aware presets for L/R pivots & smoothing; full manual overrides available.
➖➖➖
⚙️ Calculations (plain-English)
🔸Pivot midpoints (Fib1 & Fib2):
1) Detect a swing using `Left/Right` bars
2) Take the swing’s high/low → compute 50%
3) (Optional) Smooth the line (SMA) to stabilize on noisy TFs
4) Repeat with a different sensitivity to get two distinct midpoints
🔸Rolling midpoint:
Highest High / Lowest Low over the last *N* bars → (HH + LL) / 2
🔸ATR levels:
`Upper = Rolling50 + ATR × Mult`, `Lower = Rolling50 − ATR × Mult`
(Typical: ATR length 14–21; Multipliers 2.236 for L1, 5.382 for L2)
➖➖➖
🤖 Auto-Configured Presets (with Manual Override)
💡Goal: make the midpoints “just work” on common timeframes while still letting you dial them in.
💡How Auto Presets work
When Auto Presets = ON, the script picks sensible L/R/S (Left bars / Right bars / Smoothing) for Fib Trend 1 and Fib Trend 2 based on chart timeframe.
🔸Fib 1 (fast) emphasizes *micro-structure* for quicker bias shifts.
🔸Fib 2 (slow) emphasizes *macro-structure* for anchor/bias context.
These defaults keep Fib 1 responsive without jitter and Fib 2 stable without lag.
➡️ Turn Auto Presets = OFF to take full control with the manual inputs described below.
➖➖➖
🛠 Manual Fib Midpoint Settings (when Auto = OFF)
💡Each midpoint uses three knobs:
🔸Pivot Left (L): bars to the left that must be lower/higher to qualify a swing
🔸Pivot Right (R): bars to the right that must be lower/higher to confirm the swing
🔸Smoothing (S): SMA period applied to the raw 50% midpoint (stabilizes noise)
5-Minute optimized defaults
🔸Fib Trend 1: `L21 / R5 / S55` → responsive local structure (entries/exits, re-balancing zones)
🔸Fib Trend 2: `L55 / R13 / S89` → broader structure (trend context, anchors/stops)
Timeframe guidance
🔸1m–3m: may feel a touch laggy → consider ~`L13 / R3 / S34`
🔸15m–1h: defaults remain strong → optionally ~`L34 / R8 / S89`
🔸4h+ : increase span for stability → `L89–144 / R13–21 / S144–233`
➡️ Rule of thumb: shorter L/R = faster detection, longer S = smoother line. Tune until Fib 1 captures the “active swing” and Fib 2 captures the “dominant swing” without whipsaw.
➖➖➖
🎛 Inputs (quick reference)
🔸Fib Trend 1/2: Source (High/Low/Close), Left/Right bars, Smoothing length, Show/Hide, Cloud fill toggle
🔸Rolling 50%: Lookback length, Price basis (Wicks/Close/HLC3/OHLC4), Plot scope (Full / Last N / None)
🔸ATR Bands: ATR length, Multipliers (L1/L2), Plot scope, Line width/colors
🔸Overlay & Labels: Candle overlay mode, Label padding/size, 50% centerline toggle, Plot widths
➖➖➖
🖍️ Candle Coloring & Overlay Modes
💡Purpose: make trend instantly visible on the candles and ATR levels.
1) Color Logic (dropdown)
🔸 Fib Midpoints — Colors by position of price vs. Fib 1 & Fib 2
🔸ATR Zones — Colors by which ATR zone price is in relative to the Rolling 50%
➡️ Price Reference: Choose the input used for the decision (Close, HL2, OHLC3, OHLC4).
➡️Tip: Close is crisp; HL2/OHLC variants are smoother.
2) Overlay Style (dropdown)
🔸 None — No visual change to candles
🔸 Bar Color — Uses `barcolor()` to tint built-in candles (this takes into account your Trading View settings, for instance if you have wicks set to white, they will show up as white with this setting)
🔸 PlotCandles — Draws unified custom candles (body, wick, border) with the same color for maximum clarity
💡Practical use
🔸 Pick Fib Midpoints to read structural bias at a glance (above/below/between the cloud).
🔸 Pick ATR Zones to read value vs. stretch around the Rolling 50% (mean-reversion vs. trend extension).
➖➖➖
📘 How to use
A) Trend confirmation
- Strong bullish bias when price holds above both structural mids; strong bearish when below both.
- Use the Rolling 50% + ATR as a dynamic re-entry zone: pullbacks that respect ATR(L1) often continue the prevailing trend.
B) Transition / mean reversion
- Inside the Cloud (between Fib1 & Fib2) treat behavior as neutralization/re-balancing; range tactics tend to outperform momentum plays.
- In ranges, fades near ±ATR around the rolling 50% can mark short-term edges.
C) Breakout context
- When price leaves the Cloud, the Rolling 50% keeps you anchored so price never feels “floating.” A clean hold outside ATR(L1/L2) suggests regime strength; quick re-entries hint at traps.
➖➖➖
🖼 Chart examples
➡️ Each snapshot shows how the Cloud (structure) and the Rolling 50% + ATR (flow) work together.
1) 1-Minute Downtrend – Cloud as Dynamic Ceiling
- The Cloud slopes down; pullbacks repeatedly fail under the Cloud’s underside.
- Rolling 50% (dashed mid) + ATR(L1) act as a reversion band: rallies stall near upper ATR and rotate lower.
2) 15-Minute Persistent Drift – Structure Guides, Flow Times Entries
- Long drift lower with Cloud overhead.
- Consolidations near the rolling mid resolve in the trend direction; ATR bands frame risk on each attempt.
3) 15-Minute Uptrend (BTC) – From Cloud Escape to Value Stair-Step
- After escaping the prior Cloud, rolling 50% + ATR establish a new higher value area.
- Pullbacks into ATR(L1) produce orderly stair-steps; Cloud remains supportive on deeper dips
4) 5-Minute BTC – Pullback to Value then Rotate
- Strong leg up; retrace tags lower ATR band and rotates back toward the rolling mid.
- Labels (Fib1/Fib2) make the structural context explicit for decision-making.
➖➖➖
🧪 Starter presets
- Intraday (5–15m): Fib1 ~ L21/R5 (smooth 5), Fib2 ~ L55/R13 (smooth 9) • Rolling = 55 • ATR = 14 • L1 = 2.5x, L2 = 5.0x
- Scalping: Shorten lookbacks & smoothing; keep ATR multipliers similar, or tighten L1.
- Swing: Lengthen all lookbacks; consider ATR length 21–28.
➖➖➖
🏁Final Word
This script is not just a visual tool, it’s a complete trend and structure framework. Whether you're looking for clean trend alignment, dynamic support/resistance, or early warning signs of a reversal, this system is tuned to help you react with confidence — not hindsight.
Rembember, no single indicator should be used in isolation. For best results, combine it with price action analysis, higher-timeframe context, and complementary tools like trendlines, moving averages etc Use it as part of a well-rounded trading approach to confirm setups — not to define them alone.
---
💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.
真实波动幅度均值(ATR)
Rolling Midpoint of Price & VWAP with ATR BandsThe Rolling Midpoint of Price & VWAP with ATR Bands indicator is a dual-equilibrium concept that fuses price-range structure and traded-volume flow into one continuously updating hybrid model. Traditional VWAPs reset each session and reflect where trading occurred by volume, while midpoints used here reveal where price has structurally balanced between extremes. This script merges both ideas into a cohesive, dynamic system. The Rolling Price Midpoint (50 % of range) represents the structural fair-value line, calculated as the average of the highest high and lowest low over a selected window. The Rolling VWAP (Volume-Weighted Window) tracks the flow-based fair-value line by weighting each bar’s typical price by its volume. Together, these components form the Hybrid Equilibrium — the adaptive center of gravity that shifts as price and volume evolve. Surrounding this equilibrium, ATR Bands at ± 2.226 ATR and ± 5.382 ATR define volatility envelopes that expand and contract with market energy. The result is a living cloud that breathes with the market: compressing during phases of balance and widening during impulsive movements, offering traders a clear visual framework for understanding equilibrium, volatility, and directional bias in real time.
➖
⚙️ Auto-Preset System
The Auto-Preset System intelligently adjusts lookback windows for both the Price Midpoint and VWAP calculations according to the active chart timeframe.
This ensures that the indicator automatically adapts to any trading style — from scalping on 1-minute charts to swing trading on daily or weekly charts — without manual tuning.
🔹 How It Works
When Auto-Preset mode is enabled, the script dynamically selects the most effective lookback lengths for each timeframe.
These presets are optimized to balance responsiveness and stability, maintaining consistent real-world coverage (e.g., the same approximate duration of price data) across all intervals.
📊 Preset Mapping Table
| Chart Timeframe | Price Midpoint Lookback | VWAP Lookback |
|:----------------:|:-----------------------:|:--------------:|
| 1–3m | 13 bars | 21 bars
| 5–10m | 21 bars | 34 bars
| 15–30m | 34 bars | 55 bars
| 1–2 hr | 55 bars | 89 bars
| 4 hr-1D | 89 bars | 144 bars
| 1W | 144 bars | 233 bars
| 1M | 233 bars | 377 bars
⚡ Notes & Customization
- Manual Override: Turn off Auto-Preset Mode to specify your own custom lookback lengths.
- Consistency Across Scales: These adaptive values keep the indicator visually coherent when switching between timeframes — avoiding distortions that can occur with static lengths.
- Practical Benefit: Traders can maintain a single chart layout that self-tunes seamlessly, removing the need to manually recalibrate settings when shifting from short-term to long-term analysis.
In short, the Auto-Preset System is designed to make this hybrid equilibrium tool timeframe-aware — automatically scaling its logic so that the cloud behaves consistently, regardless of chart resolution.
➖
🌐 Hybrid Equilibrium Envelope
The core hybrid midpoint acts as the mean of structural (price) and volumetric (VWAP) balance.
ATR-based bands project natural expansion zones:
🔸+2.226 / –2.226 ATR → inner equilibrium (controlled trend)
*🔸+5.382 / –5.382 ATR → outer volatility extension (over-stretch / reversion zones)
Color-coded fills show regime strength:
* 🟧 Upper Outer (+5.382) – strong bullish expansion
* 🟩 Upper Inner (+2.226) – trending equilibrium
* 🔴 Lower Inner (–2.226) – mild bearish control
* 🟣 Lower Outer (–5.382) – volatility exhaustion
➖
🧭 Higher-Timeframe Framework
Two macro anchors — Price length of 144 and VWAP length of 233 — outline higher-timeframe bias zones. These help confirm when local momentum aligns with (or fades against) long-term structure.
Labels on the right show active lookback values for quick readout:
`$(13) V(21)` → current rolling pair
`$144 / V233` → macro anchors
➖
🧩 Chart Examples
**AMD 15m (Equilibrium Expansion)**
Price steadily rides above the hybrid midpoint as teal and orange (bullish) ATR zones widen, confirming a phase of controlled bullish volatility and healthy trend expansion.
BTCUSD 1m (Volatility Compression)
Bitcoin coils tightly inside the teal-to-maroon equilibrium bands before breaking out.
The hybrid midpoint flattens and ATR envelopes contract, signaling a state of balance before volatility expansion.
ETHUSD 15m (Transition from Compression → Impulse)
Ethereum transitions from purple-zone compression into a clear upper-band expansion.
The hybrid midpoint breaks above the macro VWAP 233, confirming the shift from equilibrium to directional momentum.
SOFI 1m (Micro Bias Reversal)
SOFI’s intraday structure flips as price reclaims the hybrid midpoint.
The macro VWAP 233 flattens, signaling a transition from oversold lower bands back toward equilibrium and early trend recovery.
➖
🎯 How to Use
1. Bias Detection – Price > Hybrid Midpoint → bullish; < → bearish.
2. Volatility Gauge – Watch band spacing for compression / expansion cycles.
3. Confluence Checks – Align Hybrid Midpoint with HTF 233 VWAP for strong continuation signals.
4. Mean Reversion Zones – Outer bands highlight areas where probability of snap-back increases.
➖
🔧 Inputs & Customization
Auto Presets toggle
🔸Manual Lookback Overrides** for fine-tuning
🔸Plot Window Length** (show recent vs full history)
🔸ATR Sensitivity & Fill Opacity** controls
🔸Label Padding / Font Size** for cleaner overlay visuals
➖
🧮 Formula Highlights
➖Rolling Midpoint = (highest(high,N) + lowest(low,N)) / 2
➖Rolling VWAP = Σ(Typical Price×Vol) / Σ(Vol)
➖Hybrid = (PriceMid + VWAP) / 2
➖Upper₂ = Hybrid + ATR×2.226
➖Lower₂ = Hybrid − ATR×2.226
➖Upper₅ = Hybrid + ATR×5.382
➖Lower₅ = Hybrid − ATR×5.382
➖
🎯 Ideal For
➡️ Traders who want adaptive fair-value zones that evolve with both price and volume.
➡️ Analysts who shift between scalping, swing, and position timeframes, and need a tool that self-adjusts.
➡️ Those who rely on visual structure clarity to confirm setups across changing volatility conditions.
➡️ Anyone seeking a hybrid model that unites structural range logic (midpoint) and flow-based balance (VWAP).
➖
🏁 Final Word
This script is more than a visual overlay — it’s a complete trend and structure framework built to adapt with market rhythm. It helps traders visualize equilibrium, momentum, and volatility as one cohesive system. Whether you’re seeking clean trend alignment, dynamic support/resistance, or early warning signs of reversals, this indicator is tuned to help you react with confidence — not hindsight.
➖
Remember — no single indicator should ever stand alone. For best results, pair it with price action context, higher-timeframe structure, and complementary tools such as moving averages or trendlines. Use it to confirm setups, not define them in isolation.
💡 Turn logic into clarity, structure into trades, and uncertainty into confidence.
Dynamic ATR Based TP/SL Simple tool for creating the stop loss and take profit targets multiplied by ATR value.
Trader Assistant 2Title
Trader Assistant 2 — Multi‑Timeframe ATR Volatility and Intrabar Range Monitor
Summary
Trader Assistant 2 is a compact, multi‑timeframe dashboard that helps you instantly gauge market conditions across 1m, 5m, 15m, 30m, 1h, and 4h. It blends two ATR‑based views:
- Volatility regime: current ATR vs its baseline (ATR moving average).
- Intrabar range usage: how much of ATR the current bar has already traveled from its open.
Each timeframe is color‑coded by the worst of the two signals, so you see risk and heat at a glance. An optional lead cell summarizes active alerts and lists the timeframes that triggered them.
What you see on the chart
- Single‑row table positioned at the bottom‑right of the chart.
- One cell per enabled timeframe:
- Green (soft): normal conditions
- Orange: elevated risk/volatility
- Red: high/critical risk/volatility
- Text turns white when a warning/critical condition is present
- Optional “alert” cell on the left:
- Yellow when any warning is present
- Red when any critical condition is present
- Message indicates which timeframes fired due to Volatility and/or ATR usage (e.g., “Volatility (5m, 15m) | ATR (1m)”)
How it works (high level)
- Volatility regime: compares current ATR to a smoothed ATR baseline. If the ratio exceeds your Elevated or High thresholds, the timeframe escalates to orange or red.
- Intrabar ATR usage: measures absolute distance from the bar’s open. If the move exceeds your Yellow or Red percentage of ATR, the timeframe escalates accordingly.
- Combined color: the cell shows the highest severity between the two checks.
Mermaid (logic overview)
flowchart LR
A --> B
B --> C
C --> D{Vol Severity(Normal/Elevated/High)}
E --> F
F --> G{ATR Usage Severity(Normal/Yellow/Red)}
D --> H
G --> H
H --> I
H --> J
Inputs and defaults
- Timeframe toggles: 1m, 5m, 15m, 30m, 1h, 4h (enable/disable any mix)
- ATR periods per timeframe (defaults):
- 1m: 60
- 5m: 24
- 15m: 16
- 30m: 14
- 1h: 12
- 4h: 12
- ATR baseline smoothing:
- Moving average period: 20 (used to compare current ATR vs average)
- Volatility thresholds (percent of baseline):
- Elevated: 80%
- High: 120%
- Intrabar ATR usage thresholds:
- Yellow: 50% of ATR
- Red: 75% of ATR
Typical use cases
- Session open scan: Quickly see where heat is building and which timeframes require caution.
- News and high‑impact events: Identify heightened conditions before entering or managing positions.
- Trade filtering: Avoid entries during red conditions or tighten risk; favor normal/green regimes for cleaner structure.
- Risk sizing: Reduce size or switch to passive management when multiple timeframes show elevated/high conditions.
Tips and best practices
- Threshold tuning: Different markets/venues need different percentages. Start with defaults, then adjust to your symbol’s volatility.
- Baseline smoothing: Increase the MA period to reduce noise in the volatility regime.
- Multi‑TF alignment: When higher timeframes turn orange/red, treat lower‑TF signals with extra caution.
- Combine with structure and volume tools for a complete decision framework.
Notes and limitations
- Visual monitor: This is an on‑chart dashboard/visual alert. It does not emit TradingView alert() notifications.
- Multi‑timeframe behavior: Values update according to each source timeframe’s bar closes.
- Strategy‑agnostic: This does not generate buy/sell signals. Use it for context, regime awareness, and risk control.
- Educational only: Not financial advice. Always backtest and validate on your own instruments.
Color legend
- Green: Normal conditions
- Orange: Elevated volatility and/or significant intrabar range usage
- Red: High/critical conditions (exercise caution)
- Yellow alert cell: Warning present in at least one timeframe
- Red alert cell: Critical condition present in at least one timeframe
Quick start
1) Add the indicator to your chart.
2) Enable the timeframes relevant to your trading horizon.
3) Keep defaults or tune ATR periods and thresholds to your symbol.
4) Read the row from left to right: alert cell (if present), then timeframes. Prioritize management when you see orange/red, and be selective with entries during heat.
Trader AssistantDescription of the "Trader Assistant" indicator
Overview
- Trader Assistant is a comprehensive TradingView indicator (Pine Script v5) that combines volatility analysis (ATR), trading volume monitoring, and signal generation to support decision-making.
Core components
1) ATR (Average True Range) calculation
- Uses a custom daily ATR function (Trader-Assistant.pine:86)
- Daily timeframe enforcement via (Trader-Assistant.pine:107), independent of the current chart timeframe
- Configurable ATR length (default 5 bars)
2) ATR exhaustion analysis
- From daily open: how much of the daily ATR the price has moved from the open, as a percentage: (Trader-Assistant.pine:156)
- From daily extremes: percentage of the daily high–low range covered: (Trader-Assistant.pine:159)
3) Trading signals
- Long signal (💪) when ATR exhaustion is below the long threshold (default 30%)
- Short signal (✋) when ATR exhaustion is above the short threshold (default 70%)
- Color coding: green for long, red for short
4) Risk management levels
- From daily Open:
- Maximum: (Trader-Assistant.pine:166)
- Minimum: (Trader-Assistant.pine:167)
- Stop-loss: percentage of daily ATR (default 10%)
- Take-profit: multiple of stop-loss (default 4x)
- Slippage: percentage of stop-loss (default 10%)
- From daily High/Low:
- Maximum: (Trader-Assistant.pine:162)
- Minimum: (Trader-Assistant.pine:163)
- Intra-day granularity via 5-minute ATR: (Trader-Assistant.pine:170) over 30 bars, with corresponding SL/TP/slippage derived from it
5) Volume analysis
- Daily notional volume is built by summing 24 hourly bars: (Trader-Assistant.pine:142)
- Human-friendly K/M/B formatting of numbers
- Liquidity filter: line turns red when volume is below the configurable threshold (default 30M)
- Optional display toggle
Visualization
Table content (bottom-left of the chart), three columns:
- Columns: label, “From Open”, “From High/Low”
- Rows:
- Today’s maximum with ATR: “From Open” vs “From Low”
- Stop-loss: daily ATR vs 5-minute ATR
- Take-profit: daily ATR vs 5-minute ATR
- Slippage: daily ATR vs 5-minute ATR
- Today’s minimum with ATR: “From Open” vs “From High”
- Day volume (optional): value and color-coded sufficiency
- ATR value
- ATR exhaustion: percentage with emoji signal in both columns
Display settings and color cues
- Adjustable font size (0–3)
- Blue for max/min rows
- Green/red for signal rows
- Red for insufficient volume
Configurable inputs
ATR:
- Number of bars for ATR
- Upper/lower deviation limits for outlier handling (as inputs)
- Stop-loss size (% of daily ATR)
- Take-profit multiplier
- Slippage as % of stop-loss
Signals:
- Long threshold (% ATR exhaustion)
- Short threshold (% ATR exhaustion)
Volume:
- Toggle display
- Average period and averaging type (inputs exist; not used in current calculations)
- Minimum day volume threshold (in millions)
Technical notes
- Multi-timeframe aggregation via (Trader-Assistant.pine:107) for daily and 5-minute data
- Tick-accurate formatting with (Trader-Assistant.pine:34) and (Trader-Assistant.pine:37)
- Direct hourly summation for daily volume for simplicity and clarity: (Trader-Assistant.pine:142)
- Table adapts the number of rows based on whether volume is shown
Intended use
- Intraday trading: identify entry timing based on daily ATR exhaustion
- Risk management: automatic SL/TP/slippage calculations
- Trade filtering: ensure sufficient liquidity before acting
- Volatility assessment: track current movement relative to average daily range
Risk Recommender — (Heatmap)📊 Risk Recommender — Per-Trade & Annualized (Heatmap Columns)
Estimate the optimal risk percentage for any market regime.
This tool dynamically recommends how much of your account equity to risk — either per trade or at a portfolio (annualized) level — using volatility as the guide.
⚙️ How it works
Two distinct modes give you flexibility:
1️⃣ Per-Trade (ATR-based)
• Calculates the current Average True Range (ATR) compared to its long-term baseline.
• When volatility is high (ATR ↑), risk per trade decreases to maintain constant dollar risk.
• When volatility is low (ATR ↓), risk per trade increases within your defined floor and ceiling.
• The display is normalized by stop distance (× ATR) and smoothed to avoid noise.
2️⃣ Annualized (Volatility Targeting)
• Computes realized volatility (standard deviation of log returns) and an EWMA forecast of future volatility.
• Blends current and forecast volatilities to estimate “effective” volatility.
• Scales your base risk so that portfolio volatility converges toward your chosen annual target (e.g., 20%).
• Useful for portfolio-level or systematic strategies that maintain constant volatility exposure.
🎨 Heatmap Visualization
The vertical column graph acts like a thermometer:
• 🟥 Red → “Reduce risk” (volatility high).
• 🟩 Green → “Increase risk” (volatility low).
• Smoothed and bounded between your Floor and Ceiling risk levels.
• Optional dotted guides mark those bounds.
• Label shows the current mode, recommended risk %, and key metrics (ATR ratio or effective volatility).
🔧 Key Inputs
• Base max risk per trade (%) — your normal per-trade risk budget.
• ATR length / Baseline ATR length — control sensitivity to short- vs. long-term volatility.
• Target annualized volatility (%) — portfolio volatility target for quant mode.
• λ (lambda) — smoothing factor for the EWMA volatility forecast (0.90–0.99 typical).
• Floor & Ceiling — clamps the output to avoid extreme sizing.
• Smoothing & Hysteresis — prevent rapid changes in risk recommendations.
🧮 Interpreting the Output
• “Recommended Risk (%)” = suggested portion of equity to risk on the next trade (or current exposure).
• In Per-Trade mode: reflects current ATR ÷ baseline ATR .
• In Annualized mode: reflects target volatility ÷ effective volatility .
• Use the color and height of the column as a quick visual cue for aggressiveness.
💡 Typical Use Cases
• Position-sizing overlay for discretionary traders.
• Volatility-targeting component for algorithmic or multi-asset systems.
• Educational tool to understand how volatility governs prudent risk management.
📘 Notes
• This indicator provides risk suggestions only ; it does not place trades.
• Works on any symbol or timeframe.
• Combine with your own strategy or alerts for full automation.
• All calculations use built-in Pine functions; no proprietary logic.
Tags:
#RiskManagement #ATR #Volatility #Quant #PositionSizing #SystematicTrading #AlgorithmicTrading #Portfolio #TradingStrategy #Heatmap #EWMA #Risk
Trend following system with ADR and volumeSystem 1 — Trend Flip Strategy
System 1 is a simple trend-following strategy that enters on a bullish EMA flip and exits when the trend weakens or reverses. It’s built to catch clean moves and avoid chop.
Uses fast and slow EMAs with ATR filtering to detect real momentum
Enters long on a bullish flip
Exits on a bearish flip or neutral zone (optional)
Clear signals with easy-to-read entry and exit markers
Great for trending markets and momentum setups
Tip: Test across multiple timeframes and pair with volume or higher-timeframe confluence for stronger signals.
Session-Conditioned Regime ATRWhy this exists
Classic ATR is great—until the open. The first few bars often inherit overnight gaps and 24-hour noise that have nothing to do with the intraday regime you actually trade. That inflates early ATR, scrambles thresholds, and invites hyper-recency bias (“today is crazy!”) when it’s just the open being the open.
This tool was built to:
Separate session reality from 24h noise. Measure volatility only inside your defined session (e.g., NYSE 09:30–16:00 ET).
Judge candles against the current regime, not the last 2–3 bars. A rolling statistic from the last N completed sessions defines what “typical” means right now.
Label “large” and “small” objectively. Bars are colored only when True Range meaningfully departs from the session regime—no gut feel, no open-bar distortion (gap inclusion optional).
Overview
Purpose: objectively identify unusually big or small candles within the active trading session, compared to the recent session regime.
Use cases: volatility filters, entry/exit confirmation, session bias detection, adaptive sizing.
This indicator replaces generic ATR with a session-conditioned, regime-aware measure. It colors candles only when their True Range (TR) is abnormally large/small versus the last N completed sessions of the same session window.
How it works
Session gating: Only bars inside the selected session are evaluated (presets for NYSE, CME RTH, FX NY; custom supported).
Per-bar TR: TR = max(high, prevRef) − min(low, prevRef).
prevRef is the prior close for in-session bars.
First bar of the session can include the overnight gap (optional; default off).
Regime statistic: For any bar in session k, aggregate all in-session TRs from the previous N completed sessions (k−N … k−1), then compute Median (default) or Mean.
Today’s anchor: Running statistic from today’s session start → current bar (for context and the on-chart ratio).
Color logic:
Big if TR ≥ bigMult × RegimeStat
Small if TR ≤ smallMult × RegimeStat
Colored states: big bull, big bear, small bull, small bear.
Non-triggering bars retain the chart’s native colors.
Panel (top-right by default)
Regime ATR (Nd): session-conditioned statistic over the past N completed sessions.
Today ATR (anchored): running statistic for the current session.
Ratio (Today/Regime): intraday volatility vs regime.
Sample size n: number of bars used in the regime calculation.
Inputs
Session Preset: NYSE (09:30–16:00 ET), CME RTH (08:30–15:00 CT), FX NY (08:00–17:00 ET), Custom (session + IANA timezone).
Regime Window: number of completed sessions (default 5).
Statistic: Median (robust) or Mean.
Include Open Gap: include overnight gap in the first in-session bar’s TR (default off).
Big/Small thresholds: multipliers relative to RegimeStat (defaults: Big=1.5×, Small=0.67×).
Colors: four independent colors for big/small × bull/bear.
Panel position & text size.
Hidden outputs: expose RegimeStat, TodayStat, Ratio, and Z-score to other scripts.
Alerts
RegimeATR: BIG bar — triggers when a bar meets the “Big” condition.
RegimeATR: SMALL bar — triggers when a bar meets the “Small” condition.
Hidden outputs (for strategies/screeners)
RegimeATR_stat, TodayATR_stat, Today_vs_Regime_Ratio, BarTR_Zscore.
Notes & limitations
No look-ahead: calculations only use information available up to that bar. Historical colors reflect what would have been known then.
Warm-up: colors begin once there are at least N completed sessions; before that, regime is undefined by design.
Changing inputs (session window, multipliers, median/mean, gap toggle) recomputes the full series using the same rolling regime logic per bar.
Designed for standard candles. Styling respects existing chart colors when no condition triggers.
Practical tips
For a broader or tighter notion of “unusual,” adjust Big/Small multipliers.
Prefer Median in markets prone to outliers; use Mean if you want Z-score alignment with the panel’s regime mean/std.
Use the Ratio readout to spot compression/expansion days quickly (e.g., <0.7× = compressed session, >1.3× = expanded).
Roadmap
More session presets:
24h continuous (crypto, index CFDs).
23h/Globex futures (CME ETH with a 60-minute maintenance break).
Regional equities (LSE, Xetra, TSE), Asia/Europe/NY overlaps for FX.
Half-day/holiday templates and dynamic calendars.
Multi-regime comparison: track multiple overlapping regimes (e.g., RTH vs ETH for futures) and show separate stats/ratios.
Robust stats options: trimmed mean, MAD/Huber alternatives; optional percentile thresholds instead of fixed multipliers.
Subpanel visuals: rolling TodayATR and Ratio plots; optional Z-score ribbon.
Screener/strategy hooks: export boolean series for BIG/SMALL, plus a lightweight strategy template for backtesting entries/exits conditioned on regime volatility.
Performance/QOL: per-symbol presets, smarter warm-up, and finer control over sample caps for ultra-low TF charts.
Changelog
v0.9b (Beta)
Session presets (NYSE/CME RTH/FX NY/Custom) with timezone handling.
Panel enhancements: ratio + sample size n.
Four-state bar coloring (big/small × bull/bear).
Alerts for BIG/SMALL bars.
Hidden Z-score stream for downstream use.
Gap-in-TR toggle for the first in-session bar.
Disclaimer
For educational purposes only. Not investment advice. Validate thresholds and session settings across symbols/timeframes before live use.
ATR Volatility Dashboard v2 — includes % Range (Today) _gpVisualizes daily volatility in context. Shows ATR(14) as % of Daily Close, % of Current Price, and Today’s actual Range%. When % of Current ≈ % of Close → volatility has already played out.
🔹 ATR(14) (Last D) — the latest daily ATR value.
🔹 % of Daily Close — ATR as a percentage of the previous day’s close (historical volatility).
🔹 % of Current — ATR as a percentage of the current price (real-time volatility).
🔹 % of Range (v2) — today’s actual movement (High–Low) as a percentage of current price.
💡 How to interpret:
When % of Current ≈ % of Close → the daily ATR has already been reached → potential exhaustion zone.
When % of Range > % of Close → today’s volatility exceeds the average → watch for reversals or breakouts.
When % of Range < % of Close → volatility remains compressed → possible expansion setup ahead.
Dominant DATR [CHE] Dominant DATR — Directional ATR stream with dominant-side EMA, bands, labels, and alerts
Summary
Dominant DATR builds two directional volatility streams from the true range, assigns each bar’s range to the up or down side based on the sign of the close-to-close move, and then tracks the dominant side through an exponential average. A rolling band around the dominant stream defines recent extremes, while optional gradient coloring reflects relative magnitude. Swing-based labels mark new higher highs or lower lows on the dominant stream, and alerts can be enabled for swings, zero-line crossings, and band breakouts. The result is a compact pane that highlights regime bias and intensity without relying on price overlays.
Motivation: Why this design?
Conventional ATR treats all range as symmetric, which can mask directional pressure, cause late regime shifts, and produce frequent false flips during noisy phases. This design separates the range into up and down contributions, then emphasizes whichever side is stronger. A single smoothed dominant stream clarifies bias, while the band and swing markers help distinguish continuation from exhaustion. Optional normalization by close makes the metric comparable across instruments with different price scales.
What’s different vs. standard approaches?
Reference baseline: Classic ATR or a basic EMA of price.
Architecture differences:
Directional weighting of range using positive and negative close-to-close moves.
Separate moving averages for up and down contributions combined into one dominant stream.
Rolling highest and lowest of the dominant stream to form a band.
Optional normalization by close, window-based scaling for color intensity, and gamma adjustment for visual contrast.
Event logic for swing highs and lows on the dominant stream, with label buffering and pruning.
Configurable alerts for swings, zero-line crossings, and band breakouts.
Practical effect: You see when volatility is concentrated on one side, how strong that bias currently is, and when the dominant stream pushes through or fails at its recent envelope.
How it works (technical)
Each bar’s move is split into an up component and a down component based on whether the close increased or decreased relative to the prior close. The bar’s true range is proportionally assigned to up or down using those components as weights.
Each side is smoothed with a Wilder-style moving average. The dominant stream is the side with the larger value, recorded as positive for up dominance and negative for down dominance.
The dominant stream is then smoothed with an exponential moving average to reduce noise and provide a responsive yet stable signal line.
A rolling window tracks the highest and lowest values of the dominant EMA to form an envelope. Crossings of these bounds indicate unusual strength or weakness relative to recent history.
For visualization, the absolute value of the dominant EMA is scaled over a lookback window and passed through a gamma curve to modulate gradient intensity. Colors are chosen separately for up and down regimes.
Swing events are detected by comparing the dominant EMA to its recent extremes over a short lookback. Labels are placed when a prior bar set an extreme and the current bar confirms it. A managed array prunes older labels when the user-defined maximum is exceeded.
Alerts mirror these events and also include zero-line crossings and band breakouts. The script does not force closed-bar confirmation; users should configure alert execution timing to suit their workflow.
There are no higher-timeframe requests and no security calls. State is limited to simple arrays for labels and persistent color parameters.
Parameter Guide
Parameter — Effect — Default — Trade-offs/Tips
ATR Length — Smoothing of directional true range streams — fourteen — Longer reduces noise and may delay regime shifts; shorter increases responsiveness.
EMA Length — Smoothing of the dominant stream — twenty-five — Lower values react faster; higher values reduce whipsaw.
Band Length — Window for recent highs and lows of the dominant stream — ten — Short windows flag frequent breakouts; long windows emphasize only exceptional moves.
Normalize by Close — Divide by close price to produce a percent-like scale — false — Useful across assets with very different price levels.
Enable gradient color — Turn on magnitude-based coloring — true — Visual aid only; can be disabled for simplicity.
Gradient window — Lookback used to scale color intensity — one hundred — Larger windows stabilize the color scale.
Gamma (lines) — Adjust gradient intensity curve — zero point eight — Lower values compress variation; higher values expand it.
Gradient transparency — Transparency for gradient plots — zero, between zero and ninety — Higher values mute colors.
Up dark / Up neon — Base and peak colors for up dominance — green tones — Styling only.
Down dark / Down neon — Base and peak colors for down dominance — red tones — Styling only.
Show zero line / Background tint — Visual references for regime — true and false — Background tint can help quick scanning.
Swing length — Bars used to detect swing highs or lows — two — Larger values demand more structure.
Show labels / Max labels / Label offset — Label visibility, cap, and vertical offset — true, two hundred, zero — Increase cap with care to avoid clutter.
Alerts: HH/LL, Zero Cross, Band Break — Toggle alert rules — true, false, false — Enable only what you need.
Reading & Interpretation
The dominant EMA above zero indicates up-side dominance; below zero indicates down-side dominance.
Band lines show recent extremes of the dominant EMA; pushes through the band suggest unusual momentum on the dominant side.
Gradient intensity reflects local magnitude of dominance relative to the chosen window.
HH/LL labels appear when the dominant stream prints a new local extreme in the current regime and that extreme is confirmed on the next bar.
Zero-line crosses suggest regime flips; combine with structure or filters to reduce noise.
Practical Workflows & Combinations
Trend following: Consider entries when the dominant EMA is on the regime side and expands away from zero. Band breakouts add confirmation; structure such as higher highs or lower lows in price can filter signals.
Exits and stops: Tighten exits when the dominant stream stalls near the band or fades toward zero. Opposite swing labels can serve as early caution.
Multi-asset and multi-timeframe: Works across liquid assets and common timeframes. For lower noise instruments, reduce smoothing slightly; for high noise, increase lengths and swing length.
Behavior, Constraints & Performance
Repaint and confirmation: No security calls and no future-looking references. Swing labels confirm one bar later by design. Real-time crosses can change intra-bar; use bar-close alerts if needed.
Resources: `max_bars_back` is two thousand. The script uses an array for labels with pruning, gradient color computations, and a simple while loop that runs only when the label cap is exceeded.
Known limits: The EMA can lag at sharp turns. Normalization by close changes scale and may affect thresholds. Extremely gappy data can produce abrupt shifts in the dominant side.
Sensible Defaults & Quick Tuning
Starting point: ATR Length fourteen, EMA Length twenty-five, Band Length ten, Swing Length two, gradient enabled.
Too many flips: Increase EMA Length and swing length, or enable only swing alerts.
Too sluggish: Decrease EMA Length and Band Length.
Inconsistent scales across symbols: Enable Normalize by Close.
Visual clutter: Disable gradient or reduce label cap.
What this indicator is—and isn’t
This is a volatility-bias visualization and signal layer that highlights directional pressure and intensity. It is not a complete trading system and does not produce position sizing or risk management. Use it with market structure, context, and independent risk controls.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
FirstStrike Long 200 - Daily Trend Rider [KedArc Quant]Strategy Description
FirstStrike Long 200 is a disciplined, long-only momentum strategy designed for daily "strike-first" entries in trending markets. It scans for RSI momentum above a customizable trigger (default 50), confirmed by EMA trend filters, and limits you to *exactly one trade per day* to avoid overtrading. It uses ATR for dynamic risk management (1.5x stop, 2:1 RR target) and optional trailing stops to ride winners. Backtested with realistic commissions and sizing, it prioritizes low drawdowns (<1% max in tests) over aggressive gains—ideal for swing traders seeking quality setups in bull runs.
Why It's Different from Other Strategies
Unlike generic RSI crossover bots or EMA ribbon mashups that spam signals and bleed in chop, FirstStrike enforces a "one-and-done" daily gate, blending precision momentum (RSI modes with grace/sustain) with robust filters (volume, sessions, rearm dips).
How It Helps Traders
- Reduces Emotional Trading: One entry/day forces discipline—miss a setup? Wait for tomorrow. Perfect for busy pros avoiding screen fatigue.
- Adapts to Regimes: Switch modes for trends ("Cross+Grace") vs. ranges ("Any bar")—boosts win rates 5-10% in backtests on high-beta names like .
- Risk-First Design: ATR scales stops to vol capping DD at 0.2% while targeting 2R winners. Trailing option locks +3-5% runs without early exits.
- Quick Insights: Labels/alerts flag entries with RSI values; bgcolor highlights signals for visual scanning. Helps spot "first-strike" edges in uptrends, filtering ~60% noise.
Why This Is Not a Mashup
This isn't a Frankenstein of off-the-shelf indicators—while it uses standard RSI/EMA/ATR (core Pine primitives), the innovation lies in:
- Custom Trigger Engine: Switchable modes (e.g., "Cross+Grace+Sustain" requires post-cross hold) prevent perpetual signals, unlike basic `ta.crossover()`.
- Daily Rearm Gate: Resets eligibility only after a dip (if enabled), tying momentum to mean-reversion—original logic not found in common scripts.
- Per-Day Isolation: `var` vars + `ta.change(time("D"))` ensure zero pyramiding/overlaps, beyond simple session filters.
All formulae are derived in-house for "first-strike" (early RSI pops in trends), not copied from public repos.
Input Configurations
Let's break down every input in the FirstStrike Long 200 strategy. These settings let you tweak the strategy like a dashboard—start with defaults for quick testing,
then adjust based on your asset or timeframe (5m for intraday). They're grouped logically to keep things organized, and most have tooltips in the script for quick reminders.
RSI / Trigger Group: The Heart of Momentum Detection
This is where the magic starts—the strategy hunts for "upward energy" using RSI (Relative Strength Index), a tool that measures if a stock is overbought (too hot) or oversold (too cold) on a 0-100 scale.
- RSI Length: How many bars (candles) back to calculate RSI. Default is 14, like a 14-day window for daily charts. Shorter (e.g., 9) makes it snappier for fast markets; longer (21) smooths out noise but misses quick turns.
- Trigger Level (RSI >= this): The key RSI value where the strategy says, "Go time!" Default 50 means enter when RSI crosses or holds above the neutral midline. Why is this trigger required? It acts as your "green light" filter—without it, you'd enter on every tiny price wiggle, leading to endless losers. RSI above this shows building buyer power, avoiding weak or sideways moves. It's essential for quality over quantity, especially in one-trade-per-day setups.
- Trigger Mode: Picks how strict the RSI signal must be. Options: "Cross only" (exact RSI crossover above trigger—super precise, fewer trades); "Cross+Grace" (crossover or within a grace window after—gives a second chance); "Cross+Grace+Sustain" (crossover/grace plus RSI holding steady for bars—best for steady climbs); "Any bar >= trigger" (looser, any bar above—more opportunities but riskier in chop). Start with "Any bar" for trends, switch to "Cross only" for caution.
- Grace Window (bars after cross): If mode allows, how many bars post-RSI-cross you can still enter if RSI dips but recovers. Default 30 (about 2.5 hours on 5m). Zero means no wiggle room—pure precision.
- Sustain Bars (RSI >= trigger): In sustain mode, how many straight bars RSI must stay above trigger. Default 3 ensures it's not a fluke spike.
- Require RSI Dip Below Rearm Before Any Entry?: A yes/no toggle. If on, the strategy "rearms" only after RSI dips below a low level (like a breather), preventing back-to-back signals in overextended rallies.
- Rearm Level (if requireDip=true): The dip threshold for rearming. Default 45—RSI must go below this to reset eligibility. Lower (30) for deeper pullbacks in volatile stocks.
For the trigger level itself, presets matter a lot—default 50 is neutral and versatile for broad trends. Bump to 55-60 for "strong momentum only" (fewer but higher-win trades, great in bull runs like tech surges); drop to 40-45 for "early bird" catches in recoveries (more signals but watch for fakes in ranges). The optimize hint (40-60) lets you test these in TradingView to match your risk—higher presets cut noise by 20-30% in backtests.
Trend / Filters Group: Keeping You on the Right Side of the Market
These EMAs (Exponential Moving Averages) act like guardrails, ensuring you only long in uptrends.
- EMA (Fast) Confirmation: Short-term EMA for price action. Default 20 periods—price must be above this for "recent strength." Shorter (10) reacts faster to intraday pops.
- EMA (Trend Filter): Long-term EMA for big-picture trend. Default 200 (classic "above the 200-day" rule)—price above it confirms bull market. Minimum 50 to avoid over-smoothing.
Optional Hour Window Group: Timing Your Strikes
Avoid bad hours like lunch lulls or after-hours tricks.
- Restrict by Session?: Yes/no for using exact market hours. Default off.
- Session (e.g., 0930-1600 for NYSE): Time string like "0930-1600" for open to close. Auto-skips pre/post-market noise.
- Restrict by Hour Range?: Fallback yes/no for simple hours. Default off.
- Start Hour / End Hour: Clock times (0-23). Defaults 9-15 ET—focus on peak volume.
Volume Filter Group: No Volume, No Party
Confirms conviction—big moves need big participation.
- Require Volume > SMA?: Yes/no toggle. Default off—only fires on above-average volume.
- Volume SMA Length: Periods for the average. Default 20—compares current bar to recent norm.
Risk / Exits Group: Protecting and Profiting Smartly
Dynamic stops based on volatility (ATR = Average True Range) keep things realistic.
- ATR Length: Bars for ATR calc. Default 14—measures recent "wiggle room" in price.
- ATR Stop Multiplier: How far below entry for stop-loss. Default 1.5x ATR—gives breathing space without huge risk
- Take-Profit R Multiple: Reward target as multiple of risk. Default 2.0 (2:1 ratio)—aims for twice your stop distance.
- Use Trailing Stop?: Yes/no for profit-locking trail. Default off—activates after entry.
- Trailing ATR Multiplier: Trail distance. Default 2.0x ATR—looser than initial stop to let winners run.
These inputs make the strategy plug-and-play: Defaults work out-of-box for trending stocks, but tweak RSI trigger/modes first for your style.
Always backtest changes—small shifts can flip a 40% win rate to 50%+!
Outputs (Visuals & Alerts):
- Plots: Blue EMA200 (trend line), Orange EMA20 (price filter), Green dashed entry price.
- Labels: Green "LONG" arrow with RSI value on entries.
- Background: Light green highlight on signal bars.
- Alerts: "FirstStrike Long Entry" fires on conditions (integrates with TradingView notifications).
Entry-Exit Logic
Entry (Long Only, One Per Day):
1. Daily Reset: New day clears trade gate and (if required) rearm status.
2. Filters Pass: Time/session OK + Close > EMA200 (trend) + Close > EMA20 (price) + Volume > SMA (if enabled) + Rearmed (dip below rearm if toggled).
3. Trigger Fires: RSI >= trigger via selected mode (e.g., crossover + grace window).
4. Execute: Enter long at close; set daily flag to block repeats.
Exit:
- Stop-Loss: Entry - (ATR * 1.5) – dynamic, vol-scaled.
- Take-Profit: Entry + (Risk * 2.0) – fixed RR.
- Trailing (Optional): Activates post-entry; trails at Close - (ATR * 2.0), updating on each bar for trend extension.
No shorts or hedging—pure long bias.
Formulae Used
- RSI: `ta.rsi(close, rsiLen)` – Standard 14-period momentum oscillator (0-100).
- EMAs: `ta.ema(close, len)` – Exponential moving averages for trend/price filters.
- ATR: `ta.atr(atrLen)` – True range average for stop sizing: Stop = Entry - (ATR * mult).
- Volume SMA: `ta.sma(volume, volLen)` – Simple average for relative strength filter.
- Grace Window: `bar_index - lastCrossBarIndex <= graceBars` – Counts bars since RSI crossover.
- Sustain: `ta.barssince(rsi < trigger) >= sustainBars` – Consecutive bars above threshold.
- Session Check: `time(timeframe.period, sessionStr) != 0` – TradingView's built-in session validator.
- Risk Distance: `riskPS = entry - stop; TP = entry + (riskPS * RR)` – Asymmetric reward calc.
FAQ
Q: Why only one trade/day?
A: Prevents revenge trading in volatile sessions . Backtests show it cuts losers by 20-30% vs. multi-entry bots.
Q: Does it work on all assets/timeframes?
A: Best for trending stocks/indices on 5m-1H. Test on crypto/forex with wider ATR mult (2.0+).
Q: How to optimize?
A: Use TradingView's optimizer on RSI trigger (40-60) and EMA fast (10-30). Aim for PF >1.0 over 1Y data.
Q: Alerts don't fire—why?
A: Ensure `alertcondition` is enabled in script settings. Test with "Any alert() function calls only."
Q: Trailing stop too loose?
A: Tune `trailMult` to 1.5 for tighter; it activates alongside fixed TP/SL for hybrid protection.
Glossary
- Grace Window: Post-RSI-cross period (bars) where entry still allowed if RSI holds trigger.
- Rearm Dip: Optional pullback below a low RSI level (e.g., 45) to "reset" eligibility after signals.
- Profit Factor (PF): Gross profit / gross loss—>1.0 means winners outweigh losers.
- R Multiple: Risk units (e.g., 2R = 2x stop distance as target).
- Sustain Bars: Consecutive bars RSI stays >= trigger for mode confirmation.
Recommendations
- Backtest First: Run on your symbols (/) over 6-12M; tweak RSI to 55 for +5% win rate.
- Live Use: Start paper trading with `useSession=true` and `useVol=true` to filter noise.
- Pairs Well With: Higher TF (daily) for bias; add ADX (>25) filter for strong trends (code snippet in prior chats).
- Risk Note: 10% sizing suits $100k+ accounts; scale down for smaller. Not financial advice—past performance ≠ future.
- Publish Tip: Add tags like "momentum," "RSI," "long-only" on TradingView for visibility.
Strategy Properties & Backtesting Setup
FirstStrike Long 200 is configured with conservative, realistic backtesting parameters to ensure reliable performance simulations. These settings prioritize capital preservation and transparency, making it suitable for both novice and experienced traders testing on stocks.
Initial Capital
$100,000 Standard starting equity for portfolio-level testing; scales well for retail accounts. Adjust lower (e.g., $10k) for smaller simulations.
Base Currency
Default (USD) Aligns with most US equities (e.g., NASDAQ symbols); auto-converts for other assets.
Order Size
1 (Quantity) Fixed share contracts for simplicity—e.g., buys 1 share per trade. For % of equity, switch to "Percent of Equity" in strategy code.
Pyramiding
0 Orders No additional entries on open positions; enforces strict one-trade-per-day discipline to avoid overexposure.
Commission
0.1% Realistic broker fee (e.g., Interactive Brokers tier); factors in round-trip costs without over-penalizing winners.
Verify Price for Limit Orders
0 Ticks No slippage delay on TPs—assumes ideal fills for historical accuracy.
Slippage
0 Ticks Zero assumed slippage for clean backtests; real-world trading may add 1-2 ticks on volatile opens.
These defaults yield low drawdowns (<0.3% max in tests) while capturing trend edges. For live trading, enable slippage (1-3 ticks) to mimic execution gaps. Always forward-test before deploying!
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
MACD-V+ (ATR Normalized MACD)MACD-V+ is an ATR-normalized MACD tool that focuses on true turning points inside Overbought/Oversold zones. It marks a signal only when the MACD’s slope changes direction and shows real progress back toward the zero line, with an optional dwell (depth & time) filter so you don’t get faked out by shallow pokes into a zone. Clean visuals, “first-in-zone” gating, and configurable labeling make it practical for discretionary and systematic traders alike.
For best results, adjust Overbought and Oversold levels based on stock volatility. The default settings of 150 and -150 are for highly volatile tickers. Reduce for less volatile tickers.
Please help me improve the code for everyone.
Vol-Pace Projected-ATR-ADX-Alert-MAThe VolSC indicator analyzes stock volume trends with a focus on the Pace metric, which projects today's volume as a percentage of the 30-day average, highlighting unusual activity (e.g., over 200% turns bright green with alerts). The phantom projection bar, a wide green histogram to the right of the last bar, visually represents this projected volume on daily charts only, aiding quick identification of potential volume surges without cluttering intraday or weekly views. Additional features include ADX strength, ATR averages, and customizable table display for comprehensive insights.
Key Features:
* Primary Indicator: Volume with ADX (Average Directional Index) text.
* Pacing and Alerts: Calculates the volume pace for the day. Features an unusual volume alert with an adjustable threshold (e.g., 200%).
* Volume Projection: Projects a visual "Phantom Volume" for the day, offset to the right of the actual volume bar.
* ATR Indicator: Displays the 2x ATR (Average True Range) value as text.
* Volume Average: Displays the ADV (Average Daily Volume) Moving Average as text.
* Customization: Most settings are adjustable.
Multi-Timeframe Trend ImprovedMulti-Timeframe Trend Improved — Volatility Stop & Trend Change Alerts
This script tracks trend direction across four customizable timeframes using a Volatility Stop method based on ATR. It displays:
VolStop levels and trend direction (Uptrend/Downtrend) per timeframe.
Bars since the last trend change in each timeframe.
A customizable table showing all data with color-coded trends.
Visual alerts via triangle shapes on the chart when a trend change occurs.
🔧 Fully configurable:
Timeframes (e.g., 65min, 4H, Daily, Weekly)
ATR length, multiplier, and smoothing
Table location, font size, border width, and label color
Ideal for traders who want a clear multi-timeframe overview of market trends and volatility-based support/resistance levels.
ATR Volatility and Trend AnalysisATR Volatility and Trend Analysis
Unlock the power of the Average True Range (ATR) with the ATR Volatility and Trend Analysis indicator. This comprehensive tool is designed to provide traders with a multi-faceted view of market dynamics, combining volatility analysis, dynamic support and resistance levels, and trend detection into a single, easy-to-use indicator.
How It Works
The ATR Volatility and Trend Analysis indicator is built upon the core concept of the ATR, a classic measure of market volatility. It expands on this by providing several key features:
Dynamic ATR Bands: The indicator plots three sets of upper and lower bands around the price. These bands are calculated by multiplying the current ATR value by user-defined multipliers. They act as dynamic support and resistance levels, widening during volatile periods and contracting during calm markets.
Volatility Breakout Signals: Identify potential breakouts with precision. The indicator generates a signal when the current ATR value surges above its own moving average by a specified threshold, indicating a significant increase in volatility that could lead to a strong price move.
Trend Detection: The indicator determines the market trend by analyzing both price action and ATR behavior. A bullish trend is signaled when the price is above its moving average and volatility is increasing. Conversely, a bearish trend is signaled when the price is below its moving average and volatility is increasing.
How to Use the ATR Multi-Band Indicator
Identify Support and Resistance: Use the ATR bands as key levels. Price approaching the outer bands may indicate overbought or oversold conditions, while a break of the bands can signal a strong continuation.
Confirm Breakouts: Look for a volatility breakout signal to confirm the strength behind a price move. A breakout from a consolidation range accompanied by a volatility signal is a strong indicator of a new trend.
Trade with the Trend: Use the background coloring and trend signals to align your trades with the dominant market direction. Enter long positions during confirmed bullish trends and short positions during bearish trends.
Set Up Alerts: The indicator includes alerts for band crosses, trend changes, and volatility breakouts, ensuring you never miss a potential trading opportunity.
What makes it different?
While many indicators use ATR, the ATR Volatility and Trend Analysis tool is unique in its integration of multiple ATR-based concepts into a single, cohesive system. It doesn't just show volatility; it interprets it in the context of price action to deliver actionable trend and breakout signals, making it a complete solution for ATR-based analysis.
Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Signal Core Basic [NevoxCore]⯁ OVERVIEW
Signal Core Basic is a clean and functional ATR-based trailing stop with BUY/SELL signals.
It modernizes the classic "UT-style" concept with adaptive sensitivity, multi-source inputs (Close, Heikin-Ashi, ZLEMA, KAMA), and compact visuals.
The tool is designed for traders who want a clear, minimal, and reliable base indicator without repainting issues.
⯁ HOW IT WORKS
Calculates an ATR-based trailing stop (nLoss = Key × ATR).
Adaptive mode scales sensitivity depending on trend strength (trend/range detection).
Trailing stop flips when price crosses from one regime to the other.
BUY/SELL signals trigger only when confirmed and not blocked by cooldown.
Label ring-buffer ensures chart stays clean (max 50 labels).
Bar coloring optional (solid), auto-disabled when classic red/green colors are enabled.
⯁ KEY FEATURES
ATR-based trailing stop with adjustable sensitivity.
Adaptive key (trend/range aware).
Multiple compute sources: Close, Heikin-Ashi, ZLEMA, KAMA.
Global confirm-on-close switch (no repaint).
Early-flip protection (cooldown).
Compact BUY/SELL labels with auto-cleanup (max 50).
Optional solid bar coloring.
Alerts with ticker, timeframe, and price included.
⯁ SETTINGS (quick overview)
Visual: Classic Colors, Show Labels, Plot Trailing Stop, Barcolor ON/OFF.
Source & Sensitivity: Key Value, ATR Length, Compute Source.
Advanced: Adaptive Key toggle with min/max bounds.
Global: Confirm on bar close.
Extras: Cooldown protection (bars).
⯁ ALERTS (built-in)
Basic Long: BUY signal.
Basic Short: SELL signal.
Each alert includes {{ticker}} {{interval}} @ {{close}}.
⯁ HOW TO USE
Use as a trailing stop and regime filter.
Combine BUY/SELL signals with your strategy rules.
Enable cooldown for cleaner signals in choppy markets.
Try ZLEMA or Heikin-Ashi as compute source for smoother performance.
⯁ WHY IT’S DIFFERENT
Unlike generic UT-style scripts, Signal Core Basic adds adaptive sensitivity, multiple input sources, and strict non-repaint safety.
The visuals follow NevoxCore’s design standards: compact, minimal, and clean — ready for live trading with alerts.
⯁ DISCLAIMER
Backtest and paper-trade before using live. Not financial advice.
Performance depends on market, timeframe, and parameters.
Opening Candle Zone with ATR Bands by nkChartsThis indicator highlights the opening range of each trading session and projects dynamic ATR-based zones around it.
Key Features
Plots high and low levels of the opening candle for each new daily session.
Extends these levels across the session, providing clear intraday support and resistance zones.
Adds ATR-based offset bands above and below the opening range for volatility-adjusted levels.
Customizable colors, ATR length, and multiplier for flexible use across markets and timeframes.
Adjustable session history limit to control how many past levels remain on the chart.
How to Use:
The opening range high/low often acts as strong intraday support or resistance.
The ATR bands give an adaptive volatility buffer, useful for breakout or mean-reversion strategies.
Works on any market with clear session opens.
This tool is designed for traders who want to combine session-based price action with volatility insights, helping identify potential breakouts, reversals, or consolidation areas throughout the day.
⚠️ Disclaimer: This indicator is for educational purposes only. It does not provide financial advice or guarantee profits. Always perform your own analysis before making trading decisions.
Swing High/Low MarkerThis indicator allows you to find the swing highs and lows of the chart and offsets it by the ATR and a custom factor to give you concrete breakout and stop loss prices.
ATR Regime Study [CHE] ATR Regime Study — ATR percentile regimes with clear bands, table and live label
Summary
This study classifies volatility into five regimes by converting ATR into a percentile rank over a rolling window, plotted on a standardized scale between zero and one hundred. Colored bands mark regime thresholds, while a compact table and an optional label report the current percentile and regime. The standardized scale makes symbols and timeframes easier to compare than raw ATR values. Implemented in Pine v6 as a separate pane (overlay set to false), it is a context tool to adapt tactics and risk handling to the prevailing volatility environment.
Motivation: Why this design?
Raw ATR varies with price scale and asset characteristics, which makes regime comparison inconsistent and leads to poor transfer of settings across symbols and timeframes. The core idea is to transform ATR into a percentile rank within a user-defined lookback, then map it into discrete regimes. This yields a stable, interpretable context signal that shifts slower than raw ATR while still responding to genuine volatility changes.
What’s different vs. standard approaches?
Reference baseline: Traditional ATR plots or ATR bands using fixed multipliers.
Architecture differences:
Percentile ranking of ATR within a rolling window.
Five discrete regimes with fixed thresholds at ninety, seventy, thirty, and ten.
Visual fills between thresholds plus a live table and a last-bar label.
Practical effect: You read a single normalized line between zero and one hundred with consistent thresholds. This improves cross-asset comparison and makes regime shifts obvious at a glance.
How it works (technical)
The script computes ATR over a configurable length, then converts that series to a percentile rank over a configurable number of bars. The percentile is naturally scaled and limited between zero and one hundred. That value is mapped to one of five regimes: above ninety (Extreme), between seventy and ninety (Elevated), between thirty and seventy (Normal), between ten and thirty (Calm), and below ten (Squeeze). Horizontal guide lines mark the thresholds, and fills shade the regions. A table is created once and updated on each bar to show regime definitions and highlight the current row. An optional label on the last bar displays the current percentile and regime. No higher-timeframe requests are used, so repaint risk is limited to normal live-bar fluctuation until the bar closes.
Parameter Guide
ATR length — Effect: Controls how fast ATR reacts to new ranges. Default: fourteen. Trade-offs/Tips: Increase to reduce noise in choppy markets; decrease to react faster during regime changes.
Percentile window (bars) — Effect: Number of bars used for the percentile ranking. Default: two hundred fifty-two. Trade-offs/Tips: Larger windows stabilize the percentile but slow adaptation after structural regime shifts; smaller windows adapt faster but may flip more often.
Table › Show — Effect: Toggles the regime overview table. Default: enabled. Trade-offs/Tips: Disable on constrained layouts to reduce visual clutter.
Table › Position — Effect: Anchors the table in a chart corner. Default: Top Right. Trade-offs/Tips: Choose a corner that avoids overlapping other panels or drawings.
Label › Show — Effect: Toggles a last-bar label with current percentile and regime. Default: enabled. Trade-offs/Tips: Useful for quick reads; disable if it obscures other annotations.
Reading & Interpretation
The white line shows ATR percentile between zero and one hundred. Crossing above seventy signals an elevated volatility environment; above ninety indicates event-driven extremes. Between thirty and seventy represents typical conditions. Between ten and thirty indicates calm conditions that often suit mean reversion. Below ten reflects compression, where breakout probability often increases. The colored bands visually reinforce these ranges. The table summarizes regime definitions and highlights the current state. The last-bar label mirrors the current percentile and regime for quick inspection.
Practical Workflows & Combinations
Trend following: Prefer continuation tactics when the percentile holds in the Normal or Elevated bands and structure confirms higher highs and higher lows. Consider wider stops and partial position sizing as percentile rises.
Mean reversion: Favor fades in Calm regimes within defined ranges; use structure filters and time-of-day constraints to avoid low-liquidity whipsaws.
Breakout preparation: Track compressions below ten; plan entries only with structure confirmation and risk caps, since compressions can persist.
Multi-asset/Multi-TF: Defaults travel well on daily charts. For intraday, reduce the percentile window to align with session dynamics. Combine with trend or market structure tools for confirmation.
Behavior, Constraints & Performance
Repaint/confirmation: The percentile updates during live bars and stabilizes on close; closed bars do not repaint.
security/HTF: Not used. If you add higher-timeframe aggregation externally, account for standard repaint caveats.
Resources: Declared maximum bars back is two thousand; limits for lines and labels are five hundred each. A short loop updates the table rows; arrays are used for table content only.
Known limits: Regime boundaries are fixed; assets with persistent volatility shifts may require window retuning. Low-liquidity periods and gaps can produce abrupt percentile changes. ATR is direction-agnostic and should be paired with trend or structure context.
Sensible Defaults & Quick Tuning
Start with ATR length fourteen and percentile window two hundred fifty-two on daily charts.
Too many flips: Increase ATR length or increase the percentile window.
Too sluggish: Decrease the percentile window or reduce ATR length.
Intraday noise: Keep ATR length moderate and reduce the window to a session-appropriate size; optionally hide the label to declutter.
Compressed markets: Maintain defaults but rely more on structure and volume filters before acting.
What this indicator is—and isn’t
This is a volatility regime context layer that standardizes ATR into interpretable regimes. It is not a complete trading system, not predictive, and not a stand-alone entry signal. Use it alongside structure analysis, confirmation tools, and disciplined risk management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino
NY Open OR/ATR Diff Planner – v2.8 NY Open OR/ATR Diff Planner – v2.8 (Hi-Contrast)
Trade the Opening Range Breakout with a plan, not vibes.
This tool builds the NY Opening Range (OR) from the cash open and overlays a complete, risk-based execution plan: precise entry, structural stop, position size, targets, and R:R — all tied to the Daily ATR(14) and the remaining ATR “fuel” left in the day.
What it does
Opening Range: First N minutes after 09:30 ET (choose 5/15/30/60).
Today-only lines: Automatically resets at 09:30; no carry-over from prior days.
Session aware: Works on RTH or ETH charts. OR always anchors at 09:30 ET.
Fuel model: Computes Session Range (since 09:30) and ATR Diff Left = Daily ATR − Session Range.
Entries & Stops:
Long plan: Entry = ORH, Stop = ORL
Short plan: Entry = ORL, Stop = ORH
Targets:
TP1 = 1R (distance of entry→stop)
TP (ATR-diff cap): Entry ± ATR Diff Left (caps greed when the day’s ATR is nearly spent)
Sizing & R:R: Position size = Account × Risk% / Risk per share, with live R:R to ATR-diff target.
Hi-contrast table: Clear readout of Daily ATR, OR size, OR/ATR%, Session Range, ATR left, entries/stops/TPs, size, and max $ risk.
Inputs
Opening Range (minutes): 5 / 15 / 30 / 60
Account Size ($) and Risk % per trade
Session mode: RTH (09:30–16:00) or ETH (chart’s session; still anchored at 09:30)
Also show Short plan (toggle)
Show info table (toggle)
How to use
Add on a 1–5m chart.
Choose your OR window (e.g., 15m = 09:30–09:45).
Set Account Size and Risk % (e.g., 4–5% for small accounts; adjust to taste).
Wait for the OR to complete.
Trade the break/retest with the levels shown:
Long: Break of ORH, SL at ORL, TP1 = 1R, TP2 = ATR-diff cap.
Short: Mirror logic.
If OR/ATR% > ~50% (red), the “fuel” is thin — be selective.
Why it helps build an edge
Objective structure: Clear levels and sizing remove guesswork.
Context-aware targets: ATR-diff keeps targets realistic to the day’s potential.
Discipline by design: One framework that’s easy to review, journal, and iterate.
Notes
This is an indicator (visual planner), not an order-placing strategy.
If you want a back testable version (one trade/day, optional retest rule, TP/SL logic), say the word — I can publish a strategy variant.
Keywords: ORB, Opening Range, ATR, Risk Management, Position Sizing, Day Trading, NYSE Open, Mean Reversion Fuel, Execution Planner
MYM Edge Booster MYM Long Trading Assistant - ATR-Based Edge Booster
Clean, simple indicator that tells you when MYM long setups meet high-probability criteria. No complicated charts - just clear numbers and signals.
• ATR Targets & Stops (whole numbers)
• Quality Score (0-3 stars)
• Green Circle when conditions perfect
• Warnings for choppy/high volatility
• ES/NQ sector confirmation
Eliminates guesswork. Trade when the green circle appears.
Average True Range TrackerThis indicator calculates the daily ATR of the past 14 days. The ATR% indicates the range completed for the day. The ATR indicates the average daily range. The 20% ATR indicates the value of 20% of the daily ATR for retracement purposes.
Daily ATR TrackerThis indicator calculates the daily ATR of the past 14 days. The ATR% indicates the range completed for the day. The ATR indicates the average daily range. The 20% ATR indicates the value of 20% of the daily ATR for retracement purposes.