SigmaRevert: Z-Score Adaptive Mean Reversion [KedArc Quant]🔍 Overview
SigmaRevert is a clean, research-driven mean-reversion framework built on Z-Score deviation — a statistical measure of how far the current price diverges from its dynamic mean.
When price stretches too far from equilibrium (the mean), SigmaRevert identifies the statistical “sigma distance” and seeks reversion trades back toward it. Designed primarily for 5-minute intraday use, SigmaRevert automatically adapts to volatility via ATR-based scaling, optional higher-timeframe trend filters, and cooldown logic for controlled frequency
🧠 What “Sigma” Means Here
In statistics, σ (sigma) represents standard deviation, the measure of dispersion or variability.
SigmaRevert uses this concept directly:
Each bar’s price deviation from the mean is expressed as a Z-Score — the number of sigmas away from the mean.
When Z > 1.5, the price is statistically “over-extended”; when it returns toward 0, it reverts to the mean.
In short:
Sigma = Standard deviation distance
SigmaRevert = Trading the reversion of extreme sigma deviations
💡 Why Traders Use SigmaRevert
Quant-based clarity: removes emotion by relying on statistical extremes.
Volatility-adaptive: automatically adjusts to changing market noise.
Low drawdown: filters avoid over-exposure during strong trends.
Multi-market ready: works across stocks, indices, and crypto with parameter tuning.
Modular design: every component can be toggled without breaking the core logic.
🧩 Why This Is NOT a Mash-Up
Unlike “mash-up” scripts that randomly combine indicators, this strategy is built around one cohesive hypothesis:
“Price deviations from a statistically stable mean (Z-Score) tend to revert.”
Every module — ATR scaling, cooldown, HTF trend gating, exits — reinforces that single hypothesis rather than mixing unrelated systems (like RSI + MACD + EMA).
The structure is minimal yet expandable, maintaining research integrity and transparency.
⚙️ Input Configuration (Simplified Table)
 
 Core
   `maLen`         120            Lookback for mean (SMA)                              
    `zLen`          60             Window for Z-score deviation                         
    `zEntry`        1.5            Entry when Z  exceeds threshold 
    `zExit`         0.3            Exit when Z normalizes                               
 Filters (optional) 	  
    `useReCross`    false          Requires re-entry confirmation                       
    `useTrend`      false / true   Enables HTF SMA bias                                 
    `htfTF`         “60”           HTF timeframe (e.g. 60-min)                          
    `useATRDist`    false          Demands min distance from mean                       
    `atrK`          1.0            ATR distance multiplier                              
    `useCooldown`   false / true   Forces rest after exit                               
 Risk
    `useATRSL`      false / true   Adaptive stop-loss via ATR                           
    `atrLen`        14             ATR lookback                                         
    `atrX`          1.4            ATR multiplier for stop                              
 Session
    `useSession`    false          Restrict to market hours                             
    `sess`          “0915-1530”    NSE timing                                           
    `skipOpenBars`  0–3            Avoid early volatility                               
 UI 
    `showBands`     true           Displays ±1σ & ±2σ                                   
    `showMarks`     true           Shows triggers and exits                             
🎯 Entry & Exit Logic
Long Entry
 Trigger: `Z < -zEntry`
 Optional re-cross: prior Z < −zEntry, current Z −zEntry
 Optional trend bias: current close above HTF SMA
 Optional ATR filter: distance from mean ATR × K
Short Entry
 Trigger: `Z +zEntry`
 Optional re-cross: prior Z +zEntry, current Z < +zEntry
 Optional trend bias: current close below HTF SMA
 Optional ATR filter: distance from mean ATR × K
Exit Conditions
 Primary exit: `Z < zExit` (price normalized)
 Time stop: `bars since entry timeStop`
 Optional ATR stop-loss: ±ATR × multiplier
 Optional cooldown: no new trade for X bars after exit
🕒 When to Use
 Intraday (5m)       
	`maLen=120`, `zEntry=1.5`, `zExit=0.3`, `useTrend=false`, `cooldownBars=6`  Capture intraday oscillations        Minutes → hours 
 Swing (30m–1H)      
	`maLen=200`, `zEntry=1.8`, `zExit=0.4`, `useTrend=true`, `htfTF="D"`        Mean-reversion between daily pivots  1–2 days        
 Positional (4H–1D) 
	`maLen=300`, `zEntry=2.0`, `zExit=0.5`, `useTrend=true`                     Capture multi-day mean reversions    Days → weeks    
📘 Glossary
 Z-Score         
	Statistical measure of how far current price deviates from its mean, normalized by standard deviation. 
 Mean Reversion  
	The tendency of price to return to its average after temporary divergence.         
                    
 ATR             
	Average True Range — measures volatility and defines adaptive stop distances.         
                 
 Re-Cross        
	Secondary signal confirming reversal after an extreme.                           
                      
 HTF             
	Higher Timeframe — provides macro trend bias (e.g. 1-hour or daily).         
                          
 Cooldown        
	Minimum bars to wait before re-entering after a trade closes.                                          
❓ FAQ
Q1: Why are there no trades sometimes?
➡ Check that all filters are off. If still no trades, Z-scores might not breach the thresholds. Lower `zEntry` (1.2–1.4) to increase frequency.
Q2: Why does it sometimes fade breakouts?
➡ Mean reversion assumes overextension — disable it during strong trending days or use the HTF filter.
Q3: Can I use this for Forex or Crypto?
➡ Yes — but adjust session filters (`useSession=false`) and increase `maLen` for smoother means.
Q4: Why is profit factor so high but small overall gain?
➡ Because this script focuses on capital efficiency — low drawdown and steady scaling. Increase position size once stable.
Q5: Can I automate this on broker integration?
➡ Yes — the strategy uses standard `strategy.entry` and `strategy.exit` calls, compatible with TradingView webhooks.
🧭 How It Helps Traders
This strategy gives:
 Discipline: no impulsive trades — strict statistical rules.
 Consistency: removes emotional bias; same logic applies every bar.
 Scalability: works across instruments and timeframes.
 Transparency: all signals are derived from visible Z-Score math.
It’s ideal for quant-inclined discretionary traders who want rule-based entries but maintain human judgment for context (earnings days, macro news, etc.).
🧱 Final Notes
 Best used on liquid stocks with continuous price movement.
 Avoid illiquid or gap-heavy tickers.
 Validate parameters per instrument — Z behavior differs between equities and indices.
 Remember: Mean reversion works best in range-bound volatility, not during explosive breakouts.
⚠️ 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.
アベレージ・トゥルー・レンジ (ATR)
ATR x Trend x Volume SignalsATR x Trend x Volume Signals  is a multi-factor indicator that combines volatility, trend, and volume analysis into one adaptive framework. It is designed for traders who use technical confluence and prefer clear, rule-based setups.
🎯  Purpose 
This tool identifies high-probability market moments when volatility structure (ATR), momentum direction (CCI-based trend logic), and volume expansion all align. It helps filter out noise and focus on clean, actionable trade conditions.
⚙️  Structure 
The indicator consists of three main analytical layers:
1️⃣  ATR Trailing Stop  – calculates two adaptive ATR lines (fast and slow) that define volatility context, trend bias, and potential reversal points.
2️⃣  Trend Indicator (CCI + ATR)  – uses a CCI-based logic combined with ATR smoothing to determine the dominant trend direction and reduce false flips.
3️⃣  Volume Analysis  – evaluates volume deviations from their historical average using standard deviation. Bars are highlighted as medium, high, or extra-high volume depending on intensity.
💡  Signal Logic 
A  Buy Signal  (green) appears when all of the following are true:
• The ATR (slow) line is green.
• The Trend Indicator is blue.
• A bullish candle closes above both the ATR (slow) and the Trend Indicator.
• The candle shows medium, high, or extra-high volume.
A  Sell Signal  (red) appears when:
• The ATR (slow) line is red.
• The Trend Indicator is red.
• A bearish candle closes below both the ATR (slow) and the Trend Indicator.
• The candle shows medium, high, or extra-high volume.
Only one signal can appear per ATR trend phase. A new signal is generated only after the ATR direction changes.
❌  Exit Logic 
Exit markers are shown when price crosses the slow ATR line. This behavior simulates a trailing stop exit. The exit is triggered one bar after entry to prevent same-bar exits.
⏰  Session Filter 
Signals are generated only between the user-defined session start and end times (default: 14:00–18:00 chart time). This allows the trader to limit signal generation to active trading hours.
💬  Practical Use 
It is recommended to trade with a  fixed risk-reward ratio such as 1 : 1.5.  Stop-loss placement should be beyond the slow ATR line and adjusted gradually as the trade develops.
For better confirmation, the  Trend Indicator timeframe should be higher than the chart timeframe  (for example: trading on 1 min → set Trend Indicator timeframe to 15 min; trading on 5 min → set to 1 hour).
🧠  Main Features 
• Dual ATR volatility structure (fast and slow)
• CCI-based trend direction filtering
• Volume deviation heatmap logic
• Time-restricted signal generation
• Dynamic trailing-stop exit system
• Non-repainting logic
• Fully optimized for Pine Script v6
📊  Usage Tip 
Best results are achieved when combining this indicator with additional technical context such as support-resistance, higher-timeframe confirmation, or market structure analysis.
📈  Credits 
Inspired by:
•  ATR Trailing Stop  by  Ceyhun 
•  Trend Magic  by  Kivanc Ozbilgic 
•  Heatmap Volume  by  xdecow
SuperTrend Cyan — Split ST & Triple Bands (A/B/C)SuperTrend Cyan — Split ST & Triple Bands (A/B/C)
✨ Concept:
The SuperTrend Cyan indicator expands the classical SuperTrend logic into a split-line + triple-band visualization for clearer structure and volatility mapping.
Instead of a single ATR-based line, this tool separates SuperTrend direction from volatility envelopes (A/B/C), providing a layered view of both regime and range compression.
✨ The design goal:
 
  Preserve the simplicity of SuperTrend
  Add volatility context via multi-band envelopes
  Provide a compact MTF (Multi-Timeframe) summary for broader trend alignment
 
✨ How It Works
1. SuperTrend Core (Active & Opposite Lines)
 
 Uses ATR-based bands (Factor × ATR-Length).
 Active SuperTrend is plotted according to current regime.
 Opposite SuperTrend (optional) shows potential reversal threshold.
 
2. Triple Band System (A/B/C)
 
 Each band (A, B, C) scales from the median price (hl2) by different ATR multipliers.
 A: Outer band (wider, long-range context)
 B: Inner band (mid-range activity)
 C: Core band (closest to price, short-term compression)
 Smoothness can be controlled with EMA.
 Uptrend fills are lime-toned, downtrend fills are red-toned, with adjustable opacity (gap intensity).
 
3. Automatic Directional Switch
 
 When the regime flips from up → down (or vice versa), the overlay automatically switches between lower and upper bands for a clean transition.
 
4. Multi-Timeframe SuperTrend Table
 
 Displays SuperTrend direction across 5m, 15m, 1h, 4h, and 1D frames.
 Green ▲ = Uptrend, Red ▼ = Downtrend.
 Useful for checking cross-timeframe trend alignment.
 
✨ How to Read It
Green SuperTrend + Lime Bands 
- Uptrend regime; volatility expanding upward 
Red SuperTrend + Red Bands
- Downtrend regime; volatility expanding downward
Narrow gaps (A–C)
- Low volatility / compression (potential squeeze)
Wide gaps
- High volatility / active trend phase
Opposite ST line close to price
- Early warning for regime transition
✨ Practical Use
 
 Identify trend direction (SuperTrend color & line position).
 Assess volatility conditions (band width and gap transparency).
 Watch for MTF alignment: consistent up/down signals across 1h–4h–1D = strong structural trend.
 Combine with momentum indicators (e.g., RSI, DFI, PCI) for confirmation of trend maturity or exhaustion.
 
✨ Customization Tips
ST Factor / ATR Length 
- Adjust sensitivity of SuperTrend direction changes
Band ATR Length
- Controls overall smoothness of volatility envelopes
Band Multipliers (A/B/C)
- Define how wide each volatility band extends
Gap Opacity
- Affects visual contrast between layers
MTF Table
- Enable/disable multi-timeframe display
✨ Educational Value
This script visualizes the interaction between trend direction (SuperTrend) and volatility envelopes, helping traders understand how price reacts within layered ATR zones.
It also introduces a clean MTF (multi-timeframe) perspective — ideal for discretionary and system traders alike.
✨ Disclaimer
This indicator is provided for educational and research purposes only.
It does not constitute financial advice or a trading signal.
Use at your own discretion and always confirm with additional tools.
───────────────────────────────
📘 한국어 설명 (Korean translation below)
───────────────────────────────
✨개념
SuperTrend Cyan 지표는 기존의 SuperTrend를 확장하여,
추세선 분리(Split Line) + 3중 밴드 시스템(Triple Bands) 으로
시장의 구조적 흐름과 변동성 범위를 동시에 시각화합니다.
단순한 SuperTrend의 강점을 유지하면서도,
ATR 기반의 A/B/C 밴드를 통해 변동성 압축·확장 구간을 직관적으로 파악할 수 있습니다.
✨ 작동 방식
1. SuperTrend 코어 (활성/반대 라인)
 
 ATR×Factor를 기반으로 추세선을 계산합니다.
 현재 추세 방향에 따라 활성 라인이 표시되고, “Show Opposite” 옵션을 켜면 반대편 경계선도 함께 보입니다.
 
2. 트리플 밴드 시스템 (A/B/C)
 
 hl2(중간값)를 기준으로 ATR 배수에 따라 세 개의 밴드를 계산합니다.
 A: 외곽 밴드 (가장 넓고 장기 구조 반영)
 B: 중간 밴드 (중기적 움직임)
 C: 코어 밴드 (가격에 가장 근접, 단기 변동성 반영)
 EMA 스무딩으로 부드럽게 조정 가능.
 업트렌드 구간은 라임색, 다운트렌드는 빨간색 음영으로 표시됩니다.
 
3. 자동 전환 시스템
 
 추세가 전환될 때(Up ↔ Down), 밴드 오버레이도 자동으로 교체되어 깔끔한 시각적 구조를 유지합니다.
 
4. MTF SuperTrend 테이블
 
 5m / 15m / 1h / 4h / 1D 프레임별 SuperTrend 방향을 표시합니다.
 초록 ▲ = 상승, 빨강 ▼ = 하락.
 복수 타임프레임 정렬 확인용으로 유용합니다.
 
✨ 해석 방법
초록 SuperTrend + 라임 밴드
- 상승 추세 및 확장 구간
빨강 SuperTrend + 레드 밴드
- 하락 추세 및 확장 구간
밴드 폭이 좁음
- 변동성 축소 (스퀴즈)
밴드 폭이 넓음
- 변동성 확장, 추세 강화
반대선이 근접
- 추세 전환 가능성 높음
✨ 활용 방법
 
 SuperTrend 색상으로 추세 방향을 확인
 A/B/C 밴드 폭으로 변동성 수준을 판단
 MTF 테이블을 통해 복수 타임프레임 정렬 여부 확인
 RSI, DFI, PCI 등 다른 지표와 함께 활용 시, 추세 피로·모멘텀 변화를 조기에 파악 가능
 
✨ 교육적 가치
이 스크립트는 추세 구조(SuperTrend) 와 변동성 레이어(ATR Bands) 의 상호작용을
시각적으로 학습하기 위한 교육용 지표입니다.
또한, MTF 구조를 통해 시장의 “위계적 정렬(hierarchical alignment)”을 쉽게 인식할 수 있습니다.
✨ 면책
이 지표는 교육 및 연구 목적으로만 제공됩니다.
투자 판단의 책임은 사용자 본인에게 있으며, 본 지표는 매매 신호를 보장하지 않습니다.
NY Open 5 minute Range (5m Box Extended)Draws a box around the first 5 minute candle for the New York session. 
THAIT Moving Averages Tight within # ATR EMA SMA convergence 
THAIT(tight) indicator is a powerful tool for identifying moving average convergence in price action. This indicator plots four user-defined moving averages  (EMA or SMA). It highlights moments when the MAs converge within a user specified number of ATRs, adjusted by the 14-period ATR, signaling potential trend shifts or consolidation. 
A convergence is flagged when MA1 is the maximum, the spread between MAs is tight, and the price is above MA1, excluding cases where the longest MA (MA4) is the highest. The indicator alerts and visually marks convergence zones with a shaded green background, making it ideal for traders seeking precise entry or exit points.
Kalman Exponential SuperTrendThe  Kalman Exponential SuperTrend  is a new, smoother & superior version of the famous "SuperTrend". Using Kalman smoothing, a concept from the EMA (Exponential Moving Average), this script leverages the best out of each and combines it into a single indicator.
 How does it work? 
First, we need to calculate the Kalman smoothed source. This is a kind of complex calculation, so you need to study it if you want to know how it works precisely. It smooths the source of the SuperTrend, which helps us smooth the SuperTrend.
Then, we calculate "a" where:
n = user defined ATR length
a = 2/(n+1)
Now we calculate the ATR over "n" period. Classical calculation, nothing changed here.
Now we calculate the SuperTrend using the Kalman smoothed source & ATR where:
kalman = kalman smoothed source
ATR = Average True Range
m = Factor chosen by user.
Upper Band = kalman + ATR * m
Lower Band = kalman - ATR * m
Now we just smooth it a bit further using the "a" and a concept from the EMA.
u1 = Upper Band a bar ago
l1 = Lower Band a bar ago
u = Upper Band
l = Lower Band
Upper = u1 * (1-a) + u * a
Lower = l1 * (1-a) + u * a
When the classical (not Kalman) source crosses above the Upper, it indicates an uptrend. When it crosses below the Lower, it indicates a downtrend.
 Methodology & Concepts 
When I took a look at the classical SuperTrend => It was just far too slow, and if I made it faster it was noisy as hell. So I decided I would try to make up for it.
I tried the gaussian, bilateral filter, but then I tried kalman and that worked the best, so I added it. Now it was still too noisy and unconsistent, so I revisited my knowledge of concepts and picked the one from the EMA, and it kinda solved it.
In the core of the indicator, all it does is combine them in a really simple way, but if you go more deeply you see how it fits the puzzlé really well.
It is not about trying out random things´=> but about seeking what it is missing and trying to lessen its bad side.
That is the entire point of this indicator => Offer a unique approach to the SuperTrend type, that lessen the bad sides of it.
I also added different plotting types, this is so everyone can find their favorite
Enjoy Gs!
ATR Trailing Stop with Entry Date & First-Day MultiplierATR based trailing stop based on a X post of Aksel Kibar.
DTR & ATR with live zonesThis indicator is designed to help traders gauge the day's volatility in real-time. It compares the current Daily True Range (DTR)—the distance between the session's high and low—to the historical Average True Range (ATR).
The main purpose is to project potential price levels where the market might reach based on its average volatility. These levels (100% ATR, 150%, 200%, etc.) can be used as price targets. For instance, if you're in a long trade, you might consider taking partial or full profits as the price approaches these upper ATR extension levels. The indicator is highly customisable, allowing you to control the appearance of the ATR lines, zones, and labels to fit your charting preferences.
 Core Concepts: ATR and DTR 
To use this indicator effectively, it's important to understand its two main components:
 
 Average True Range (ATR): This is a classic technical analysis indicator that measures market volatility. It calculates the average range of price movement over a specific period (e.g., 14 days). A higher ATR means the price is, on average, moving more, while a low ATR indicates less volatility. This script uses a higher timeframe ATR (e.g., Daily) to establish a stable volatility baseline for the current trading day.
 Daily True Range (DTR): This is simply the difference between the current trading session's highest high and lowest low (session high - session low). It tells you how much the price has actually moved so far today.
 
The indicator's logic revolves around comparing the live, unfolding DTR to the historical, baseline ATR. An on-screen table conveniently shows this comparison as a percentage, to show how volatile the day has been.
 How It Works: The Dynamic & Locked Mechanism 
The most clever part of this indicator is how it draws the ATR levels. It operates in two distinct phases during the trading session:
 Phase 1:  Dynamic Expansion (Before DTR meets ATR)
At the start of the session, the DTR is small. The indicator calculates the remaining range needed to "complete" the 100% ATR level (difference = avg_atr - dtr). It then adds this remaining amount to the session high and subtracts it from the session low. This creates a "floating" 100% ATR range that expands dynamically as the session high or low is extended.
 Phase 2:  The Lock-in (After DTR meets or exceeds ATR)
Once the day's range (DTR) becomes equal to or greater than the avg_atr, the day has met its "expected" volatility. At this point, the levels lock in place. The indicator intelligently determines the anchor point for the locked range.
Once this primary 100% ATR range is established (either dynamically or locked), the script projects the other levels (150%, 200%, 250%, and 300%) by adding or subtracting multiples of the avg_atr from this base.
 How to Use It for Trading  
The primary use of this indicator is to set logical, volatility-based price targets.
 Setting Profit Targets:  If you enter a long position, the upper ATR levels (100%, 150%, 200%) serve as excellent areas to consider taking profits. A move to the 200% or 250% level often signifies an overextended or "exhaustion" move, making it a high-probability exit zone. For short positions, the lower ATR levels serve the same purpose.
 Assessing Intraday Momentum:  The on-screen table tells you how much of the expected daily range has been used. If it's early in the session and the DTR is only at 30% of the ATR, you can anticipate more significant price movement is likely to come. Conversely, if the DTR is already at 150% of ATR, the bulk of the day's move may already be complete.
 Mean Reversion Signals:  If the price pushes to an extreme level (e.g., 250% ATR) and shows signs of stalling (e.g., bearish divergence on an oscillator), it could signal a potential reversal or pullback, offering an opportunity for a counter-trend trade.
 Key Settings 
 
 ATR Length & Smoothing Type:  These settings control how the baseline ATR is calculated. The default 14 period and RMA smoothing are standard, but you can adjust them to your preference.
 Session Settings:  This is crucial. You must set the Market Session and Time Zone to match the primary trading hours of the asset you are analysing (e.g., "0930-1600" for the NYSE session).
 Show Lines / Show Labels / Show Zones:  The script gives you full control over the visual display. You can toggle each ATR level's lines, labels, and background zones individually to avoid a cluttered chart and focus only on the levels that matter to your strategy.
Squeeze Breakout Strategy [KedArc Quant]Description:
Squeeze Breakout strategy looks for volatility compression (Bollinger Bands inside Keltner Channels = a “squeeze”), then trades the volatility expansion in the direction of a momentum filter. 
🧠 How the “Squeeze → Expansion” works 
- Markets alternate between quiet (compressed) and active (expanded) phases.
- We call it a squeeze when Bollinger Bands (BB)—which reflect standard deviation around price—shrink inside the Keltner Channels (KC)—which reflect ATR/range.
- This means dispersion (stdev) is small relative to typical range (ATR). Price is coiling; participants are agreeing on value.
- When BB pops back outside KC, the squeeze releases. That’s the first sign that volatility is expanding again.
- A release alone doesn’t tell you direction. That’s why this strategy pairs the release with a momentum filter:
- We estimate momentum using a smoothed linear-regression slope of price (a clean proxy for acceleration).
- If the slope is positive at release, we favor longs; if negative, we favor shorts.
- Optionally, you can require Band Break + Momentum (price closes beyond the BB) for a stricter entry.
- This combination aims to capture the first leg of the range-to-trend transition while avoiding random pokes that often occur during tight consolidations.
💡 Why this is unique
 Two entry modes (toggle):
  1. Release + Momentum (enter when the squeeze turns off)
  2. Band Break + Momentum (enter on a close beyond BB with momentum)
 - Momentum = smoothed linear-regression slope, a clean thrust detector that’s less laggy than many oscillators.
 - Risk module included: ATR stop, optional 1R partial take-profit, and a Chandelier trailing stop for the runner.
 - Practical filters: higher-timeframe EMA trend alignment, volume surge, minimum BB width, and session window—so it adapts across markets/timeframes.
 - Backtest-ready: uses TradingView’s `strategy.` framework with commission/slippage controls.
📈 How it helps traders
✅Regime clarity: distinguishes compression vs. expansion so you’re not forcing trades during dead zones.
✅Objective entries: momentum + band logic reduces discretionary “feel” and late chases.
✅Built-in risk plan: stop/targets/trailing defined in inputs—consistent execution across tickers.
✅Adaptable: works across instruments/timeframes; filters let you tailor noise tolerance per market session.
✅Alerts: real-time signals for entry and squeeze release.
✅Not a Mash-Up / Original Work
✅Fully authored in Pine Script v6; no external libraries or copied logic blocks.
✅Uses well-known, documented formulas (BB, KC, ATR, LinReg slope) combined into a new rule set (two entry modes + momentum + structured exits).
✅Code and parameters are transparent and adjustable; the script stands alone.
🧩 Formulas (core)
Bollinger Bands
 # Basis = `SMA(close, bbLen)`
 # Upper/Lower = `Basis ± bbMult × stdev(close, bbLen)`
 # Width% = `(Upper − Lower) / Basis × 100`
Keltner Channels
 # Basis = `EMA(close, kcLen)`
 # Upper/Lower = `Basis ± kcMult × ATR(kcATR)`
Squeeze state
 # ON: `BB_Upper < KC_Upper` and `BB_Lower > KC_Lower`
 # Release: `squeeze_on ` and `not squeeze_on`
Momentum (this script)
 # `lin = linreg(close, momLen, 0)`
 # `mom = SMA( lin − lin , momSmoothing )`
 # Long bias when `mom > 0`; short bias when `mom < 0`.
⚙️ Inputs 
Compression
 `bbLen`, `bbMult` — BB length & std-dev multiplier
 `kcLen`, `kcATR`, `kcMult` — KC lengths & ATR multiplier
 `Entry Mode` — Release + Momentum, Band Break + Momentum, or Either
Momentum
 `momLen`, `momSmoothing`
Filters (optional)
 `Use HTF Trend Filter` + `HTF Timeframe` + `HTF EMA Length`
 `Require Volume Surge` (`volLen`, `volMult`)
 `Avoid Ultra-Low Vol` (`Min BB Width %`)
 `Session` window
Risk / Exits
 `ATR Length`, `ATR Stop Multiplier`
 `Take Profit at 1R` (with Partial 50%)
 `Chandelier` (`chLen`, `chMult`)
 Optional `Time Stop (bars)`
 🎯 Entry & Exit Rules
Entry (choose one mode):
1. Release + Momentum (default)
    Long: on the bar the squeeze releases and `mom > 0`, passing all enabled filters.
    Short: on the bar the squeeze releases and `mom < 0`, passing filters.
2. Band Break + Momentum
    Long: `close > BB_Upper` and `mom > 0`, with filters.
    Short: `close < BB_Lower` and `mom < 0`, with filters.
Initial Stop
 ATR-based: `Stop Distance = atrMult × ATR(atrLen)` from entry.
Targets & Runner
TP1 at 1R (optional): take 50% at `entry + 1R` (long) / `entry − 1R` (short).
Runner: remaining position trails a Chandelier stop:
Long trail = `highest(high, chLen) − chMult × ATR`
Short trail = `lowest(low, chLen) + chMult × ATR`
Optional Time Stop: close the trade after N bars in position.
Labels on chart
 “Long” / “Short” = entry signals.
 “L-TP1 / S-TP1” = partial exits at 1R.
 “L-Runner / S-Runner” = trailing-stop exits of the runner.
Alerts
 Provided for Long Entry, Short Entry, and Squeeze Release.
💬 How to use
1. Choose your market/timeframe (e.g., NSE 5–15m intraday, 60m–Daily for swing).
2. If you prefer cleaner trends, enable the HTF EMA filter (e.g., 240m/1D).
3. For intraday, consider Band Break + Momentum with Volume Surge and a small Min BB Width.
4. Adjust ATR/Chandelier multipliers to fit your risk tolerance and instrument.
Abbreviations
 BB – Bollinger Bands
 KC – Keltner Channels
 ATR – Average True Range
 SMA / EMA – Simple/Exponential Moving Average
 HTF – Higher Timeframe
 R – Risk unit (equal to the initial stop distance)
⚠️ Disclaimer
This script is for educational purposes only. Past performance ≠ future returns. Always paper trade first. Options trading carries high risk — manage exposure responsibly.
Hyper SAR Reactor Trend StrategyHyperSAR Reactor Adaptive PSAR Strategy
 Summary 
Adaptive Parabolic SAR strategy for liquid stocks, ETFs, futures, and crypto across intraday to daily timeframes. It acts only when an adaptive trail flips and confirmation gates agree. Originality comes from a logistic boost of the SAR acceleration using drift versus ATR, plus ATR hysteresis, inertia on the trail, and a bear-only gate for shorts. Add to a clean chart and run on bar close for conservative alerts.
 Scope and intent 
• Markets: large cap equities and ETFs, index futures, major FX, liquid crypto
• Timeframes: one minute to daily
• Default demo: BTC on 60 minute
• Purpose: faster yet calmer PSAR that resists chop and improves short discipline
• Limits: this is a strategy that places simulated orders on standard candles
 Originality and usefulness 
• Novel fusion: PSAR AF is boosted by a logistic function of normalized drift, trail is monotone with inertia, entries use ATR buffers and optional cooldown, shorts are allowed only in a bear bias
• Addresses false flips in low volatility and weak downtrends
• All controls are exposed in Inputs for testability
• Yardstick: ATR normalizes drift so settings port across symbols
• Open source. No links. No solicitation
 Method overview 
Components
• Adaptive AF: base step plus boost factor times logistic strength
• Trail inertia: one sided blend that keeps the SAR monotone
• Flip hysteresis: price must clear SAR by a buffer times ATR
• Volatility gate: ATR over its mean must exceed a ratio
• Bear bias for shorts: price below EMA of length 91 with negative slope window 54
• Cooldown bars optional after any entry
• Visual SAR smoothing is cosmetic and does not drive orders
 Fusion rule 
Entry requires the internal flip plus all enabled gates. No weighted scores.
 Signal rule 
• Long when trend flips up and close is above SAR plus buffer times ATR and gates pass
• Short when trend flips down and close is below SAR minus buffer times ATR and gates pass
• Exit uses SAR as stop and optional ATR take profit per side
 Inputs with guidance 
Reactor Engine
• Start AF 0.02. Lower slows new trends. Higher reacts quicker
• Max AF 1. Typical 0.2 to 1. Caps acceleration
• Base step 0.04. Typical 0.01 to 0.08. Raises speed in trends
• Strength window 18. Typical 10 to 40. Drift estimation window
• ATR length 16. Typical 10 to 30. Volatility unit
• Strength gain 4.5. Typical 2 to 6. Steepness of logistic
• Strength center 0.45. Typical 0.3 to 0.8. Midpoint of logistic
• Boost factor 0.03. Typical 0.01 to 0.08. Adds to step when strength rises
• AF smoothing 0.50. Typical 0.2 to 0.7. Adds inertia to AF growth
• Trail smoothing 0.35. Typical 0.15 to 0.45. Adds inertia to the trail
• Allow Long, Allow Short toggles
 Trade Filters 
• Flip confirm buffer ATR 0.50. Typical 0.2 to 0.8. Raise to cut flips
• Cooldown bars after entry 0. Typical 0 to 8. Blocks re entry for N bars
• Vol gate length 30 and Vol gate ratio 1. Raise ratio to trade only in active regimes
• Gate shorts by bear regime ON. Bear bias window 54 and Bias MA length 91 tune strictness
 Risk 
• TP long ATR 1.0. Set to zero to disable
• TP short ATR 0.0. Set to 0.8 to 1.2 for quicker shorts
 Usage recipes 
Intraday trend focus
Confirm buffer 0.35 to 0.5. Cooldown 2 to 4. Vol gate ratio 1.1. Shorts gated by bear regime.
Intraday mean reversion focus
Confirm buffer 0.6 to 0.8. Cooldown 4 to 6. Lower boost factor. Leave shorts gated.
Swing continuation
Strength window 24 to 34. ATR length 20 to 30. Confirm buffer 0.4 to 0.6. Use daily or four hour charts.
 
Properties visible in this publication 
Initial capital 10000. Base currency USD. Order size Percent of equity 3. Pyramiding 0. Commission 0.05 percent. Slippage 5 ticks. Process orders on close OFF. Bar magnifier OFF. Recalculate after order filled OFF. Calc on every tick OFF. No security calls.
 
Realism and responsible publication 
No performance claims. Past results never guarantee future outcomes. Shapes can move while a bar forms and settle on close. Strategies execute only on standard candles.
 Honest limitations and failure modes 
High impact events and thin books can void assumptions. Gap heavy symbols may prefer longer ATR. Very quiet regimes can reduce contrast and invite false flips.
 Open source reuse and credits
 
Public domain building blocks used: PSAR concept and ATR. Implementation and fusion are original. No borrowed code from other authors.
 Strategy notice 
Orders are simulated on standard candles. No lookahead.
 Entries and exits 
Long: flip up plus ATR buffer and all gates true
Short: flip down plus ATR buffer and gates true with bear bias when enabled
Exit: SAR stop per side, optional ATR take profit, optional cooldown after entry
Tie handling: stop first if both stop and target could fill in one bar
Custom Net ATR Mapping - NateThis indicator measures how much an asset actually moves — both on average and across full periods — so traders can compare short-term volatility with longer-term net momentum.
It displays four key metrics in a simple color-coded table:
Standard ATR – the average daily (or per-bar) range, showing typical volatility.
Net ATR – the average open-to-close move, revealing how much price tends to travel directionally within each bar.
Total Net Move – the total distance price has moved from the start to the end of the most recent measurement window.
Average Net Move – the typical size of that full-period move, averaged across multiple recent windows.
Together these readings help you see whether recent price action is choppy but contained (high ATR, low net move) or sustained and directional (high net move relative to ATR) — useful for spotting trend strength, breakout potential, or range-bound conditions.
MACD AI Flux Pro Dashboard V. 2Acknowledgment 
This indicator is built upon the MACD-V (Volatility-Normalized MACD) methodology originally created by Alex Spiroglou, CMT, whose research (2015–2022) introduced the principle of normalizing MACD momentum by volatility (MACD/ATR). Full acknowledgment and credit are hereby given to Mr. Spiroglou as the original author of the MACD-V concept and framework.
Indicator Overview — MACD-V Flux Pro Dashboard V.2
The MACD-V Flux Pro Dashboard advances Spiroglou’s volatility-normalized foundation into a comprehensive multi-system architecture that unifies momentum, trend, volatility, and compression analytics in one visual framework. It is engineered for precision decision-making in both intraday and swing-trading environments.
 Key Dashboard Features: 
Dynamic Probability Engine: Calculates real-time long and short probabilities by weighting momentum, slope, compression, and volume pressure components into a composite score.
Multi-Timeframe Confirmation (HTF Tiles): Displays live directional agreement across fast, mid, and slow timeframes for confidence filtering and signal validation.
Regime Detection System: Automatically classifies the market as Trend Up, Trend Down, Compression, or Transition, applying background color cues for instant context.
Risk and News Filters: Integrates ATR-based risk gating and customizable “mute windows” to block trade signals during high-volatility or scheduled news events.
VWAP and Adaptive Bands: Plots VWAP with configurable ATR or standard-deviation bands to highlight over-extension and pullback zones.
Trend-Day and Opening-Range Logic: Monitors RTH (Regular Trading Hours) price behavior to identify potential trend-day conditions.
Smart Entry Arrows: Generates visual long/short signals only when multiple subsystems confirm direction, slope strength, and proximity to VWAP within defined thresholds.
On-Chart Dashboard Panel: Presents live metrics including probability bias, regime state, ATR level, risk status, and news filters with adaptive color-coding and optional emoji cues for intuitive interpretation.
Chart Display Summary:
All elements are presented directly on the main chart, combining price structure, VWAP bands, EMAs, and regime background shading with the real-time dashboard panel. The design eliminates the need for a secondary pane, offering a consolidated and context-rich view of market dynamics
ATR DAILY PROGRESSION)Indicator: ATR Daily Progression — Final Compact Edition
1. Indicator Objective
The ATR Daily Progression indicator measures the progression of intraday volatility as a percentage of the daily Average True Range (ATR).
It provides a quick visual overview of whether the market has reached or exceeded its average daily range of movement.
This helps traders avoid entering low-probability continuation trades once the day’s ATR is already completed.
2. Visual Presentation
Horizontal bar ranging from 0% to 150% of the ATR.
Green color up to 100%, then red beyond that point.
Main ticks: 0, 25, 50, 75, 90, 100, and 150%.
Full-height white vertical lines at 0%, 100%, and 150%.
A floating badge displaying the current ATR completion percentage, always visible.
Compact Height mode enabled by default for optimal visual integration.
3. Key Features
Function Description
Precise alignment The transition from green to red occurs exactly after the 100% tick.
Audio & visual alerts Triggered at 75%, 90%, 100%, and 150%.
Session flash effects The filled bar blinks when the ATR is reached (100%) or exceeded (150%).
Dynamic badge Displays the current ATR %, green before 100%, red after.
Compact layout Three-line table format for better chart integration.
4. Recommended Settings
ATR Length (Daily): 14
Bar width (steps): 32–40 (depending on chart size)
Always green below 100%: enabled
Show floating % badge: enabled
Compact Height: enabled by default
Flash at 75% and 90%: enabled
Flash at 100% and 150%: enabled
5. Strategic Use
The ATR Done Today is a visual discipline tool designed to help traders:
Identify when the market has likely completed its daily move.
Avoid late-session counter-trend trades.
Visualize volatility compression or expansion.
Determine optimal times to take profits or pause trading.
MACD-V Adaptive FluxProMACD-V Adaptive FluxPro
Type: Multi-Factor Volatility-Normalized Momentum & Regime Framework
Overlay: ✅ Yes (on price chart)
Purpose: Detect high-probability trend continuation or reversal zones through volatility-adjusted momentum, VWAP structure, and adaptive filters.
🧩 Concept Overview
MACD-V Adaptive FluxPro is a next-generation, multi-factor analytical framework that merges the principles of Linda Raschke’s 3-10-16 MACD with modern volatility normalization and adaptive filtering.
Instead of generating raw buy/sell signals, it builds a probability-driven environment model — showing when price action, volatility, and structure align for high-confidence trades.
The “V” in MACD-V stands for Volatility Normalization: every MACD component is divided by ATR to stabilize amplitude across fast or slow markets.
This enables the indicator to remain consistent across timeframes, instruments, and volatility regimes.
⚙️ Core Components
1️⃣ Volatility-Normalized MACD (MACD-V)
A traditional MACD built on Linda Raschke’s 3-10-16 structure, but adjusted by ATR to create a volatility-invariant momentum profile.
You can toggle to alternative presets (Scalp / Swing / Trend) for faster or slower environments.
2️⃣ Dynamic Regime Detection
A slope-based classifier that identifies whether the market is:
Trend Up 🟢
Trend Down 🔴
Compression / Squeeze 🟧
Transition / Neutral ⚫
The background color updates dynamically as momentum, volatility, and slope shift between these states.
3️⃣ VWAP Structure Bands
Adaptive VWAP with inner and outer ATR-scaled envelopes.
These act as short-term mean-reversion and breakout zones.
The indicator can optionally gate entries to occur only within defined VWAP proximity.
4️⃣ EMAs for Micro-Trend Confirmation
Includes 9-EMA and 21-EMA, color-configurable for visual crossovers and short-term momentum bias.
5️⃣ Multi-Timeframe Confirmation Tiles
Top-center dashboard tiles display directional bias from higher timeframes (e.g., 15m / 1h / 4h).
When all align, it confirms multi-frame trend coherence.
6️⃣ Adaptive Probability Engine
All subsystems — MACD-V, slope, compression, volume z-score, and VWAP distance — feed into a logistic scoring model that outputs a real-time AOI Probability (0-100%).
When conditions align, probabilities rise above 60% (long bias) or drop below 40% (short bias).
These are your high-probability “Areas of Interest.”
7️⃣ Dashboard HUD
The top-right status console provides a one-glance view of system state:
Field	Meaning
AOI Prob Long	Real-time probability of bullish bias
Regime	Market state (Trend, Transition, Compression)
Risk Gate	ATR-based volatility filter
News Mute	Manual toggle for event-risk suppression
ATR (≈ risk)	Real-time volatility readout
Status	✅ Trading OK / 🧱 Risk Gate / 🔇 News Mute / 🟧 Compression
🎯 Interpretation Guide
Visual	Meaning
🟢 Green background	Confirmed uptrend regime
🔴 Red background	Confirmed downtrend regime
🟧 Orange background	Volatility compression (squeeze forming)
⚫ Gray background	Transitional / indecisive structure
Teal % (AOI Prob Long)	Bullish probability > 60%
Arrows	Optional: appear only when all gates align (rare, filtered signals)
🧮 Mathematical Notes
MACD-V = (EMA_fast(src) − EMA_slow(src)) / ATR(n)
Normalized score is smoothed, scaled 0–100 via logistic curve
Slope = Δ(EMA(src, n)) / ATR(n)
Probabilities gated by:
Minimum slope magnitude (minAbsSlope)
VWAP proximity (maxVWAPDistATR)
Multi-TF agreement
Cooldown interval (cooldownBars)
ATR-based risk gate
No repainting — all calculations use barstate.isconfirmed.
⚡ Use Cases
✅ Identify trend regime changes before major expansions
✅ Filter breakout vs. compression setups
✅ Quantify volatility conditions before entries
✅ Confirm multi-timeframe alignment
✅ Serve as a visual regime map for automated systems or discretionary traders
🧠 Recommended Presets
Market Type	Setting Preset	Behavior
Index Futures (ES/NQ)	LBR 3-10-16 SMA (default)	Classic swing/momentum balance
Scalping (1m–5m)	Fast Adaptive	Higher frequency, shorter cooldown
Swing Trading (1h–4h)	Smooth ATR	Broader, trend-only signals
Trend-Following Futures	Wide ATR Bands	Filters noise, favors strong continuation
⚠️ Notes
Non-repainting, bar-confirmed calculations
Signal arrows are optional and rare — intended for precision setups
ATR and slope thresholds should be tuned per instrument
Compatible with all TradingView markets and resolutions
🏁 Summary
“MACD-V Adaptive FluxPro” is not a simple MACD — it’s a volatility-normalized market state engine that adapts to changing conditions.
It fuses Linda Raschke’s timeless MACD logic with modern volatility, slope, and multi-timeframe analytics — giving you a live market dashboard that tells you when not to trade just as clearly as when you should.
SFC Bollinger Band and Bandit概述 (Overview)
SFC 布林通道與海盜策略 (SFC Bollinger Band and Bandit Strategy) 是一個基於 Pine Script™ v6 的技術分析指標,結合布林通道 (Bollinger Bands)、移動平均線 (Moving Averages) 以及布林海盜 (Bollinger Bandit) 交易策略,旨在為交易者提供多時間框架的趨勢分析與進出場訊號。該腳本支援風險管理功能,並提供視覺化圖表與交易訊號提示,適用於多種金融市場。
This script, written in Pine Script™ v6, combines Bollinger Bands, Moving Averages, and the Bollinger Bandit strategy to provide traders with multi-timeframe trend analysis and entry/exit signals. It includes risk management features and visualizes data through charts and trading signals, suitable for various financial markets.
功能特點 (Key Features)
布林通道 (Bollinger Bands)
提供可調整的標準差參數 (σ1, σ2),支援多層布林通道顯示。
進場訊號基於價格穿越布林通道上下軌,並結合連續K線確認機制。
Provides adjustable standard deviation parameters (σ1, σ2) for multi-layer Bollinger Bands display.
Entry signals are based on price crossing the upper/lower bands, combined with a consecutive bar confirmation mechanism.
移動平均線 (Moving Averages)
支援簡單移動平均線 (SMA) 或指數移動平均線 (EMA),可自訂快、中、慢線週期。
Supports Simple Moving Average (SMA) or Exponential Moving Average (EMA) with customizable fast, medium, and slow line periods.
布林海盜策略 (Bollinger Bandit Strategy)
基於變動率 (ROC) 與布林通道動態止損,提供做多與做空訊號。
包含動態止損均線與平倉天數設定,增強交易靈活性。
Utilizes Rate of Change (ROC) and Bollinger Bands with dynamic stop-loss for long and short signals.
Includes dynamic stop-loss moving average and liquidation days for enhanced trading flexibility.
多時間框架分析 (Multi-Timeframe Analysis)
支援六個時間框架 (5分、15分、1小時、4小時、日線、週線) 的趨勢分析。
通過表格顯示各時間框架的連續上漲/下跌趨勢,輔助交易決策。
Supports trend analysis across six timeframes (5m, 15m, 1h, 4h, daily, weekly).
Displays consecutive up/down trends in a table to aid decision-making.
風險管理 (Risk Management)
提供基於 ATR 或布林通道的停利/停損設定。
自動計算交易手數,根據報價貨幣匯率調整風險敞口。
Offers take-profit/stop-loss settings based on ATR or Bollinger Bands.
Automatically calculates trading lots, adjusting risk exposure based on quote currency exchange rates.
視覺化與提示 (Visualization and Alerts)
繪製布林通道、移動平均線、海盜策略動態止損線及交易訊號。
提供多時間框架趨勢表格、交易手數標籤及浮水印。
支援交易訊號快訊,方便即時監控。
Plots Bollinger Bands, Moving Averages, Bandit strategy stop-loss lines, and trading signals.
Includes multi-timeframe trend tables, trading lot labels, and watermark.
Supports alert conditions for real-time trade monitoring.
使用說明 (Usage Instructions)
設置參數 (Parameter Setup)
布林通道 (Bollinger Bands): 可調整週期 (預設21)、標準差 (σ1=1, σ2=2) 及停利/停損依據 (ATR 或 BAND)。
移動平均線 (Moving Averages): 可選擇顯示快線 (10)、中線 (20)、慢線 (60),並切換 SMA/EMA。
布林海盜 (Bollinger Bandit): 調整通道週期 (50)、平倉均線週期 (50) 及 ROC 週期 (30)。
時間框架 (Timeframes): 自訂六個時間框架,預設為 5分、15分、1小時、4小時、日線、週線。
Adjust Bollinger Band period (default 21), standard deviations (σ1=1, σ2=2), and take-profit/stop-loss basis (ATR or BAND).
Configure Moving Averages (fast=10, medium=20, slow=60) and toggle SMA/EMA.
Set Bollinger Bandit parameters: channel period (50), liquidation MA period (50), ROC period (30).
Customize six timeframes (default: 5m, 15m, 1h, 4h, daily, weekly).
交易訊號 (Trading Signals)
買入訊號 (Buy): 價格穿越下軌且滿足連續K線條件。
賣出訊號 (Sell): 價格穿越上軌且滿足連續K線條件。
海盜策略訊號: 基於 ROC 與布林通道穿越,結合動態止損。
Buy signal: Price crosses below lower band with consecutive bar confirmation.
Sell signal: Price crosses above upper band with consecutive bar confirmation.
Bandit strategy signals: Based on ROC and band crossings with dynamic stop-loss.
視覺化 (Visualization)
布林通道以不同顏色顯示上下軌與中軌。
移動平均線以快、中、慢線區分顏色。
趨勢表格顯示各時間框架的趨勢狀態 (🔴上漲, 🟢下跌, ⚪中性)。
海盜策略顯示動態止損線與交易狀態。
Bollinger Bands display upper, lower, and middle bands in distinct colors.
Moving Averages use different colors for fast, medium, and slow lines.
Trend table shows timeframe trends (🔴 up, 🟢 down, ⚪ neutral).
Bandit strategy displays dynamic stop-loss and trading status.
Risk ModuleThis indicator provides a visual reference for position sizing and approximate stop and target placement. It supports trade planning by calculating equalized risk per trade and maintaining consistent exposure across different markets.
For more information about the concept, see the post  Position Sizing and Risk Management .
 Fixed Fractional Risk 
The indicator calculates the number of shares that can be traded to maintain consistent monetary risk. The formula is based on the distance between the current price and stop reference, adjusting position size proportionally. A closer stop results in a larger position size, while a wider stop results in a smaller one.
 Position Size = (Account Size × Risk %) ÷ (Entry Price – Stop Price) 
 Stop and Target 
Stop placement is derived from volatility using the Average True Range (ATR). The target is plotted as a multiple of the stop distance, defining the risk-to-reward relationship in R units.
 Stop = Price ± ATR × Multiplier
Target = Price ± (R × Risk Distance) 
 Chart Elements 
The stop and target levels are plotted above and below the current price, with the stop marked by a red dot and the target by a green dot. The information table displayed on the chart shows the number of shares to trade, stop level, and target level.
 Setup and Configuration 
This configuration only needs to be set once, but can be adjusted later if preferred.
1. Start by setting the account size and risk percentage per trade to define the monetary amount risked on each trade. These values form the basis for position size calculation.
2. Set the ATR multiplier to determine stop distance, common values range between 1 and 3 ATR. Lower values place stops closer to price, increasing sensitivity but risking short-term noise. Higher values widen the stop, which reduces noise impact but extends time in risk.
3. Set the R-multiple to determine target distance relative to the stop. A value of 1 represents a 1:1 risk-to-reward relationship. Lower values reduce potential reward but tend to increase win rate, whereas higher values increase potential reward but tend to reduce win rate. The selection depends on system characteristics and trade expectancy.
When the parameters are defined, the indicator displays the stop, target, and calculated position size on the chart. All that remains is to enter the trade with the number of shares shown in the table and place bracket orders at the plotted stop and target levels.
 Settings Overview 
 
 Account Size / Risk %: Defines account capital and per-trade exposure.
 ATR Multiplier: Adjusts stop distance relative to volatility.
 R Multiple: Sets target distance relative to stop (risk-reward ratio).
 Position: Choose Long or Short direction.
 Table Position: Controls information table placement and scale.
Dynamic ATR BandsDescription:
The Dynamic ATR Bands indicator visualizes ATR-based stop-loss, take-profit, and trailing levels. Bands can be drawn relative to a fixed entry price or dynamically relative to the current price. It is ideal for trend-following, swing trading, and hybrid strategies, especially on volatile or noisy instruments.
Key Features:
Base ATR Bands:
 
 Plots ATR-based bands above and below a reference price.
 Acts as initial stop-loss or target guidance.
 Adjustable multiplier (default 1× ATR).
 
Extra ATR Band:
 
 Add an additional ATR band at a custom multiplier.
 Position it above or below the reference price.
 Useful for trailing stops or extended profit targets.
 
Hybrid Entry Mode:
 
 Use Fixed Entry Price: bands are drawn relative to your entry and remain fixed.
 Dynamic Mode: bands behave like standard ATR bands, moving with the current price.
 Allows visualization of hybrid ATR stop-loss and trailing strategies.
 
Clean Visuals:
 
 Color-coded bands differentiate base (solid) from extra (semi-transparent).
 
How to Use:
 
 Set ATR length and multipliers according to your strategy.
 Toggle hybrid entry mode and input your entry price, or leave off for dynamic bands.
 Set the extra band multiplier and choose its position (upper/lower).
 Use the bands as visual guides for stop-loss, take-profit, and trailing levels.
 
Inputs:
 
 ATR Length: number of periods for ATR calculation
 Base ATR Multiplier: distance of base bands from reference price
 Extra ATR Multiplier: distance for the additional band
 Extra Band Position: choose Upper or Lower
 Use Fixed Entry Price: toggle hybrid entry mode
 Entry Price: specify entry price if hybrid mode is enabled
 
Note:
This script is visual only; it does not place trades. It is designed to help plan ATR-based stop-loss, take-profit, and hybrid trade management visually on the chart.
Volatilidad Multi-TF📊 Multi-Timeframe Volatility (ATR%)
Description
Indicator that displays the current asset's volatility across multiple timeframes simultaneously. It uses the ATR (Average True Range) normalized as a percentage of price, allowing for objective volatility comparison across different timeframes.
✨ Key Features
- Multi-Timeframe Analysis: Visualize volatility across 5 different timeframes (1H, 4H, D, W, M)
- Normalized Volatility: ATR expressed as a percentage of price for accurate comparison
- Compact Table: Clean and easy-to-read interface in the corner of your chart
- Auto-Update: Automatically adapts to the asset you're viewing
- No Additional Plots: Only displays essential information in table format
🎯 How to Use
1. Add the indicator to your chart
2. The table will automatically display the current asset's volatility
3. Percentage values allow you to quickly identify:
   - Which timeframe has higher/lower volatility
   - Divergences between timeframes
   - High or low volatility zones to adjust your strategies
⚙️ Configurable Parameters
- ATR Period: Default 14, adjust according to your strategy
📈 Practical Applications
- Risk Management: Adjust position sizing based on current volatility
- Asset Selection: Identify assets with suitable volatility for your profile
- Entry Timing: Detect volatility expansions/contractions
- Timeframe Analysis: Compare volatility across different time periods
💡 Technical Notes
- Normalized ATR allows volatility comparison between assets with different prices
- Useful for both intraday trading (1H, 4H) and swing/positional trading (D, W, M)
- Compatible with any market: cryptocurrencies, forex, stocks, indices
⚠️ Disclaimer
This indicator is a technical analysis tool. It does not constitute financial advice. Conduct your own analysis and risk management before trading.
Turtle Strategy - Triple EMA Trend with ADX and ATRDescription 
The Triple EMA Trend strategy is a directional momentum system built on the alignment of three exponential moving averages and a strong ADX confirmation filter. It is designed to capture established trends while maintaining disciplined risk management through ATR-based stops and targets.
 Core Logic 
The system activates only under high-trend conditions, defined by the Average Directional Index (ADX) exceeding a configurable threshold (default: 43).
A bullish setup occurs when the short-term EMA is above the mid-term EMA, which in turn is above the long-term EMA, and price trades above the fastest EMA.
A bearish setup is the mirror condition.
 Execution Rules 
Entry:
 • Long when ADX confirms trend strength and EMA alignment is bullish.
 • Short when ADX confirms trend strength and EMA alignment is bearish.
Exit:
 • Stop Loss: 1.8 × ATR below (for longs) or above (for shorts) the entry price.
 • Take Profit: 3.3 × ATR in the direction of the trade.
Both parameters are configurable.
 Additional Features 
 • Start/end date inputs for controlled backtesting.
 • Selective activation of long or short trades.
 • Built-in commission and position sizing (percent of equity).
 • Full visual representation of EMAs, ADX, stop-loss, and target levels.
This strategy emphasizes clean trend participation, strict entry qualification, and consistent reward-to-risk structure. Ideal for swing or medium-term testing across trending assets.
Daily ATR Zones
Dynamic Daily ATR Projection Zones
### **Description:**
This indicator projects potential price levels for the current trading day based on the Average True Range (ATR) of the previous day. It is designed to help intraday traders visualize daily volatility and identify key potential support, resistance, or target levels that are fixed for the entire session and do not repaint.
**How It Works**
The logic is based on two key components: a stable base price and a reliable volatility measure.
* **Base Price:** The indicator uses the **Open price of the current day** as the central anchor point for all projections.
* **Volatility Measure:** The calculation uses the final, completed **ATR value from the previous day**. This ensures that the projected zones are constant throughout the current trading day and are not subject to repainting.
The projection levels are then calculated using the formula:
`Current Day's Open + (Previous Day's ATR * Multiplier)`
**Features**
This script is fully customizable to fit your trading style:
* **Customizable ATR Multipliers:** Easily define your own price zones by entering a comma-separated list of multipliers (e.g., `0.5, 1.0, 1.5, -0.5, -1.0`).
* **Dynamic & Movable Labels:** The price labels are designed to stay on the right edge of the chart, ensuring they never obscure the current price action.
* **Adjustable Label Position:** Use the "Label Horizontal Offset" setting to control how far the labels are positioned from the current bar, keeping your chart clean.
* **Adjustable Label Size:** Choose from five different sizes (Tiny, Small, Normal, Large, Huge) to ensure the labels are perfectly readable on any device.
* **Toggle Labels:** You can turn all labels on or off with a single checkbox.
* **Full Color Customization:** Set unique colors for the positive (upper), negative (lower), and neutral projection zones.
**How to Use**
This tool can be integrated into various intraday trading strategies:
* **Intraday Targets:** The projected levels can serve as potential take-profit or stop-loss targets for scalpers and day traders.
* **Support & Resistance:** Watch for price reactions, such as bounces or rejections, at these ATR levels, as they often act as dynamic support and resistance zones.
* **Volatility Gauge:** The zones provide a quick visual reference for how far the price has moved relative to its recent average daily range. For example, if the price reaches the `1.0 ATR` level, it has completed an "average" day's move.
Adaptive CE-VWAP Breakout Framework [KedArc Quant]📘 Description
A structured framework that unites three complementary systems into one charting engine:
>Chandelier Exit (CE) – ATR-based trailing logic that defines trend direction, stop placement, and risk/reward overlays.
>Swing-Anchored VWAP (SWAV) – a dynamically anchored VWAP that re-starts from each confirmed swing and adapts its smoothness to volatility.
>Pivot S/R with Volume Breaks – confirmed horizontal levels with alerts when broken on expanding volume.
This script builds a single workflow for bias → trigger → management>without mixing unrelated indicators. Each module is internally linked rather than layered cosmetically, making it a true analytical framework—not.
🙏 Acknowledgment
Special thanks to Dynamic Swing Anchored VWAP by @Zeiierman, whose swing-anchoring concept inspired  a part of the SWAV module’s implementation and adaptation logic.
Support and Resistance Levels with Breaks by @luxalgo for S/R breakout logic.
🎯 How this helps traders
>Trend clarity – CE color-codes direction and provides evolving stops.
>Context value – SWAV traces adaptive mean paths so traders see where price is “heavy” or “light.”
>Action filter – Pivot+volume logic highlights true structural breaks, filtering false moves.
>Discipline tool – Optional R:R boxes visualize risk and target zones to enforce planning.
🧩 Entry / Exit guidelines (for study purposes only)
Bias Use CE direction: green = long bias  ·  red = short bias
Entry
1. Breakout method>– Trade in CE direction when a pivot level breaks on valid volume.
2. VWAP confirmation>– Prefer breaks occurring around the nearest SWAV path (fair-value cross or re-test).
Exit
>Stop = CE line / recent swing HL / ATR × (multiplier)
>Target = R-multiple × risk (default 2 R)
>Optional live update keeps SL/TP aligned with current CE state.
🧮 Core formula concepts
>ATR Stop: `Stop = High/Low – ATR × multiplier`
>VWAP calc: `Σ(price × vol) / Σ(vol)` anchored at swing pivot, adapted by APT (Adaptive Price Tracking) ratio ∝ ATR volatility.
>Volume oscillator: `100 × (EMA₅ – EMA₁₀)/EMA₁₀`; valid break when > threshold %.
⚙️ Input configuration (high-level)
Master Controls
• Show CE / SWAV modules • Theme & Fill opacity
CE Section
• ATR period & multiplier • Use Close for extremums
• Show buy/sell labels • Await bar confirmation
• Risk-Reward overlay: R-multiple, Stop basis (CE/Swing/ATR×), Live update toggle
SWAV Section
• Swing period • Adaptive Price Tracking length • Volatility bias (ATR-based adaptation) • Line width
Pivot & Volume Breaks
• Left/Right bar windows • Volume threshold % • Show Break labels and alerts
⏱ Best timeframes
>Intraday: 5 m – 30 m for breakout confirmation
>Swing: 1 h – 4 h for trend context
  Settings scale with instrument volatility—adjust ATR period and volume threshold to match liquidity.
📘 Glossary
>ATR: Average True Range (volatility metric)
>CE: Chandelier Exit (trailing stop/trend filter)
>SWAV: Swing-Anchored VWAP (anchored mean price path)
>Pivot H/L: Confirmed local extrema using left/right bar windows
>R-multiple: Profit target as a multiple of initial risk
💬 FAQ
Q: Does it repaint? A: No—pivots wait for confirmation and VWAP updates forward-only.
Q: Can modules be disabled? A: Yes—each section has its own toggle.
Q: Can it trade automatically? A: This is an indicator/study, not an auto-strategy.
Q: Is this financial advice? A: No—educational use only.
⚠️ Disclaimer
This script is for educational and analytical purposes only.
It is not financial advice. Trading involves risk of loss. Past performance does not guarantee future results. Always apply sound risk management.
T3 ATR [DCAUT]█ T3 ATR  
 📊 ORIGINALITY & INNOVATION 
The T3 ATR indicator represents an important enhancement to the traditional Average True Range (ATR) indicator by incorporating the T3 (Tilson Triple Exponential Moving Average) smoothing algorithm. While standard ATR uses fixed RMA (Running Moving Average) smoothing, T3 ATR introduces a configurable volume factor parameter that allows traders to adjust the smoothing characteristics from highly responsive to heavily smoothed output.
This innovation addresses a fundamental limitation of traditional ATR: the inability to adapt smoothing behavior without changing the calculation period. With T3 ATR, traders can maintain a consistent ATR period while adjusting the responsiveness through the volume factor, making the indicator adaptable to different trading styles, market conditions, and timeframes through a single unified implementation.
The T3 algorithm's triple exponential smoothing with volume factor control provides improved signal quality by reducing noise while maintaining better responsiveness compared to traditional smoothing methods. This makes T3 ATR particularly valuable for traders who need to adapt their volatility measurement approach to varying market conditions without switching between multiple indicator configurations.
 📐 MATHEMATICAL FOUNDATION 
The T3 ATR calculation process involves two distinct stages:
 Stage 1: True Range Calculation 
The True Range (TR) is calculated using the standard formula:
 
 TR = max(high - low, |high - close |, |low - close |)
 
This captures the greatest of the current bar's range, the gap from the previous close to the current high, or the gap from the previous close to the current low, providing a comprehensive measure of price movement that accounts for gaps and limit moves.
 Stage 2: T3 Smoothing Application 
The True Range values are then smoothed using the T3 algorithm, which applies six exponential moving averages in succession:
 
 First Layer: e1 = EMA(TR, period), e2 = EMA(e1, period)
 Second Layer: e3 = EMA(e2, period), e4 = EMA(e3, period)
 Third Layer: e5 = EMA(e4, period), e6 = EMA(e5, period)
 Final Calculation: T3 = c1×e6 + c2×e5 + c3×e4 + c4×e3
 
The coefficients (c1, c2, c3, c4) are derived from the volume factor (VF) parameter:
 
 a = VF / 2
 c1 = -a³
 c2 = 3a² + 3a³
 c3 = -6a² - 3a - 3a³
 c4 = 1 + 3a + a³ + 3a²
 
The volume factor parameter (0.0 to 1.0) controls the weighting of these coefficients, directly affecting the balance between responsiveness and smoothness:
 
 Lower VF values (approaching 0.0): Coefficients favor recent data, resulting in faster response to volatility changes with minimal lag but potentially more noise
 Higher VF values (approaching 1.0): Coefficients distribute weight more evenly across the smoothing layers, producing smoother output with reduced noise but slightly increased lag
 
 📊 COMPREHENSIVE SIGNAL ANALYSIS 
 Volatility Level Interpretation: 
 
 High Absolute Values: Indicate strong price movements and elevated market activity, suggesting larger position risks and wider stop-loss requirements, often associated with trending markets or significant news events
 Low Absolute Values: Indicate subdued price movements and quiet market conditions, suggesting smaller position risks and tighter stop-loss opportunities, often associated with consolidation phases or low-volume periods
 Rapid Increases: Sharp spikes in T3 ATR often signal the beginning of significant price moves or market regime changes, providing early warning of increased trading risk
 Sustained High Levels: Extended periods of elevated T3 ATR indicate sustained trending conditions with persistent volatility, suitable for trend-following strategies
 Sustained Low Levels: Extended periods of low T3 ATR indicate range-bound conditions with suppressed volatility, suitable for mean-reversion strategies
 
 Volume Factor Impact on Signals: 
 
 Low VF Settings (0.0-0.3): Produce responsive signals that quickly capture volatility changes, suitable for short-term trading but may generate more frequent color changes during minor fluctuations
 Medium VF Settings (0.4-0.7): Provide balanced signal quality with moderate responsiveness, filtering out minor noise while capturing significant volatility changes, suitable for swing trading
 High VF Settings (0.8-1.0): Generate smooth, stable signals that filter out most noise and focus on major volatility trends, suitable for position trading and long-term analysis
 
 🎯 STRATEGIC APPLICATIONS 
 Position Sizing Strategy: 
 
 Determine your risk per trade (e.g., 1% of account capital - adjust based on your risk tolerance and experience)
 Decide your stop-loss distance multiplier (e.g., 2.0x T3 ATR - this varies by market and strategy, test different values)
 Calculate stop-loss distance: Stop Distance = Multiplier × Current T3 ATR
 Calculate position size: Position Size = (Account × Risk %) / Stop Distance
 Example: $10,000 account, 1% risk, T3 ATR = 50 points, 2x multiplier → Position Size = ($10,000 × 0.01) / (2 × 50) = $100 / 100 points = 1 unit per point
 Important: The ATR multiplier (1.5x - 3.0x) should be determined through backtesting for your specific instrument and strategy - using inappropriate multipliers may result in stops that are too tight (frequent stop-outs) or too wide (excessive losses)
 Adjust the volume factor to match your trading style: lower VF for responsive stop distances in short-term trading, higher VF for stable stop distances in position trading
 
 Dynamic Stop-Loss Placement: 
 
 Determine your risk tolerance multiplier (typically 1.5x to 3.0x T3 ATR)
 For long positions: Set stop-loss at entry price minus (multiplier × current T3 ATR value)
 For short positions: Set stop-loss at entry price plus (multiplier × current T3 ATR value)
 Trail stop-losses by recalculating based on current T3 ATR as the trade progresses
 Adjust the volume factor based on desired stop-loss stability: higher VF for less frequent adjustments, lower VF for more adaptive stops
 
 Market Regime Identification: 
 
 Calculate a reference volatility level using a longer-period moving average of T3 ATR (e.g., 50-period SMA)
 High Volatility Regime: Current T3 ATR significantly above reference (e.g., 120%+) - favor trend-following strategies, breakout trades, and wider targets
 Normal Volatility Regime: Current T3 ATR near reference (e.g., 80-120%) - employ standard trading strategies appropriate for prevailing market structure
 Low Volatility Regime: Current T3 ATR significantly below reference (e.g., <80%) - favor mean-reversion strategies, range trading, and prepare for potential volatility expansion
 Monitor T3 ATR trend direction and compare current values to recent history to identify regime transitions early
 
 Risk Management Implementation: 
 
 Establish your maximum portfolio heat (total risk across all positions, typically 2-6% of capital)
 For each position: Calculate position size using the formula Position Size = (Account × Individual Risk %) / (ATR Multiplier × Current T3 ATR)
 When T3 ATR increases: Position sizes automatically decrease (same risk %, larger stop distance = smaller position)
 When T3 ATR decreases: Position sizes automatically increase (same risk %, smaller stop distance = larger position)
 This approach maintains constant dollar risk per trade regardless of market volatility changes
 Use consistent volume factor settings across all positions to ensure uniform risk measurement
 
 📋 DETAILED PARAMETER CONFIGURATION 
 ATR Length Parameter: 
Default Setting: 14 periods
 
 This is the standard ATR calculation period established by Welles Wilder, providing balanced volatility measurement that captures both short-term fluctuations and medium-term trends across most markets and timeframes
 
Selection Principles:
 
 Shorter periods increase sensitivity to recent volatility changes and respond faster to market shifts, but may produce less stable readings
 Longer periods emphasize sustained volatility trends and filter out short-term noise, but respond more slowly to genuine regime changes
 The optimal period depends on your holding time, trading frequency, and the typical volatility cycle of your instrument
 Consider the timeframe you trade: Intraday traders typically use shorter periods, swing traders use intermediate periods, position traders use longer periods
 
Practical Approach:
 
 Start with the default 14 periods and observe how well it captures volatility patterns relevant to your trading decisions
 If ATR seems too reactive to minor price movements: Increase the period until volatility readings better reflect meaningful market changes
 If ATR lags behind obvious volatility shifts that affect your trades: Decrease the period for faster response
 Match the period roughly to your typical holding time - if you hold positions for N bars, consider ATR periods in a similar range
 Test different periods using historical data for your specific instrument and strategy before committing to live trading
 
 T3 Volume Factor Parameter: 
Default Setting: 0.7
 
 This setting provides a reasonable balance between responsiveness and smoothness for most market conditions and trading styles
 
Understanding the Volume Factor:
 
 Lower values (closer to 0.0) reduce smoothing, allowing T3 ATR to respond more quickly to volatility changes but with less noise filtering
 Higher values (closer to 1.0) increase smoothing, producing more stable readings that focus on sustained volatility trends but respond more slowly
 The trade-off is between immediacy and stability - there is no universally optimal setting
 
Selection Principles:
 
 Match to your decision speed: If you need to react quickly to volatility changes for entries/exits, use lower VF; if you're making longer-term risk assessments, use higher VF
 Match to market character: Noisier, choppier markets may benefit from higher VF for clearer signals; cleaner trending markets may work well with lower VF for faster response
 Match to your preference: Some traders prefer responsive indicators even with occasional false signals, others prefer stable indicators even with some delay
 
Practical Adjustment Guidelines:
 
 Start with default 0.7 and observe how T3 ATR behavior aligns with your trading needs over multiple sessions
 If readings seem too unstable or noisy for your decisions: Try increasing VF toward 0.9-1.0 for heavier smoothing
 If the indicator lags too much behind volatility changes you care about: Try decreasing VF toward 0.3-0.5 for faster response
 Make meaningful adjustments (0.2-0.3 changes) rather than small increments - subtle differences are often imperceptible in practice
 Test adjustments in simulation or paper trading before applying to live positions
 
 📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES 
 Responsiveness Characteristics: 
The T3 smoothing algorithm provides improved responsiveness compared to traditional RMA smoothing used in standard ATR. The triple exponential design with volume factor control allows the indicator to respond more quickly to genuine volatility changes while maintaining the ability to filter noise through appropriate VF settings. This results in earlier detection of volatility regime changes compared to standard ATR, particularly valuable for risk management and position sizing adjustments.
 Signal Stability: 
Unlike simple smoothing methods that may produce erratic signals during transitional periods, T3 ATR's multi-layer exponential smoothing provides more stable signal progression. The volume factor parameter allows traders to tune signal stability to their preference, with higher VF settings producing remarkably smooth volatility profiles that help avoid overreaction to temporary market fluctuations.
 Comparison with Standard ATR: 
 
 Adaptability: T3 ATR allows adjustment of smoothing characteristics through the volume factor without changing the ATR period, whereas standard ATR requires changing the period length to alter responsiveness, potentially affecting the fundamental volatility measurement
 Lag Reduction: At lower volume factor settings, T3 ATR responds more quickly to volatility changes than standard ATR with equivalent periods, providing earlier signals for risk management adjustments
 Noise Filtering: At higher volume factor settings, T3 ATR provides superior noise filtering compared to standard ATR, producing cleaner signals for long-term analysis without sacrificing volatility measurement accuracy
 Flexibility: A single T3 ATR configuration can serve multiple trading styles by adjusting only the volume factor, while standard ATR typically requires multiple instances with different periods for different trading applications
 
 Suitable Use Cases: 
T3 ATR is well-suited for the following scenarios:
 
 Dynamic Risk Management: When position sizing and stop-loss placement need to adapt quickly to changing volatility conditions
 Multi-Style Trading: When a single volatility indicator must serve different trading approaches (day trading, swing trading, position trading)
 Volatile Markets: When standard ATR produces too many false volatility signals during choppy conditions
 Systematic Trading: When algorithmic systems require a single, configurable volatility input that can be optimized for different instruments
 Market Regime Analysis: When clear identification of volatility expansion and contraction phases is critical for strategy selection
 
 Known Limitations: 
Like all technical indicators, T3 ATR has limitations that users should understand:
 
 Historical Nature: T3 ATR is calculated from historical price data and cannot predict future volatility with certainty
 Smoothing Trade-offs: The volume factor setting involves a trade-off between responsiveness and smoothness - no single setting is optimal for all market conditions
 Extreme Events: During unprecedented market events or gaps, T3 ATR may not immediately reflect the full scope of volatility until sufficient data is processed
 Relative Measurement: T3 ATR values are most meaningful in relative context (compared to recent history) rather than as absolute thresholds
 Market Context Required: T3 ATR measures volatility magnitude but does not indicate price direction or trend quality - it should be used in conjunction with directional analysis
 
 Performance Expectations: 
T3 ATR is designed to help traders measure and adapt to changing market volatility conditions. When properly configured and applied:
 
 It can help reduce position risk during volatile periods through appropriate position sizing
 It can help identify optimal times for more aggressive position sizing during stable periods
 It can improve stop-loss placement by adapting to current market conditions
 It can assist in strategy selection by identifying volatility regimes
 
However, volatility measurement alone does not guarantee profitable trading. T3 ATR should be integrated into a comprehensive trading approach that includes directional analysis, proper risk management, and sound trading psychology.
 USAGE NOTES 
This indicator is designed for technical analysis and educational purposes. T3 ATR provides adaptive volatility measurement but has limitations and should not be used as the sole basis for trading decisions. The indicator measures historical volatility patterns, and past volatility characteristics do not guarantee future volatility behavior. Market conditions can change rapidly, and extreme events may produce volatility readings that fall outside historical norms.
Traders should combine T3 ATR with directional analysis tools, support/resistance analysis, and other technical indicators to form a complete trading strategy. Proper backtesting and forward testing with appropriate risk management is essential before applying T3 ATR-based strategies to live trading. The volume factor parameter should be optimized for specific instruments and trading styles through careful testing rather than assuming default settings are optimal for all applications.






















