Quantum Rotational Field MappingQuantum Rotational Field Mapping (QRFM):  
Phase Coherence Detection Through Complex-Plane Oscillator Analysis
 Quantum Rotational Field Mapping  applies complex-plane mathematics and phase-space analysis to oscillator ensembles, identifying high-probability trend ignition points by measuring when multiple independent oscillators achieve phase coherence. Unlike traditional multi-oscillator approaches that simply stack indicators or use boolean AND/OR logic, this system converts each oscillator into a rotating phasor (vector) in the complex plane and calculates the  Coherence Index (CI) —a mathematical measure of how tightly aligned the ensemble has become—then generates signals only when alignment, phase direction, and pairwise entanglement all converge.
The indicator combines three mathematical frameworks:  phasor representation  using analytic signal theory to extract phase and amplitude from each oscillator,  coherence measurement  using vector summation in the complex plane to quantify group alignment, and  entanglement analysis  that calculates pairwise phase agreement across all oscillator combinations. This creates a multi-dimensional confirmation system that distinguishes between random oscillator noise and genuine regime transitions.
 What Makes This Original 
 Complex-Plane Phasor Framework 
This indicator implements classical signal processing mathematics adapted for market oscillators. Each oscillator—whether RSI, MACD, Stochastic, CCI, Williams %R, MFI, ROC, or TSI—is first normalized to a common   scale, then converted into a complex-plane representation using an  in-phase (I)  and  quadrature (Q)  component. The in-phase component is the oscillator value itself, while the quadrature component is calculated as the first difference (derivative proxy), creating a velocity-aware representation.
 From these components, the system extracts: 
 Phase (φ) : Calculated as φ = atan2(Q, I), representing the oscillator's position in its cycle (mapped to -180° to +180°)
 Amplitude (A) : Calculated as A = √(I² + Q²), representing the oscillator's strength or conviction
This mathematical approach is fundamentally different from simply reading oscillator values. A phasor captures both  where  an oscillator is in its cycle (phase angle) and  how strongly  it's expressing that position (amplitude). Two oscillators can have the same value but be in opposite phases of their cycles—traditional analysis would see them as identical, while QRFM sees them as 180° out of phase (contradictory).
 Coherence Index Calculation 
The core innovation is the  Coherence Index (CI) , borrowed from physics and signal processing. When you have N oscillators, each with phase φₙ, you can represent each as a unit vector in the complex plane: e^(iφₙ) = cos(φₙ) + i·sin(φₙ).
 The CI measures what happens when you sum all these vectors: 
 Resultant Vector : R = Σ e^(iφₙ) = Σ cos(φₙ) + i·Σ sin(φₙ)
 Coherence Index : CI = |R| / N
Where |R| is the magnitude of the resultant vector and N is the number of active oscillators.
The CI ranges from 0 to 1:
 CI = 1.0 : Perfect coherence—all oscillators have identical phase angles, vectors point in the same direction, creating maximum constructive interference
 CI = 0.0 : Complete decoherence—oscillators are randomly distributed around the circle, vectors cancel out through destructive interference
 0 < CI < 1 : Partial alignment—some clustering with some scatter
This is not a simple average or correlation. The CI captures  phase synchronization  across the entire ensemble simultaneously. When oscillators phase-lock (align their cycles), the CI spikes regardless of their individual values. This makes it sensitive to regime transitions that traditional indicators miss.
 Dominant Phase and Direction Detection 
Beyond measuring alignment strength, the system calculates the  dominant phase  of the ensemble—the direction the resultant vector points:
 Dominant Phase : φ_dom = atan2(Σ sin(φₙ), Σ cos(φₙ))
This gives the "average direction" of all oscillator phases, mapped to -180° to +180°:
 +90° to -90°  (right half-plane): Bullish phase dominance
 +90° to +180° or -90° to -180°  (left half-plane): Bearish phase dominance
The combination of CI magnitude (coherence strength) and dominant phase angle (directional bias) creates a two-dimensional signal space. High CI alone is insufficient—you need high CI  plus  dominant phase pointing in a tradeable direction. This dual requirement is what separates QRFM from simple oscillator averaging.
 Entanglement Matrix and Pairwise Coherence 
While the CI measures global alignment, the  entanglement matrix  measures local pairwise relationships. For every pair of oscillators (i, j), the system calculates:
 E(i,j) = |cos(φᵢ - φⱼ)| 
This represents the phase agreement between oscillators i and j:
 E = 1.0 : Oscillators are in-phase (0° or 360° apart)
 E = 0.0 : Oscillators are in quadrature (90° apart, orthogonal)
 E between 0 and 1 : Varying degrees of alignment
The system counts how many oscillator pairs exceed a user-defined entanglement threshold (e.g., 0.7). This  entangled pairs count  serves as a confirmation filter: signals require not just high global CI, but also a minimum number of strong pairwise agreements. This prevents false ignitions where CI is high but driven by only two oscillators while the rest remain scattered.
The entanglement matrix creates an N×N symmetric matrix that can be visualized as a web—when many cells are bright (high E values), the ensemble is highly interconnected. When cells are dark, oscillators are moving independently.
 Phase-Lock Tolerance Mechanism 
A complementary confirmation layer is the  phase-lock detector . This calculates the maximum phase spread across all oscillators:
For all pairs (i,j), compute angular distance: Δφ = |φᵢ - φⱼ|, wrapping at 180°
 Max Spread  = maximum Δφ across all pairs
If max spread < user threshold (e.g., 35°), the ensemble is considered  phase-locked —all oscillators are within a narrow angular band.
This differs from entanglement: entanglement measures pairwise cosine similarity (magnitude of alignment), while phase-lock measures maximum angular deviation (tightness of clustering). Both must be satisfied for the highest-conviction signals.
 Multi-Layer Visual Architecture 
QRFM includes six visual components that represent the same underlying mathematics from different perspectives:
 Circular Orbit Plot : A polar coordinate grid showing each oscillator as a vector from origin to perimeter. Angle = phase, radius = amplitude. This is a real-time snapshot of the complex plane. When vectors converge (point in similar directions), coherence is high. When scattered randomly, coherence is low. Users can  see  phase alignment forming before CI numerically confirms it.
 Phase-Time Heat Map : A 2D matrix with rows = oscillators and columns = time bins. Each cell is colored by the oscillator's phase at that time (using a gradient where color hue maps to angle). Horizontal color bands indicate sustained phase alignment over time. Vertical color bands show moments when all oscillators shared the same phase (ignition points). This provides historical pattern recognition.
 Entanglement Web Matrix : An N×N grid showing E(i,j) for all pairs. Cells are colored by entanglement strength—bright yellow/gold for high E, dark gray for low E. This reveals  which  oscillators are driving coherence and which are lagging. For example, if RSI and MACD show high E but Stochastic shows low E with everything, Stochastic is the outlier.
 Quantum Field Cloud : A background color overlay on the price chart. Color (green = bullish, red = bearish) is determined by dominant phase. Opacity is determined by CI—high CI creates dense, opaque cloud; low CI creates faint, nearly invisible cloud. This gives an atmospheric "feel" for regime strength without looking at numbers.
 Phase Spiral : A smoothed plot of dominant phase over recent history, displayed as a curve that wraps around price. When the spiral is tight and rotating steadily, the ensemble is in coherent rotation (trending). When the spiral is loose or erratic, coherence is breaking down.
 Dashboard : A table showing real-time metrics: CI (as percentage), dominant phase (in degrees with directional arrow), field strength (CI × average amplitude), entangled pairs count, phase-lock status (locked/unlocked), quantum state classification ("Ignition", "Coherent", "Collapse", "Chaos"), and collapse risk (recent CI change normalized to 0-100%).
Each component is independently toggleable, allowing users to customize their workspace. The orbit plot is the most essential—it provides intuitive, visual feedback on phase alignment that no numerical dashboard can match.
 Core Components and How They Work Together 
 1. Oscillator Normalization Engine 
The foundation is creating a common measurement scale. QRFM supports eight oscillators:
 RSI : Normalized from   to   using overbought/oversold levels (70, 30) as anchors
 MACD Histogram : Normalized by dividing by rolling standard deviation, then clamped to  
 Stochastic %K : Normalized from   using (80, 20) anchors
 CCI : Divided by 200 (typical extreme level), clamped to  
 Williams %R : Normalized from   using (-20, -80) anchors
 MFI : Normalized from   using (80, 20) anchors
 ROC : Divided by 10, clamped to  
 TSI : Divided by 50, clamped to  
Each oscillator can be individually enabled/disabled. Only active oscillators contribute to phase calculations. The normalization removes scale differences—a reading of +0.8 means "strongly bullish" regardless of whether it came from RSI or TSI.
 2. Analytic Signal Construction 
For each active oscillator at each bar, the system constructs the analytic signal:
 In-Phase (I) : The normalized oscillator value itself
 Quadrature (Q) : The bar-to-bar change in the normalized value (first derivative approximation)
This creates a 2D representation: (I, Q). The phase is extracted as:
φ = atan2(Q, I) × (180 / π)
This maps the oscillator to a point on the unit circle. An oscillator at the same value but rising (positive Q) will have a different phase than one that is falling (negative Q). This velocity-awareness is critical—it distinguishes between "at resistance and stalling" versus "at resistance and breaking through."
The amplitude is extracted as:
A = √(I² + Q²)
This represents the distance from origin in the (I, Q) plane. High amplitude means the oscillator is far from neutral (strong conviction). Low amplitude means it's near zero (weak/transitional state).
3. Coherence Calculation Pipeline
For each bar (or every Nth bar if phase sample rate > 1 for performance):
 Step 1 : Extract phase φₙ for each of the N active oscillators
 Step 2 : Compute complex exponentials: Zₙ = e^(i·φₙ·π/180) = cos(φₙ·π/180) + i·sin(φₙ·π/180)
 Step 3 : Sum the complex exponentials: R = Σ Zₙ = (Σ cos φₙ) + i·(Σ sin φₙ)
 Step 4 : Calculate magnitude: |R| = √ 
 Step 5 : Normalize by count: CI_raw = |R| / N
 Step 6 : Smooth the CI: CI = SMA(CI_raw, smoothing_window)
The smoothing step (default 2 bars) removes single-bar noise spikes while preserving structural coherence changes. Users can adjust this to control reactivity versus stability.
The dominant phase is calculated as:
φ_dom = atan2(Σ sin φₙ, Σ cos φₙ) × (180 / π)
This is the angle of the resultant vector R in the complex plane.
 4. Entanglement Matrix Construction 
For all unique pairs of oscillators (i, j) where i < j:
 Step 1 : Get phases φᵢ and φⱼ
 Step 2 : Compute phase difference: Δφ = φᵢ - φⱼ (in radians)
 Step 3 : Calculate entanglement: E(i,j) = |cos(Δφ)|
 Step 4 : Store in symmetric matrix: matrix  = matrix  = E(i,j)
The matrix is then scanned: count how many E(i,j) values exceed the user-defined threshold (default 0.7). This count is the  entangled pairs  metric.
For visualization, the matrix is rendered as an N×N table where cell brightness maps to E(i,j) intensity.
 5. Phase-Lock Detection 
 Step 1 : For all unique pairs (i, j), compute angular distance: Δφ = |φᵢ - φⱼ|
 Step 2 : Wrap angles: if Δφ > 180°, set Δφ = 360° - Δφ
 Step 3 : Find maximum: max_spread = max(Δφ) across all pairs
 Step 4 : Compare to tolerance: phase_locked = (max_spread < tolerance)
If phase_locked is true, all oscillators are within the specified angular cone (e.g., 35°). This is a boolean confirmation filter.
 6. Signal Generation Logic 
Signals are generated through multi-layer confirmation:
 Long Ignition Signal :
CI crosses above ignition threshold (e.g., 0.80)
 AND  dominant phase is in bullish range (-90° < φ_dom < +90°)
 AND  phase_locked = true
 AND  entangled_pairs >= minimum threshold (e.g., 4)
 Short Ignition Signal :
CI crosses above ignition threshold
 AND  dominant phase is in bearish range (φ_dom < -90° OR φ_dom > +90°)
 AND  phase_locked = true
 AND  entangled_pairs >= minimum threshold
 Collapse Signal :
CI at bar   minus CI at current bar > collapse threshold (e.g., 0.55)
 AND  CI at bar   was above 0.6 (must collapse from coherent state, not from already-low state)
These are strict conditions. A high CI alone does not generate a signal—dominant phase must align with direction, oscillators must be phase-locked, and sufficient pairwise entanglement must exist. This multi-factor gating dramatically reduces false signals compared to single-condition triggers.
 Calculation Methodology 
 Phase 1: Oscillator Computation and Normalization 
On each bar, the system calculates the raw values for all enabled oscillators using standard Pine Script functions:
RSI: ta.rsi(close, length)
MACD: ta.macd() returning histogram component
Stochastic: ta.stoch() smoothed with ta.sma()
CCI: ta.cci(close, length)
Williams %R: ta.wpr(length)
MFI: ta.mfi(hlc3, length)
ROC: ta.roc(close, length)
TSI: ta.tsi(close, short, long)
Each raw value is then passed through a normalization function:
normalize(value, overbought_level, oversold_level) = 2 × (value - oversold) / (overbought - oversold) - 1
This maps the oscillator's typical range to  , where -1 represents extreme bearish, 0 represents neutral, and +1 represents extreme bullish.
For oscillators without fixed ranges (MACD, ROC, TSI), statistical normalization is used: divide by a rolling standard deviation or fixed divisor, then clamp to  .
 Phase 2: Phasor Extraction 
For each normalized oscillator value val:
I = val (in-phase component)
Q = val - val  (quadrature component, first difference)
Phase calculation:
phi_rad = atan2(Q, I)
phi_deg = phi_rad × (180 / π)
Amplitude calculation:
A = √(I² + Q²)
These values are stored in arrays: osc_phases  and osc_amps  for each oscillator n.
 Phase 3: Complex Summation and Coherence 
Initialize accumulators:
sum_cos = 0
sum_sin = 0
For each oscillator n = 0 to N-1:
phi_rad = osc_phases  × (π / 180)
sum_cos += cos(phi_rad)
sum_sin += sin(phi_rad)
Resultant magnitude:
resultant_mag = √(sum_cos² + sum_sin²)
Coherence Index (raw):
CI_raw = resultant_mag / N
Smoothed CI:
CI = SMA(CI_raw, smoothing_window)
Dominant phase:
phi_dom_rad = atan2(sum_sin, sum_cos)
phi_dom_deg = phi_dom_rad × (180 / π)
Phase 4: Entanglement Matrix Population
For i = 0 to N-2:
For j = i+1 to N-1:
phi_i = osc_phases  × (π / 180)
phi_j = osc_phases  × (π / 180)
delta_phi = phi_i - phi_j
E = |cos(delta_phi)|
matrix_index_ij = i × N + j
matrix_index_ji = j × N + i
entangle_matrix  = E
entangle_matrix  = E
if E >= threshold:
  entangled_pairs += 1
The matrix uses flat array storage with index mapping: index(row, col) = row × N + col.
 Phase 5: Phase-Lock Check 
max_spread = 0
For i = 0 to N-2:
For j = i+1 to N-1:
delta = |osc_phases  - osc_phases |
if delta > 180:
delta = 360 - delta
max_spread = max(max_spread, delta)
phase_locked = (max_spread < tolerance)
 Phase 6: Signal Evaluation 
 Ignition Long :
ignition_long = (CI crosses above threshold) AND
(phi_dom > -90 AND phi_dom < 90) AND
phase_locked AND
(entangled_pairs >= minimum)
 Ignition Short :
ignition_short = (CI crosses above threshold) AND
(phi_dom < -90 OR phi_dom > 90) AND
phase_locked AND
(entangled_pairs >= minimum)
 Collapse :
CI_prev = CI 
collapse = (CI_prev - CI > collapse_threshold) AND (CI_prev > 0.6)
All signals are evaluated on bar close. The crossover and crossunder functions ensure signals fire only once when conditions transition from false to true.
 Phase 7: Field Strength and Visualization Metrics 
 Average Amplitude :
avg_amp = (Σ osc_amps ) / N
 Field Strength :
field_strength = CI × avg_amp
 Collapse Risk  (for dashboard):
collapse_risk = (CI  - CI) / max(CI , 0.1)
collapse_risk_pct = clamp(collapse_risk × 100, 0, 100)
 Quantum State Classification :
if (CI > threshold AND phase_locked):
state = "Ignition"
else if (CI > 0.6):
state = "Coherent"
else if (collapse):
state = "Collapse"
else:
state = "Chaos"
 Phase 8: Visual Rendering 
 Orbit Plot : For each oscillator, convert polar (phase, amplitude) to Cartesian (x, y) for grid placement:
radius = amplitude × grid_center × 0.8
x = radius × cos(phase × π/180)
y = radius × sin(phase × π/180)
col = center + x (mapped to grid coordinates)
row = center - y
 Heat Map : For each oscillator row and time column, retrieve historical phase value at lookback = (columns - col) × sample_rate, then map phase to color using a hue gradient.
 Entanglement Web : Render matrix  as table cell with background color opacity = E(i,j).
 Field Cloud : Background color = (phi_dom > -90 AND phi_dom < 90) ? green : red, with opacity = mix(min_opacity, max_opacity, CI).
All visual components render only on the last bar (barstate.islast) to minimize computational overhead.
 How to Use This Indicator 
 Step 1 : Apply QRFM to your chart. It works on all timeframes and asset classes, though 15-minute to 4-hour timeframes provide the best balance of responsiveness and noise reduction.
 Step 2 : Enable the dashboard (default: top right) and the circular orbit plot (default: middle left). These are your primary visual feedback tools.
 Step 3 : Optionally enable the heat map, entanglement web, and field cloud based on your preference. New users may find all visuals overwhelming; start with dashboard + orbit plot.
 Step 4 : Observe for 50-100 bars to let the indicator establish baseline coherence patterns. Markets have different "normal" CI ranges—some instruments naturally run higher or lower coherence.
 Understanding the Circular Orbit Plot 
The orbit plot is a polar grid showing oscillator vectors in real-time:
 Center point : Neutral (zero phase and amplitude)
 Each vector : A line from center to a point on the grid
 Vector angle : The oscillator's phase (0° = right/east, 90° = up/north, 180° = left/west, -90° = down/south)
 Vector length : The oscillator's amplitude (short = weak signal, long = strong signal)
 Vector label : First letter of oscillator name (R = RSI, M = MACD, etc.)
 What to watch :
 Convergence : When all vectors cluster in one quadrant or sector, CI is rising and coherence is forming. This is your pre-signal warning.
 Scatter : When vectors point in random directions (360° spread), CI is low and the market is in a non-trending or transitional regime.
 Rotation : When the cluster rotates smoothly around the circle, the ensemble is in coherent oscillation—typically seen during steady trends.
 Sudden flips : When the cluster rapidly jumps from one side to the opposite (e.g., +90° to -90°), a phase reversal has occurred—often coinciding with trend reversals.
Example: If you see RSI, MACD, and Stochastic all pointing toward 45° (northeast) with long vectors, while CCI, TSI, and ROC point toward 40-50° as well, coherence is high and dominant phase is bullish. Expect an ignition signal if CI crosses threshold.
 Reading Dashboard Metrics 
The dashboard provides numerical confirmation of what the orbit plot shows visually:
 CI : Displays as 0-100%. Above 70% = high coherence (strong regime), 40-70% = moderate, below 40% = low (poor conditions for trend entries).
 Dom Phase : Angle in degrees with directional arrow. ⬆ = bullish bias, ⬇ = bearish bias, ⬌ = neutral.
 Field Strength : CI weighted by amplitude. High values (> 0.6) indicate not just alignment but  strong  alignment.
 Entangled Pairs : Count of oscillator pairs with E > threshold. Higher = more confirmation. If minimum is set to 4, you need at least 4 pairs entangled for signals.
 Phase Lock : 🔒 YES (all oscillators within tolerance) or 🔓 NO (spread too wide).
 State : Real-time classification:
🚀 IGNITION: CI just crossed threshold with phase-lock
⚡ COHERENT: CI is high and stable
💥 COLLAPSE: CI has dropped sharply
🌀 CHAOS: Low CI, scattered phases
 Collapse Risk : 0-100% scale based on recent CI change. Above 50% warns of imminent breakdown.
Interpreting Signals
 Long Ignition (Blue Triangle Below Price) :
Occurs when CI crosses above threshold (e.g., 0.80)
Dominant phase is in bullish range (-90° to +90°)
All oscillators are phase-locked (within tolerance)
Minimum entangled pairs requirement met
 Interpretation : The oscillator ensemble has transitioned from disorder to coherent bullish alignment. This is a high-probability long entry point. The multi-layer confirmation (CI + phase direction + lock + entanglement) ensures this is not a single-oscillator whipsaw.
 Short Ignition (Red Triangle Above Price) :
Same conditions as long, but dominant phase is in bearish range (< -90° or > +90°)
 Interpretation : Coherent bearish alignment has formed. High-probability short entry.
 Collapse (Circles Above and Below Price) :
CI has dropped by more than the collapse threshold (e.g., 0.55) over a 5-bar window
CI was previously above 0.6 (collapsing from coherent state)
 Interpretation : Phase coherence has broken down. If you are in a position, this is an exit warning. If looking to enter, stand aside—regime is transitioning.
 Phase-Time Heat Map Patterns 
Enable the heat map and position it at bottom right. The rows represent individual oscillators, columns represent time bins (most recent on left).
 Pattern: Horizontal Color Bands 
If a row (e.g., RSI) shows consistent color across columns (say, green for several bins), that oscillator has maintained stable phase over time. If  all  rows show horizontal bands of similar color, the entire ensemble has been phase-locked for an extended period—this is a strong trending regime.
 Pattern: Vertical Color Bands 
If a column (single time bin) shows all cells with the same or very similar color, that moment in time had high coherence. These vertical bands often align with ignition signals or major price pivots.
 Pattern: Rainbow Chaos 
If cells are random colors (red, green, yellow mixed with no pattern), coherence is low. The ensemble is scattered. Avoid trading during these periods unless you have external confirmation.
 Pattern: Color Transition 
If you see a row transition from red to green (or vice versa) sharply, that oscillator has phase-flipped. If multiple rows do this simultaneously, a regime change is underway.
 Entanglement Web Analysis 
Enable the web matrix (default: opposite corner from heat map). It shows an N×N grid where N = number of active oscillators.
 Bright Yellow/Gold Cells : High pairwise entanglement. For example, if the RSI-MACD cell is bright gold, those two oscillators are moving in phase. If the RSI-Stochastic cell is bright, they are entangled as well.
 Dark Gray Cells : Low entanglement. Oscillators are decorrelated or in quadrature.
 Diagonal : Always marked with "—" because an oscillator is always perfectly entangled with itself.
 How to use :
Scan for clustering: If most cells are bright, coherence is high across the board. If only a few cells are bright, coherence is driven by a subset (e.g., RSI and MACD are aligned, but nothing else is—weak signal).
Identify laggards: If one row/column is entirely dark, that oscillator is the outlier. You may choose to disable it or monitor for when it joins the group (late confirmation).
Watch for web formation: During low-coherence periods, the matrix is mostly dark. As coherence builds, cells begin lighting up. A sudden "web" of connections forming visually precedes ignition signals.
Trading Workflow
 Step 1: Monitor Coherence Level 
Check the dashboard CI metric or observe the orbit plot. If CI is below 40% and vectors are scattered, conditions are poor for trend entries. Wait.
 Step 2: Detect Coherence Building 
When CI begins rising (say, from 30% to 50-60%) and you notice vectors on the orbit plot starting to cluster, coherence is forming. This is your alert phase—do not enter yet, but prepare.
 Step 3: Confirm Phase Direction 
Check the dominant phase angle and the orbit plot quadrant where clustering is occurring:
Clustering in right half (0° to ±90°): Bullish bias forming
Clustering in left half (±90° to 180°): Bearish bias forming
Verify the dashboard shows the corresponding directional arrow (⬆ or ⬇).
 Step 4: Wait for Signal Confirmation 
Do  not  enter based on rising CI alone. Wait for the full ignition signal:
CI crosses above threshold
Phase-lock indicator shows 🔒 YES
Entangled pairs count >= minimum
Directional triangle appears on chart
This ensures all layers have aligned.
 Step 5: Execute Entry 
 Long : Blue triangle below price appears → enter long
 Short : Red triangle above price appears → enter short
 Step 6: Position Management 
 Initial Stop : Place stop loss based on your risk management rules (e.g., recent swing low/high, ATR-based buffer).
 Monitoring :
Watch the field cloud density. If it remains opaque and colored in your direction, the regime is intact.
Check dashboard collapse risk. If it rises above 50%, prepare for exit.
Monitor the orbit plot. If vectors begin scattering or the cluster flips to the opposite side, coherence is breaking.
 Exit Triggers :
Collapse signal fires (circles appear)
Dominant phase flips to opposite half-plane
CI drops below 40% (coherence lost)
Price hits your profit target or trailing stop
 Step 7: Post-Exit Analysis 
After exiting, observe whether a new ignition forms in the opposite direction (reversal) or if CI remains low (transition to range). Use this to decide whether to re-enter, reverse, or stand aside.
 Best Practices 
 Use Price Structure as Context 
QRFM identifies  when  coherence forms but does not specify  where  price will go. Combine ignition signals with support/resistance levels, trendlines, or chart patterns. For example:
Long ignition near a major support level after a pullback: high-probability bounce
Long ignition in the middle of a range with no structure: lower probability
 Multi-Timeframe Confirmation 
 Open QRFM on two timeframes simultaneously: 
Higher timeframe (e.g., 4-hour): Use CI level to determine regime bias. If 4H CI is above 60% and dominant phase is bullish, the market is in a bullish regime.
Lower timeframe (e.g., 15-minute): Execute entries on ignition signals that align with the higher timeframe bias.
This prevents counter-trend trades and increases win rate.
 Distinguish Between Regime Types 
 High CI, stable dominant phase (State: Coherent) : Trending market. Ignitions are continuation signals; collapses are profit-taking or reversal warnings.
 Low CI, erratic dominant phase (State: Chaos) : Ranging or choppy market. Avoid ignition signals or reduce position size. Wait for coherence to establish.
 Moderate CI with frequent collapses : Whipsaw environment. Use wider stops or stand aside.
 Adjust Parameters to Instrument and Timeframe 
 Crypto/Forex (high volatility) : Lower ignition threshold (0.65-0.75), lower CI smoothing (2-3), shorter oscillator lengths (7-10).
 Stocks/Indices (moderate volatility) : Standard settings (threshold 0.75-0.85, smoothing 5-7, oscillator lengths 14).
 Lower timeframes (5-15 min) : Reduce phase sample rate to 1-2 for responsiveness.
 Higher timeframes (daily+) : Increase CI smoothing and oscillator lengths for noise reduction.
 Use Entanglement Count as Conviction Filter 
 The minimum entangled pairs setting controls signal strictness: 
 Low (1-2) : More signals, lower quality (acceptable if you have other confirmation)
 Medium (3-5) : Balanced (recommended for most traders)
 High (6+) : Very strict, fewer signals, highest quality
Adjust based on your trade frequency preference and risk tolerance.
 Monitor Oscillator Contribution 
Use the entanglement web to see which oscillators are driving coherence. If certain oscillators are consistently dark (low E with all others), they may be adding noise. Consider disabling them. For example:
On low-volume instruments, MFI may be unreliable → disable MFI
On strongly trending instruments, mean-reversion oscillators (Stochastic, RSI) may lag → reduce weight or disable
 Respect the Collapse Signal 
Collapse events are early warnings. Price may continue in the original direction for several bars after collapse fires, but the underlying regime has weakened. Best practice:
If in profit: Take partial or full profit on collapse
If at breakeven/small loss: Exit immediately
If collapse occurs shortly after entry: Likely a false ignition; exit to avoid drawdown
Collapses do not guarantee immediate reversals—they signal  uncertainty .
 Combine with Volume Analysis 
If your instrument has reliable volume:
Ignitions with expanding volume: Higher conviction
Ignitions with declining volume: Weaker, possibly false
Collapses with volume spikes: Strong reversal signal
Collapses with low volume: May just be consolidation
Volume is not built into QRFM (except via MFI), so add it as external confirmation.
 Observe the Phase Spiral 
The spiral provides a quick visual cue for rotation consistency:
 Tight, smooth spiral : Ensemble is rotating coherently (trending)
 Loose, erratic spiral : Phase is jumping around (ranging or transitional)
If the spiral tightens, coherence is building. If it loosens, coherence is dissolving.
 Do Not Overtrade Low-Coherence Periods 
When CI is persistently below 40% and the state is "Chaos," the market is not in a regime where phase analysis is predictive. During these times:
Reduce position size
Widen stops
Wait for coherence to return
QRFM's strength is regime detection. If there is no regime, the tool correctly signals "stand aside."
 Use Alerts Strategically 
 Set alerts for: 
Long Ignition
Short Ignition
Collapse
Phase Lock (optional)
Configure alerts to "Once per bar close" to avoid intrabar repainting and noise. When an alert fires, manually verify:
Orbit plot shows clustering
Dashboard confirms all conditions
Price structure supports the trade
Do not blindly trade alerts—use them as prompts for analysis.
Ideal Market Conditions
Best Performance
 Instruments :
Liquid, actively traded markets (major forex pairs, large-cap stocks, major indices, top-tier crypto)
Instruments with clear cyclical oscillator behavior (avoid extremely illiquid or manipulated markets)
 Timeframes :
15-minute to 4-hour: Optimal balance of noise reduction and responsiveness
1-hour to daily: Slower, higher-conviction signals; good for swing trading
5-minute: Acceptable for scalping if parameters are tightened and you accept more noise
 Market Regimes :
Trending markets with periodic retracements (where oscillators cycle through phases predictably)
Breakout environments (coherence forms before/during breakout; collapse occurs at exhaustion)
Rotational markets with clear swings (oscillators phase-lock at turning points)
 Volatility :
Moderate to high volatility (oscillators have room to move through their ranges)
Stable volatility regimes (sudden VIX spikes or flash crashes may create false collapses)
Challenging Conditions
 Instruments :
Very low liquidity markets (erratic price action creates unstable oscillator phases)
Heavily news-driven instruments (fundamentals may override technical coherence)
Highly correlated instruments (oscillators may all reflect the same underlying factor, reducing independence)
 Market Regimes :
Deep, prolonged consolidation (oscillators remain near neutral, CI is chronically low, few signals fire)
Extreme chop with no directional bias (oscillators whipsaw, coherence never establishes)
Gap-driven markets (large overnight gaps create phase discontinuities)
 Timeframes :
Sub-5-minute charts: Noise dominates; oscillators flip rapidly; coherence is fleeting and unreliable
Weekly/monthly: Oscillators move extremely slowly; signals are rare; better suited for long-term positioning than active trading
 Special Cases :
During major economic releases or earnings: Oscillators may lag price or become decorrelated as fundamentals overwhelm technicals. Reduce position size or stand aside.
In extremely low-volatility environments (e.g., holiday periods): Oscillators compress to neutral, CI may be artificially high due to lack of movement, but signals lack follow-through.
Adaptive Behavior
QRFM is designed to self-adapt to poor conditions:
When coherence is genuinely absent, CI remains low and signals do not fire
When only a subset of oscillators aligns, entangled pairs count stays below threshold and signals are filtered out
When phase-lock cannot be achieved (oscillators too scattered), the lock filter prevents signals
This means the indicator will naturally produce fewer (or zero) signals during unfavorable conditions, rather than generating false signals. This is a  feature —it keeps you out of low-probability trades.
Parameter Optimization by Trading Style
Scalping (5-15 Minute Charts)
 Goal : Maximum responsiveness, accept higher noise
 Oscillator Lengths :
RSI: 7-10
MACD: 8/17/6
Stochastic: 8-10, smooth 2-3
CCI: 14-16
Others: 8-12
 Coherence Settings :
CI Smoothing Window: 2-3 bars (fast reaction)
Phase Sample Rate: 1 (every bar)
Ignition Threshold: 0.65-0.75 (lower for more signals)
Collapse Threshold: 0.40-0.50 (earlier exit warnings)
 Confirmation :
Phase Lock Tolerance: 40-50° (looser, easier to achieve)
Min Entangled Pairs: 2-3 (fewer oscillators required)
 Visuals :
Orbit Plot + Dashboard only (reduce screen clutter for fast decisions)
Disable heavy visuals (heat map, web) for performance
 Alerts :
Enable all ignition and collapse alerts
Set to "Once per bar close"
Day Trading (15-Minute to 1-Hour Charts)
 Goal : Balance between responsiveness and reliability
 Oscillator Lengths :
RSI: 14 (standard)
MACD: 12/26/9 (standard)
Stochastic: 14, smooth 3
CCI: 20
Others: 10-14
 Coherence Settings :
CI Smoothing Window: 3-5 bars (balanced)
Phase Sample Rate: 2-3
Ignition Threshold: 0.75-0.85 (moderate selectivity)
Collapse Threshold: 0.50-0.55 (balanced exit timing)
 Confirmation :
Phase Lock Tolerance: 30-40° (moderate tightness)
Min Entangled Pairs: 4-5 (reasonable confirmation)
 Visuals :
Orbit Plot + Dashboard + Heat Map or Web (choose one)
Field Cloud for regime backdrop
 Alerts :
Ignition and collapse alerts
Optional phase-lock alert for advance warning
Swing Trading (4-Hour to Daily Charts)
 Goal : High-conviction signals, minimal noise, fewer trades
 Oscillator Lengths :
RSI: 14-21
MACD: 12/26/9 or 19/39/9 (longer variant)
Stochastic: 14-21, smooth 3-5
CCI: 20-30
Others: 14-20
 Coherence Settings :
CI Smoothing Window: 5-10 bars (very smooth)
Phase Sample Rate: 3-5
Ignition Threshold: 0.80-0.90 (high bar for entry)
Collapse Threshold: 0.55-0.65 (only significant breakdowns)
 Confirmation :
Phase Lock Tolerance: 20-30° (tight clustering required)
Min Entangled Pairs: 5-7 (strong confirmation)
 Visuals :
All modules enabled (you have time to analyze)
Heat Map for multi-bar pattern recognition
Web for deep confirmation analysis
 Alerts :
Ignition and collapse
Review manually before entering (no rush)
Position/Long-Term Trading (Daily to Weekly Charts)
 Goal : Rare, very high-conviction regime shifts
 Oscillator Lengths :
RSI: 21-30
MACD: 19/39/9 or 26/52/12
Stochastic: 21, smooth 5
CCI: 30-50
Others: 20-30
 Coherence Settings :
CI Smoothing Window: 10-14 bars
Phase Sample Rate: 5 (every 5th bar to reduce computation)
Ignition Threshold: 0.85-0.95 (only extreme alignment)
Collapse Threshold: 0.60-0.70 (major regime breaks only)
 Confirmation :
Phase Lock Tolerance: 15-25° (very tight)
Min Entangled Pairs: 6+ (broad consensus required)
 Visuals :
Dashboard + Orbit Plot for quick checks
Heat Map to study historical coherence patterns
Web to verify deep entanglement
 Alerts :
Ignition only (collapses are less critical on long timeframes)
Manual review with fundamental analysis overlay
Performance Optimization (Low-End Systems)
If you experience lag or slow rendering:
 Reduce Visual Load :
Orbit Grid Size: 8-10 (instead of 12+)
Heat Map Time Bins: 5-8 (instead of 10+)
Disable Web Matrix entirely if not needed
Disable Field Cloud and Phase Spiral
 Reduce Calculation Frequency :
Phase Sample Rate: 5-10 (calculate every 5-10 bars)
Max History Depth: 100-200 (instead of 500+)
 Disable Unused Oscillators :
If you only want RSI, MACD, and Stochastic, disable the other five. Fewer oscillators = smaller matrices, faster loops.
 Simplify Dashboard :
Choose "Small" dashboard size
Reduce number of metrics displayed
These settings will not significantly degrade signal quality (signals are based on bar-close calculations, which remain accurate), but will improve chart responsiveness.
Important Disclaimers
This indicator is a technical analysis tool designed to identify periods of phase coherence across an ensemble of oscillators. It is  not  a standalone trading system and does not guarantee profitable trades. The Coherence Index, dominant phase, and entanglement metrics are mathematical calculations applied to historical price data—they measure past oscillator behavior and do not predict future price movements with certainty.
 No Predictive Guarantee : High coherence indicates that oscillators are currently aligned, which historically has coincided with trending or directional price movement. However, past alignment does not guarantee future trends. Markets can remain coherent while prices consolidate, or lose coherence suddenly due to news, liquidity changes, or other factors not captured by oscillator mathematics.
 Signal Confirmation is Probabilistic : The multi-layer confirmation system (CI threshold + dominant phase + phase-lock + entanglement) is designed to filter out low-probability setups. This increases the proportion of valid signals relative to false signals, but does not eliminate false signals entirely. Users should combine QRFM with additional analysis—support and resistance levels, volume confirmation, multi-timeframe alignment, and fundamental context—before executing trades.
 Collapse Signals are Warnings, Not Reversals : A coherence collapse indicates that the oscillator ensemble has lost alignment. This often precedes trend exhaustion or reversals, but can also occur during healthy pullbacks or consolidations. Price may continue in the original direction after a collapse. Use collapses as risk management cues (tighten stops, take partial profits) rather than automatic reversal entries.
 Market Regime Dependency : QRFM performs best in markets where oscillators exhibit cyclical, mean-reverting behavior and where trends are punctuated by retracements. In markets dominated by fundamental shocks, gap openings, or extreme low-liquidity conditions, oscillator coherence may be less reliable. During such periods, reduce position size or stand aside.
 Risk Management is Essential : All trading involves risk of loss. Use appropriate stop losses, position sizing, and risk-per-trade limits. The indicator does not specify stop loss or take profit levels—these must be determined by the user based on their risk tolerance and account size. Never risk more than you can afford to lose.
 Parameter Sensitivity : The indicator's behavior changes with input parameters. Aggressive settings (low thresholds, loose tolerances) produce more signals with lower average quality. Conservative settings (high thresholds, tight tolerances) produce fewer signals with higher average quality. Users should backtest and forward-test parameter sets on their specific instruments and timeframes before committing real capital.
 No Repainting by Design : All signal conditions are evaluated on bar close using bar-close values. However, the visual components (orbit plot, heat map, dashboard) update in real-time during bar formation for monitoring purposes. For trade execution, rely on the confirmed signals (triangles and circles) that appear only after the bar closes.
 Computational Load : QRFM performs extensive calculations, including nested loops for entanglement matrices and real-time table rendering. On lower-powered devices or when running multiple indicators simultaneously, users may experience lag. Use the performance optimization settings (reduce visual complexity, increase phase sample rate, disable unused oscillators) to improve responsiveness.
This system is most effective when used as  one component  within a broader trading methodology that includes sound risk management, multi-timeframe analysis, market context awareness, and disciplined execution. It is a tool for regime detection and signal confirmation, not a substitute for comprehensive trade planning.
Technical Notes
 Calculation Timing : All signal logic (ignition, collapse) is evaluated using bar-close values. The barstate.isconfirmed or implicit bar-close behavior ensures signals do not repaint. Visual components (tables, plots) render on every tick for real-time feedback but do not affect signal generation.
 Phase Wrapping : Phase angles are calculated in the range -180° to +180° using atan2. Angular distance calculations account for wrapping (e.g., the distance between +170° and -170° is 20°, not 340°). This ensures phase-lock detection works correctly across the ±180° boundary.
 Array Management : The indicator uses fixed-size arrays for oscillator phases, amplitudes, and the entanglement matrix. The maximum number of oscillators is 8. If fewer oscillators are enabled, array sizes shrink accordingly (only active oscillators are processed).
 Matrix Indexing : The entanglement matrix is stored as a flat array with size N×N, where N is the number of active oscillators. Index mapping: index(row, col) = row × N + col. Symmetric pairs (i,j) and (j,i) are stored identically.
 Normalization Stability : Oscillators are normalized to   using fixed reference levels (e.g., RSI overbought/oversold at 70/30). For unbounded oscillators (MACD, ROC, TSI), statistical normalization (division by rolling standard deviation) is used, with clamping to prevent extreme outliers from distorting phase calculations.
 Smoothing and Lag : The CI smoothing window (SMA) introduces lag proportional to the window size. This is intentional—it filters out single-bar noise spikes in coherence. Users requiring faster reaction can reduce the smoothing window to 1-2 bars, at the cost of increased sensitivity to noise.
 Complex Number Representation : Pine Script does not have native complex number types. Complex arithmetic is implemented using separate real and imaginary accumulators (sum_cos, sum_sin) and manual calculation of magnitude (sqrt(real² + imag²)) and argument (atan2(imag, real)).
 Lookback Limits : The indicator respects Pine Script's maximum lookback constraints. Historical phase and amplitude values are accessed using the   operator, with lookback limited to the chart's available bar history (max_bars_back=5000 declared).
 Visual Rendering Performance : Tables (orbit plot, heat map, web, dashboard) are conditionally deleted and recreated on each update using table.delete() and table.new(). This prevents memory leaks but incurs redraw overhead. Rendering is restricted to barstate.islast (last bar) to minimize computational load—historical bars do not render visuals.
 Alert Condition Triggers : alertcondition() functions evaluate on bar close when their boolean conditions transition from false to true. Alerts do not fire repeatedly while a condition remains true (e.g., CI stays above threshold for 10 bars fires only once on the initial cross).
 Color Gradient Functions : The phaseColor() function maps phase angles to RGB hues using sine waves offset by 120° (red, green, blue channels). This creates a continuous spectrum where -180° to +180° spans the full color wheel. The amplitudeColor() function maps amplitude to grayscale intensity. The coherenceColor() function uses cos(phase) to map contribution to CI (positive = green, negative = red).
 No External Data Requests : QRFM operates entirely on the chart's symbol and timeframe. It does not use request.security() or access external data sources. All calculations are self-contained, avoiding lookahead bias from higher-timeframe requests.
 Deterministic Behavior : Given identical input parameters and price data, QRFM produces identical outputs. There are no random elements, probabilistic sampling, or time-of-day dependencies.
— Dskyz, Engineering precision. Trading coherence.
스크립트에서 "Trailing stop"에 대해 찾기
Momentum Breakout Filter + ATR ZonesMomentum Breakout Filter + ATR Zones - User Guide
What This Indicator Does
This indicator helps you with your MACD + volume momentum strategy by:
Filtering out fake breakouts - Shows ⚠️ warnings when breakouts lack confirmation
Showing clear entry signals - 🚀 LONG and 🔻 SHORT labels when all conditions align
Automatic stop loss & profit targets - Based on ATR (Average True Range)
Visual trend confirmation - Background color + EMA alignment
Signal Types
🚀 LONG Entry Signal (Green Label)
Appears when ALL conditions met:
✅ MACD crosses above signal line
✅ Volume > 1.5× average
✅ Price > EMA 9 > EMA 21 > EMA 200 (bullish trend)
✅ Price closes above recent 20-bar high
🔻 SHORT Entry Signal (Red Label)
Appears when ALL conditions met:
✅ MACD crosses below signal line
✅ Volume > 1.5× average
✅ Price < EMA 9 < EMA 21 < EMA 200 (bearish trend)
✅ Price closes below recent 20-bar low
⚠️ FAKE Breakout Warning (Orange Label)
Appears when price breaks high/low BUT lacks confirmation:
❌ Low volume (below 1.5× average), OR
❌ Wick break only (didn't close through level), OR
❌ MACD not aligned with direction
Hover over the warning label to see what's missing!
ATR Stop Loss & Targets
When you get a signal, colored lines automatically appear:
Long Position
Red solid line = Stop Loss (Entry - 1.5×ATR)
Green dashed lines = Profit Targets:
Target 1: Entry + 2×ATR
Target 2: Entry + 3×ATR
Target 3: Entry + 4×ATR
Short Position
Red solid line = Stop Loss (Entry + 1.5×ATR)
Green dashed lines = Profit Targets:
Target 1: Entry - 2×ATR
Target 2: Entry - 3×ATR
Target 3: Entry - 4×ATR
The lines move with each bar until you exit the position.
Chart Elements
Moving Averages
Blue line = EMA 9 (fast)
Orange line = EMA 21 (medium)
White line = EMA 200 (trend filter)
Volume
Yellow bars = High volume (above threshold)
Gray bars = Normal volume
Background Color
Light green = Bullish trend (all EMAs aligned up)
Light red = Bearish trend (all EMAs aligned down)
No color = Neutral/mixed
MACD (Bottom Pane)
Green/Red columns = MACD Histogram
Blue line = MACD Line
Orange line = Signal Line
Info Dashboard (Bottom Right)
ItemWhat It ShowsVolumeCurrent volume vs average (✓ HIGH or ✗ Low)MACDDirection (BULLISH or BEARISH)TrendEMA alignment (BULL, BEAR, or NEUTRAL)ATRCurrent ATR value in dollarsPositionCurrent position (LONG, SHORT, or NONE)R:RRisk-to-Reward ratio (shows when in position)
How To Use It
Basic Workflow
Wait for setup
Watch for MACD to approach signal line
Volume should be building
Price should be near EMA structure
Get confirmation
Wait for 🚀 LONG or 🔻 SHORT label
Check dashboard shows "✓ HIGH" volume
Verify trend is aligned (green or red background)
Enter the trade
Enter when signal appears
Note your stop loss (red line)
Note your targets (green dashed lines)
Manage the trade
Exit at first target for partial profit
Move stop to breakeven
Trail remaining position
What To Avoid
❌ Don't trade when you see:
⚠️ FAKE labels (wait for confirmation)
Neutral background (no clear trend)
"✗ Low" volume in dashboard
MACD and Trend not aligned
Settings You Can Adjust
Volume Sensitivity
High Volume Threshold: Default 1.5×
Increase to 2.0× for cleaner signals (fewer trades)
Decrease to 1.2× for more signals (more trades)
Fake Breakout Filters
You can toggle these ON/OFF:
Volume Confirmation: Requires high volume
Close Through: Requires candle close, not just wick
MACD Alignment: Requires MACD direction match
Tip: Turn all three ON for highest quality signals
ATR Stop/Target Multipliers
Default settings (conservative):
Stop Loss: 1.5×ATR
Target 1: 2×ATR (1.33:1 R:R)
Target 2: 3×ATR (2:1 R:R)
Target 3: 4×ATR (2.67:1 R:R)
Aggressive traders might use:
Stop Loss: 1.0×ATR
Target 1: 2×ATR (2:1 R:R)
Target 2: 4×ATR (4:1 R:R)
Conservative traders might use:
Stop Loss: 2.0×ATR
Target 1: 3×ATR (1.5:1 R:R)
Target 2: 5×ATR (2.5:1 R:R)
Example Trade Scenarios
Scenario 1: Perfect Long Setup ✅
Stock consolidating near EMA 21
MACD curling up toward signal line
Volume bar turns yellow (high volume)
🚀 LONG label appears
Red stop line and green target lines appear
Result: High probability trade
Scenario 2: Fake Breakout Avoided ✅
Price breaks above resistance
Volume is normal (gray bar)
⚠️ FAKE label appears (hover shows "Low volume")
No entry signal
Price falls back below breakout level
Result: Avoided losing trade
Scenario 3: Premature Entry ❌
MACD crosses up
Volume is high
BUT trend is NEUTRAL (no background color)
No signal appears (trend filter blocks it)
Result: Avoided choppy/sideways market
Quick Reference
Entry Checklist
 🚀 or 🔻 label on chart
 Dashboard shows "✓ HIGH" volume
 Dashboard shows aligned MACD + Trend
 Colored background (green or red)
 ATR lines visible
 No ⚠️ FAKE warning
Exit Strategy
Target 1 (2×ATR): Take 50% profit, move stop to breakeven
Target 2 (3×ATR): Take 25% profit, trail stop
Target 3 (4×ATR): Take remaining profit or trail aggressively
Stop Loss: Exit entire position if hit
Alerts
Set up these alerts:
Long Entry: Fires when 🚀 LONG signal appears
Short Entry: Fires when 🔻 SHORT signal appears
Fake Breakout Warning: Fires when ⚠️ appears (optional)
Tips for Success
Use on 5-minute charts for day trading momentum plays
Only trade high volume stocks ($5-20 range works best)
Wait for full confirmation - don't jump early
Respect the stop loss - it's calculated based on volatility
Scale out at targets - don't hold for home runs
Avoid trading first 15 minutes - let market settle
Best during 10am-11am and 2pm-3pm - peak momentum times
Common Questions
Q: Why didn't I get a signal even though MACD crossed?
A: All conditions must be met - check dashboard for what's missing (likely volume or trend alignment)
Q: Can I use this on any timeframe?
A: Yes, but it's designed for 5-15 minute charts. On daily charts, adjust ATR multipliers higher.
Q: The stop loss seems too tight, can I widen it?
A: Yes, increase "Stop Loss (×ATR)" from 1.5 to 2.0 or 2.5 in settings.
Q: I keep seeing FAKE warnings but price keeps going - what gives?
A: The filter is conservative. You can disable some filters in settings, but expect more false signals.
Q: Can I use this for swing trading?
A: Yes, but use larger timeframes (1H or 4H) and adjust ATR multipliers up (3× for stops, 6-9× for targets).
SuperTrend MAAfter building SuperBands, I kept thinking about what happens at the midpoint between those two volatility-adaptive envelopes. The upper and lower bands are both trailing price based on ATR and EMA smoothing, but they're operating independently in opposite directions. Taking their average seemed like it might produce an interesting centerline that adapts to volatility in a way that regular moving averages don't. Turns out it does, and that's what this indicator is.
The core concept is straightforward. Instead of plotting the upper and lower SuperBands separately, this calculates both of them internally, averages their values, and then applies an additional smoothing pass with EMA to create a single centerline. That centerline sits roughly in the middle of where the bands would be, but because it's derived from ATR-offset trailing stops rather than direct price smoothing, it behaves differently than a standard moving average of the same length. During trending periods, the centerline tracks closer to price because one of the underlying bands is actively trailing while the other is dormant. During consolidation, both bands compress toward price and the centerline tends to oscillate more with shorter-term movements.
What's interesting is that this acts like a supertrend all by itself with directional behavior baked in. When one of the underlying supertrend waves dominates, meaning price is strongly trending in one direction and only one band is active, you get what feels like a "true" supertrend, whatever that means exactly. The centerline locks into trend-following mode and the color gradient reflects that commitment. You get bright bullish colors during sustained uptrends when the upper band is doing all the work, and strong bearish colors during downtrends when the lower band dominates. But when both bands are active and fighting for control, which happens during consolidation or choppy conditions, the centerline settles into more neutral tones that clearly signal you're in a ranging environment. The colors really do emphasize this behavior and make it visually obvious which regime you're in.
The smoothing parameter controls how aggressively the underlying SuperBand trails adapt to price, which indirectly affects how responsive the centerline is. Lower values make the bands tighter and more reactive, so the centerline follows price action more closely. Higher values create wider bands that only respond to sustained moves, which produces a smoother centerline that filters out more noise. The center smoothing parameter applies a second EMA pass specifically to the averaged midpoint, giving you independent control over how much additional lag you want on the final output versus the raw band average.
What makes this different from just slapping an EMA on price is that the underlying bands are already volatility-aware through their ATR calculations. When volatility spikes, the bands widen and the centerline adjusts its position relative to price based on where those bands settle. A traditional moving average would just smooth over the volatility spike without adjusting its distance from price. This approach incorporates volatility information into the centerline's positioning, which can help it stay relevant during regime changes where fixed-period moving averages tend to lag badly or whipsaw.
The color gradient adds a momentum overlay using the same angle-based calculation from SuperBands. The centerline's rate of change gets normalized by an RMS estimate of its historical movement range, converted to an angle through arctangent scaling, and then mapped to a color gradient. When the centerline is rising, it gradients from neutral toward your chosen bullish color, with brightness increasing as the rate of ascent steepens. When falling, it shifts toward the bearish color with intensity tied to the descent rate. This gives you an immediate visual sense of whether the centerline is accelerating, decelerating, or moving at a stable pace.
Configuration is simpler than SuperBands since you're only dealing with a single output line instead of separate bull and bear envelopes. The length parameter controls the underlying band behavior. ATR period and multiplier determine how much space the bands allocate around price before they trail. Center smoothing adds the extra EMA pass on the averaged midpoint. You can tune these independently to get different characteristics. A tight ATR multiplier with heavy center smoothing creates a smooth line that stays close to price. A wide multiplier with light center smoothing produces a line that swings more freely and adapts faster to directional changes.
From a practical standpoint, this works well as a trend filter or dynamic support and resistance reference. Price above the centerline with bullish coloring suggests a favorable environment for long positions. Price below with bearish coloring indicates the opposite. Crossovers can signal trend changes, though like any moving average system, you'll get whipsaws in choppy conditions. The advantage over traditional MAs is that the volatility adaptation tends to reduce false signals during transitional periods where volatility is expanding but direction hasn't fully committed.
The implementation reuses the entire SuperBands logic, which means all the smoothing and state management for the trailing stops is identical. The only addition is averaging the two band outputs and applying the final EMA pass. The color calculation follows the same RMS-normalized angle approach but applies it to the centerline's delta rather than the individual band deltas. This keeps the coloring consistent with how SuperBands handles momentum visualization while adapting it to a single line instead of dual envelopes.
What this really highlights is that you can derive moving averages from mechanisms other than direct price smoothing. By building the centerline from volatility-adjusted trailing stops, you get adaptive behavior that responds to both price movement and volatility regime without needing separate inputs or complex multi-stage calculations. Whether that adaptation provides a meaningful edge depends on your strategy and market, but it's a fundamentally different approach than the typical fixed-period or adaptive MAs that adjust length based on volatility or momentum indicators.
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.
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.
RSI Bollinger Bands [DCAUT]█ RSI Bollinger Bands  
 📊 ORIGINALITY & INNOVATION 
The RSI Bollinger Bands indicator represents a meaningful advancement in momentum analysis by combining two proven technical tools: the Relative Strength Index (RSI) and Bollinger Bands. This combination addresses a significant limitation in traditional RSI analysis - the use of fixed overbought/oversold thresholds (typically 70/30) that fail to adapt to changing market volatility conditions.
 Core Innovation: 
Rather than relying on static threshold levels, this indicator applies Bollinger Bands statistical analysis directly to RSI values, creating dynamic zones that automatically adjust based on recent momentum volatility. This approach helps reduce false signals during low volatility periods while remaining sensitive to genuine extremes during high volatility conditions.
 Key Enhancements Over Traditional RSI: 
 
 Dynamic Thresholds: Overbought/oversold zones adapt to market conditions automatically, eliminating the need for manual threshold adjustments across different instruments and timeframes
 Volatility Context: Band width provides immediate visual feedback about momentum volatility, helping traders distinguish between stable trends and erratic movements
 Reduced False Signals: During ranging markets, narrower bands filter out minor RSI fluctuations that would trigger traditional fixed-threshold signals
 Breakout Preparation: Band squeeze patterns (similar to price-based BB) signal potential momentum regime changes before they occur
 Self-Referencing Analysis: By measuring RSI against its own statistical behavior rather than arbitrary levels, the indicator provides more relevant context
 
 📐 MATHEMATICAL FOUNDATION 
 Two-Stage Calculation Process: 
 Stage 1: RSI Calculation 
RSI = 100 - (100 / (1 + RS))
where RS = Average Gain / Average Loss over specified period
The RSI normalizes price momentum into a bounded 0-100 scale, making it ideal for statistical band analysis.
 Stage 2: Bollinger Bands on RSI 
Basis = MA(RSI, BB Length)
Upper Band = Basis + (StdDev(RSI, BB Length) × Multiplier)
Lower Band = Basis - (StdDev(RSI, BB Length) × Multiplier)
Band Width = Upper Band - Lower Band
The Bollinger Bands measure RSI's standard deviation from its own moving average, creating statistically-derived dynamic zones.
 Statistical Interpretation: 
 
 Under normal distribution assumptions with default 2.0 multiplier, approximately 95% of RSI values should fall within the bands
 Band touches represent statistically significant momentum extremes relative to recent behavior
 Band width expansion indicates increasing momentum volatility (strengthening trend or increasing uncertainty)
 Band width contraction signals momentum consolidation and potential regime change preparation
 
 📊 COMPREHENSIVE SIGNAL ANALYSIS 
 Visual Color Signals: 
This indicator features dynamic color fills that highlight extreme momentum conditions:
 Green Fill (Above Upper Band): 
 
 Appears when RSI breaks above the upper band, indicating exceptionally strong bullish momentum
 Represents dynamic overbought zone - not necessarily a reversal signal but a warning of extreme conditions
 In strong uptrends, green fills can persist as RSI "rides the band" - this indicates sustained momentum strength
 Exit of green zone (RSI falling back below upper band) often signals initial momentum weakening
 
 Red Fill (Below Lower Band): 
 
 Appears when RSI breaks below the lower band, indicating exceptionally weak bearish momentum
 Represents dynamic oversold zone - potential reversal or continuation signal depending on trend context
 In strong downtrends, red fills can persist as RSI "rides the band" - this indicates sustained selling pressure
 Exit of red zone (RSI rising back above lower band) often signals initial momentum recovery
 
 Position-Based Signals: 
 Upper Band Interactions: 
 
 RSI Touching Upper Band: Dynamic overbought condition - momentum is extremely strong relative to recent volatility, potential exhaustion or continuation depending on trend context
 RSI Riding Upper Band: Sustained strong momentum, often seen in powerful trends, not necessarily an immediate reversal signal but warrants monitoring for exhaustion
 RSI Crossing Below Upper Band: Initial momentum weakening signal, particularly significant if accompanied by price divergence
 
 Lower Band Interactions: 
 
 RSI Touching Lower Band: Dynamic oversold condition - momentum is extremely weak relative to recent volatility, potential reversal or continuation of downtrend
 RSI Riding Lower Band: Sustained weak momentum, common in strong downtrends, monitor for potential exhaustion
 RSI Crossing Above Lower Band: Initial momentum strengthening signal, early indication of potential reversal or consolidation
 
 Basis Line Signals: 
 
 RSI Above Basis: Bullish momentum regime - upward pressure dominant
 RSI Below Basis: Bearish momentum regime - downward pressure dominant
 Basis Crossovers: Momentum regime shifts, more significant when accompanied by band width changes
 RSI Oscillating Around Basis: Balanced momentum, often indicates ranging market conditions
 
 Volatility-Based Signals: 
 Band Width Patterns: 
 
 Narrow Bands (Squeeze): Momentum volatility compression, often precedes significant directional moves, similar to price coiling patterns
 Expanding Bands: Increasing momentum volatility, indicates trend acceleration or growing uncertainty
 Narrowest Band in 100 Bars: Extreme compression alert, high probability of upcoming volatility expansion
 
 Advanced Pattern Recognition: 
 Divergence Analysis: 
 
 Bullish Divergence: Price makes lower lows while RSI touches or stays above previous lower band touch, suggests downward momentum weakening
 Bearish Divergence: Price makes higher highs while RSI touches or stays below previous upper band touch, suggests upward momentum weakening
 Hidden Bullish: Price makes higher lows while RSI makes lower lows at the lower band, indicates strong underlying bullish momentum
 Hidden Bearish: Price makes lower highs while RSI makes higher highs at the upper band, indicates strong underlying bearish momentum
 
 Band Walk Patterns: 
 
 Upper Band Walk: RSI consistently touching or staying near upper band indicates exceptionally strong trend, wait for clear break below basis before considering reversal
 Lower Band Walk: RSI consistently at lower band signals very weak momentum, requires break above basis for reversal confirmation
 
 🎯 STRATEGIC APPLICATIONS 
 Strategy 1: Mean Reversion Trading 
 Setup Conditions: 
 
 Market Type: Ranging or choppy markets with no clear directional trend
 Timeframe: Works best on lower timeframes (5m-1H) or during consolidation phases
 Band Characteristic: Normal to narrow band width
 
 Entry Rules: 
 
 Long Entry: RSI touches or crosses below lower band, wait for RSI to start rising back toward basis before entry
 Short Entry: RSI touches or crosses above upper band, wait for RSI to start falling back toward basis before entry
 Confirmation: Use price action confirmation (candlestick reversal patterns) at band touches
 
 Exit Rules: 
 
 Target: RSI returns to basis line or opposite band
 Stop Loss: Fixed percentage or below recent swing low/high
 Time Stop: Exit if position not profitable within expected timeframe
 
 Strategy 2: Trend Continuation Trading 
 Setup Conditions: 
 
 Market Type: Clear trending market with higher highs/lower lows
 Timeframe: Medium to higher timeframes (1H-Daily)
 Band Characteristic: Expanding or wide bands indicating strong momentum
 
 Entry Rules: 
 
 Long Entry in Uptrend: Wait for RSI to pull back to basis line or slightly below, enter when RSI starts rising again
 Short Entry in Downtrend: Wait for RSI to rally to basis line or slightly above, enter when RSI starts falling again
 Avoid Counter-Trend: Do not fade RSI at bands during strong trends (band walk patterns)
 
 Exit Rules: 
 
 Trailing Stop: Move stop to break-even when RSI reaches opposite band
 Trend Break: Exit when RSI crosses basis against trend direction with conviction
 Band Squeeze: Reduce position size when bands start narrowing significantly
 
 Strategy 3: Breakout Preparation 
 Setup Conditions: 
 
 Market Type: Consolidating market after significant move or at key technical levels
 Timeframe: Any timeframe, but longer timeframes provide more reliable breakouts
 Band Characteristic: Narrowest band width in recent 100 bars (squeeze alert)
 
 Preparation Phase: 
 
 Identify band squeeze condition (bands at multi-period narrowest point)
 Monitor price action for consolidation patterns (triangles, rectangles, flags)
 Prepare bracket orders for both directions
 Wait for band expansion to begin
 
 Entry Execution: 
 
 Breakout Confirmation: Enter in direction of RSI band breakout (RSI breaks above upper band or below lower band)
 Price Confirmation: Ensure price also breaks corresponding technical level
 Volume Confirmation: Look for volume expansion supporting the breakout
 
 Risk Management: 
 
 Stop Loss: Place beyond consolidation pattern opposite extreme
 Position Sizing: Use smaller size due to false breakout risk
 Quick Exit: Exit immediately if RSI returns inside bands within 1-3 bars
 
 Strategy 4: Multi-Timeframe Analysis 
 Timeframe Selection: 
 
 Higher Timeframe: Daily or 4H for trend context
 Trading Timeframe: 1H or 15m for entry signals
 Confirmation Timeframe: 5m or 1m for precise entry timing
 
 Analysis Process: 
 
 Trend Identification: Check higher timeframe RSI position relative to bands, trade only in direction of higher timeframe momentum
 Setup Formation: Wait for trading timeframe RSI to show pullback to basis in trending direction
 Entry Timing: Use confirmation timeframe RSI band touch or crossover for precise entry
 Alignment Confirmation: All timeframes should show RSI moving in same direction for highest probability setups
 
 📋 DETAILED PARAMETER CONFIGURATION 
 RSI Source: 
 
 Close (Default): Standard price point, balances responsiveness and reliability
 HL2: Reduces noise from intrabar volatility, provides smoother RSI values
 HLC3 or OHLC4: Further smoothing for very choppy markets, slower to respond but more stable
 Volume-Weighted: Consider using VWAP or volume-weighted prices for additional liquidity context
 
 RSI Length Parameter: 
 
 Shorter Periods (5-10): More responsive but generates more signals, suitable for scalping or very active trading, higher noise level
 Standard (14): Default and most widely used setting, proven balance between responsiveness and reliability, recommended starting point
 Longer Periods (21-30): Smoother momentum measurement, fewer but potentially more reliable signals, better for swing trading or position trading
 Optimization Note: Test across different market regimes, optimal length often varies by instrument volatility characteristics
 
 RSI MA Type Parameter: 
 
 RMA (Default): Wilder's original smoothing method, provides traditional RSI behavior with balanced lag, most widely recognized and tested, recommended for standard technical analysis
 EMA: Exponential smoothing gives more weight to recent values, faster response to momentum changes, suitable for active trading and trending markets, reduces lag compared to RMA
 SMA: Simple average treats all periods equally, smoothest output with highest lag, best for filtering noise in choppy markets, useful for long-term position analysis
 WMA: Weighted average emphasizes recent data less aggressively than EMA, middle ground between SMA and EMA characteristics, balanced responsiveness for swing trading
 Advanced Options: Full access to 25+ moving average types including HMA (reduced lag), DEMA/TEMA (enhanced responsiveness), KAMA/FRAMA (adaptive behavior), T3 (smoothness), Kalman Filter (optimal estimation)
 Selection Guide: RMA for traditional analysis and backtesting consistency, EMA for faster signals in trending markets, SMA for stability in ranging markets, adaptive types (KAMA/FRAMA) for varying volatility regimes
 
 BB Length Parameter: 
 
 Short Length (10-15): Tighter bands that react quickly to RSI changes, more frequent band touches, suitable for active trading styles
 Standard (20): Balanced approach providing meaningful statistical context without excessive lag
 Long Length (30-50): Smoother bands that filter minor RSI fluctuations, captures only significant momentum extremes, fewer but higher quality signals
 Relationship to RSI Length: Consider BB Length greater than RSI Length for cleaner signals
 
 BB MA Type Parameter: 
 
 SMA (Default): Standard Bollinger Bands calculation using simple moving average for basis line, treats all periods equally, widely recognized and tested approach
 EMA: Exponential smoothing for basis line gives more weight to recent RSI values, creates more responsive bands that adapt faster to momentum changes, suitable for trending markets
 RMA: Wilder's smoothing provides consistent behavior aligned with traditional RSI when using RMA for both RSI and BB calculations
 WMA: Weighted average for basis line balances recent emphasis with historical context, middle ground between SMA and EMA responsiveness
 Advanced Options: Full access to 25+ moving average types for basis calculation, including HMA (reduced lag), DEMA/TEMA (enhanced responsiveness), KAMA/FRAMA (adaptive to volatility changes)
 Selection Guide: SMA for standard Bollinger Bands behavior and backtesting consistency, EMA for faster band adaptation in dynamic markets, matching RSI MA type creates unified smoothing behavior
 
 BB Multiplier Parameter: 
 
 Conservative (1.5-1.8): Tighter bands resulting in more frequent touches, useful in low volatility environments, higher signal frequency but potentially more false signals
 Standard (2.0): Default setting representing approximately 95% confidence interval under normal distribution, widely accepted statistical threshold
 Aggressive (2.5-3.0): Wider bands capturing only extreme momentum conditions, fewer but potentially more significant signals, reduces false signals in high volatility
 Adaptive Approach: Consider adjusting multiplier based on instrument characteristics, lower multiplier for stable instruments, higher for volatile instruments
 
 Parameter Optimization Workflow: 
 
 Start with default parameters (RSI:14, BB:20, Mult:2.0)
 Test across representative sample period including different market regimes
 Adjust RSI length based on desired responsiveness vs stability tradeoff
 Tune BB length to match your typical holding period
 Modify multiplier to achieve desired signal frequency
 Validate on out-of-sample data to avoid overfitting
 Document optimal parameters for different instruments and timeframes
 
 Reference Levels Display: 
 
 Enabled (Default): Shows traditional 30/50/70 levels for comparison with dynamic bands, helps visualize the adaptive advantage
 Disabled: Cleaner chart focusing purely on dynamic zones, reduces visual clutter for experienced users
 Educational Value: Keeping reference levels visible helps understand how dynamic bands differ from fixed thresholds across varying market conditions
 
 📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES 
 Comparison with Traditional RSI: 
 Fixed Threshold RSI Limitations: 
 
 In ranging low-volatility markets: RSI rarely reaches 70/30, missing tradable extremes
 In trending high-volatility markets: RSI frequently breaks through 70/30, generating excessive false reversal signals
 Across different instruments: Same thresholds applied to volatile crypto and stable forex pairs produce inconsistent results
 Threshold Adjustment Problem: Manually changing thresholds for different conditions is subjective and lagging
 
 RSI Bollinger Bands Advantages: 
 
 Automatic Adaptation: Bands adjust to current volatility regime without manual intervention
 Consistent Logic: Same statistical approach works across different instruments and timeframes
 Reduced False Signals: Band width filtering helps distinguish meaningful extremes from noise
 Additional Information: Band width provides volatility context missing in standard RSI
 Objective Extremes: Statistical basis (standard deviations) provides objective extreme definition
 
 Comparison with Price-Based Bollinger Bands: 
 Price BB Characteristics: 
 
 Measures absolute price volatility
 Affected by large price gaps and outliers
 Band position relative to price not normalized
 Difficult to compare across different price scales
 
 RSI BB Advantages: 
 
 Normalized Scale: RSI's 0-100 bounds make band interpretation consistent across all instruments
 Momentum Focus: Directly measures momentum extremes rather than price extremes
 Reduced Gap Impact: RSI calculation smooths price gaps impact on band calculations
 Comparable Analysis: Same RSI BB appearance across stocks, forex, crypto enables consistent strategy application
 
 Performance Characteristics: 
 Signal Quality: 
 
 Higher Signal-to-Noise Ratio: Dynamic bands help filter RSI oscillations that don't represent meaningful extremes
 Context-Aware Alerts: Band width provides volatility context helping traders adjust position sizing and stop placement
 Reduced Whipsaws: During consolidations, narrower bands prevent premature signals from minor RSI movements
 
 Responsiveness: 
 
 Adaptive Lag: Band calculation introduces some lag, but this lag is adaptive to current conditions rather than fixed
 Faster Than Manual Adjustment: Automatic band adjustment is faster than trader's ability to manually modify thresholds
 Balanced Approach: Combines RSI's inherent momentum lag with BB's statistical smoothing for stable yet responsive signals
 
 Versatility: 
 
 Multi-Strategy Application: Supports both mean reversion (ranging markets) and trend continuation (trending markets) approaches
 Universal Instrument Coverage: Works effectively across equities, forex, commodities, cryptocurrencies without parameter changes
 Timeframe Agnostic: Same interpretation applies from 1-minute charts to monthly charts
 
 Limitations and Considerations: 
 Known Limitations: 
 
 Dual Lag Effect: Combines RSI's momentum lag with BB's statistical lag, making it less suitable for very short-term scalping
 Requires Volatility History: Needs sufficient bars for BB calculation, less effective immediately after major regime changes
 Statistical Assumptions: Assumes RSI values are somewhat normally distributed, extreme trending conditions may violate this
 Not a Standalone System: Like all indicators, should be combined with price action analysis and risk management
 
 Optimal Use Cases: 
 
 Best for swing trading and position trading timeframes
 Most effective in markets with alternating volatility regimes
 Ideal for traders who use multiple instruments and timeframes
 Suitable for systematic trading approaches requiring consistent logic
 
 Suboptimal Conditions: 
 
 Very low timeframes (< 5 minutes) where lag becomes problematic
 Instruments with extreme volatility spikes (gap-prone markets)
 Markets in strong persistent trends where mean reversion rarely occurs
 Periods immediately following major structural changes (new trading regime)
 
 USAGE NOTES 
This indicator is designed for technical analysis and educational purposes to help traders understand the interaction between momentum measurement and statistical volatility bands. The RSI Bollinger Bands has limitations and should not be used as the sole basis for trading decisions.
 Important Considerations: 
 
 No Predictive Guarantee: Past band touches and patterns do not guarantee future price behavior
 Market Regime Dependency: Indicator performance varies significantly between trending and ranging market conditions
 Complementary Analysis Required: Should be used alongside price action, support/resistance levels, and fundamental analysis
 Risk Management Essential: Always use proper position sizing, stop losses, and risk controls regardless of signal quality
 Parameter Sensitivity: Different instruments and timeframes may require parameter optimization for optimal results
 Continuous Monitoring: Band characteristics change with market conditions, requiring ongoing assessment
 
 Recommended Supporting Analysis: 
 
 Price structure analysis (support/resistance, trend lines)
 Volume confirmation for breakout signals
 Multiple timeframe alignment
 Market context awareness (news events, session times)
 Correlation analysis with related instruments
 
The indicator aims to provide adaptive momentum analysis that adjusts to changing market volatility, but traders must apply sound judgment, proper risk management, and comprehensive market analysis in their decision-making process.
Trader Marks Trailing SL + TP (BE @ 60%)This script provides a unique stop-loss and take-profit management tool designed for swing traders.
It introduces a two-stage stop-loss logic that is not available in standard TradingView tools:
Break-Even Protection: Once a defined profit threshold (e.g. 66%) is reached, the stop-loss automatically moves to break-even.
ATR-Based Trailing Stop: After a chosen delay (e.g. 12 hours), the script activates a dynamic trailing stop that follows market volatility using the ATR.
Flexible Ratchet Mechanism: The stop-loss can be locked at new profit levels and will never move backwards.
This combination allows traders to secure profits while still giving the trade room to develop. The indicator is especially useful for swing trading on 4H and daily timeframes but can be applied to other styles as well.
How to use:
Enter your entry price, stop-loss, and take-profit levels.
Choose your trailing mode: Exact S/L+ (simple) or Advanced (Delay + BE + Ratchet).
Adjust parameters such as ATR length or activation delay to match your strategy.
The script helps you balance risk and reward by ensuring that once the trade moves in your favor, you cannot lose the initial risk, while still benefiting from extended market moves.
ADX MTF mura visionOverview 
ADX MTF — mura vision measures trend strength and visualizes a higher-timeframe (HTF) ADX on any chart. The current-TF ADX is drawn as a line; the HTF ADX is rendered as “step” segments to reflect closed HTF bars without repainting. Optional soft fills highlight the 20–25 (trend forming) and 40–50 (strong trend) zones.
 How it works 
 
 ADX (current TF) : Classic Wilder formulation using DI components and RMA smoothing.
 HTF ADX : Requested via request.security(..., lookahead_off, gaps_off).
 When a new HTF bar opens, the previous value is frozen as a horizontal segment.
 The current HTF bar is shown as a live moving segment.
 This staircase look is expected on lower timeframes.
 
 Auto timeframe mapping 
If “Auto” is selected, the HTF is derived from the chart TF:
<30m → 60m, 30–<240m → 240m, 240m–<1D → 1D, 1D → 1W, 1W/2W → 1M, ≥1M → same.
 Inputs 
 
 DI Length and ADX Smoothing — core ADX parameters.
 Higher Time Frame — Auto or a fixed TF.
 Line colors/widths for current ADX and HTF ADX.
 Fill zone 20–25 and Fill zone 40–50 — optional light background fills.
 Number of HTF ADX Bars — limits stored HTF segments to control chart load.
 
 Reading the indicator 
 
 ADX < 20: typically range-bound conditions; trend setups require extra caution.
 20–25: trend emergence; breakouts and continuation structures gain validity.
 40–50: strong trend; favor continuation and manage with trailing stops.
 >60 and turning down: possible trend exhaustion or transition toward range.
 
Note: ADX measures strength, not direction. Combine with your directional filter (e.g., price vs. MA, +DI/−DI, structure/levels).
 Non-repainting behavior 
 
 HTF values use lookahead_off; closed HTF bars are never revised.
 The only moving piece is the live segment for the current HTF bar.
 
 Best practices 
 
 Use HTF ADX as a regime filter; time entries with the current-TF ADX rising through your threshold.
 Pair with ATR-based stops and a MA/structure filter for direction.
 Consider higher thresholds on highly volatile altcoins.
 
 Performance notes 
The script draws line segments for HTF bars. If your chart becomes heavy, reduce “Number of HTF ADX Bars.”
 Disclaimer 
This script is for educational purposes only and does not constitute financial advice. Trading involves risk.
BTC_Hull Suite StrategyOverview 
BTC_Hull Suite Strategy is a trend-following system designed to keep drawdowns modest while staying exposed during genuine uptrends.  It uses the Hull Moving Average (HMA) for fast, low-lag trend turns, a long-term SMA filter to avoid chop, and a percentage trailing stop to protect gains.
🔧  What the strategy includes 
- Hull Moving Average (HMA) with configurable length (default 55)
- SMA filter (default 130) to trade only with higher-timeframe bias
- Trailing stop in percent (default 5%) based on the running peak of close
- Execution model: signals are evaluated on the previous bar and entries are placed at the next bar’s open (TradingView default)
📈  How it works: 
✅ Entry (Long):
Detects a bullish Hull turn by comparing the current HMA to its value 3 bars ago:
h  > h3  and h  <= h3  → HMA just turned up on the prior bar
The SMA filter must confirm: close  > sma 
If both are true (and within the date window), a long is opened next bar at the open
❌ Exit:
Hull turn down: h  < h3  and h  >= h3 , or
Trailing stop: price closes below peak * (1 – trailingPct)
Either condition closes the position at the current bar’s close
 Notes: 
pyramiding = 1 → allows one add-on (maximum two concurrent long positions)
Position sizing defaults to 20% of equity per entry (adjustable in Properties)
 Who is this for? 
This strategy is tailored for Bitcoin traders (spot or perpetuals) who want a rules-based, low-lag trend system with built-in drawdown protection.
It works best on Daily or 4H charts, but parameters can be adapted for other timeframes.
⚠️  Disclaimer 
This strategy is provided for educational and research purposes only.
It is not financial advice. Markets are risky — always test on your own data, include realistic fees/slippage, and forward-test before using real capital.
PowerTrend Pro Strategy – Gold OptimizedTired of false signals on Gold?
PowerTrend Pro combines VWAP, Supertrend, RSI, and smart MA filters with trailing stops & break-even logic to deliver high-probability trades on XAUUSD.
PowerTrend Pro Strategy is a professional-grade trading system designed to capture high-probability swing and intraday opportunities on XAUUSD (Gold) and other volatile markets.
🔑 Core Features
VWAP Anchoring – institutional fair value reference to filter trades.
Supertrend (ATR-based) – adaptive trend filter tuned for Gold’s volatility.
Multi-Timeframe RSI – confirms momentum alignment across intraday and higher timeframe.
EMA + SMA Combo – ensures trades follow strong directional bias, reducing false signals.
Dynamic Risk Management
Adjustable Take Profit / Stop Loss (%)
Trailing Stop that locks in profits on extended moves
Break-Even Logic (stop loss moves to entry once price is in profit)
⚡ Gold-Tuned Presets
XAUUSD 1H → tighter TP/SL & faster entries for active intraday trading.
XAUUSD 4H → wider ATR filter & trailing stops to capture bigger swings.
Generic Mode → works on Forex, Indices, and Crypto (fully customizable).
🎯 Why It Works
Gold is notoriously volatile — quick spikes wipe out weak strategies. PowerTrend Pro solves this by combining:
✅ Institutional bias (VWAP)
✅ Adaptive trend filter (Supertrend)
✅ Momentum confirmation (RSI MTF)
✅ Robust trend structure (EMA + SMA)
✅ Smart exits (TP, SL, trailing & breakeven)
This multi-layer confirmation makes entries stronger and keeps risk under control.
🛠️ Usage
Add the strategy to your chart.
Choose a preset (XAUUSD 1H, 4H, or Generic).
Run Strategy Tester for performance metrics.
Optimize TP/SL and ATR values for your broker & market conditions.
🔥 Pro Tip: Combine this strategy with a session filter (London/NY overlap) or volume confirmation to boost accuracy in Gold.
CTA-min D1 — Donchian 55/20 Trend Breakout (ATR Risk)What it is
A clean, daily trend-following breakout inspired by classic CTA/Turtle logic. It buys strength and sells weakness, then lets winners run with a channel-based trailing stop. No curve-fitting, no clutter—just rules.
How it trades
Timeframe: Daily (D1)
Entry: Close breaks the previous 55-bar Donchian channel (above for longs, below for shorts).
Exit/Trail: Trailing stop at the 20-bar Donchian channel on the opposite side (no fixed TP).
Risk: Initial stop = ATR(N) × stopMult (ATR is smoothed). Position size risks riskPct% of equity based on stop distance.
Labels: “BUY/SELL” only on the entry bar; “STOP BUY/STOP SELL” only on the exit bar.
Pyramiding: Off (one position at a time).
Regime Alignment with EMAs (recommended filter, not enforced by code)
Add EMA 50 and EMA 200 to the D1 chart.
Long bias: take BUY signals only when EMA50 > EMA200 (bullish regime).
Short bias: take SELL signals only when EMA50 < EMA200 (bearish regime).
Optional: for extra selectivity, require the H4 EMAs (50/200) to align with D1 before acting on a signal.
Inputs
entryN (55), exitN (20), atrLen (20), atrSmooth (10), stopMult (2.0), riskPct (0.5%–1.0% recommended).
Works well on (tested by user)
BTCUSD (Bitcoin), EURUSD, GBPJPY, NAS100/US100, USDJPY, AUDUSD, XAGUSD (Silver), US30 (Dow), JP225 (Nikkei), EURGBP, NZDUSD, EURCHF, USDCHF.
How to use
Apply to D1 charts. Review once per day after the daily close and execute next session open to mirror backtest assumptions. Best used as a portfolio strategy across multiple uncorrelated markets. Use the EMA alignment above as a discretionary regime filter to reduce false breakouts.
Notes
For educational use. Markets involve risk; past performance does not guarantee future results. Use responsible position sizing.
Supertrend - Support & ResistanceSupertrend – Multi-Timeframe Support & Resistance
This script overlays multiple Supertrend bands from higher timeframes on a single chart and treats them as dynamic support and resistance. The goal is simple: see the bigger picture without leaving your current timeframe.
What it does
	•	Calculates Supertrend using the same ATR Length and Factor across 5m, 15m, 30m, 1h, 4h, 8h, 12h, and 1D.
	•	Pulls each timeframe via request.security(..., lookahead_off) so values only update on candle close. No look-ahead, no “teleporting” lines.
	•	Plots each timeframe’s Supertrend as an on-chart band with increasing transparency the higher you go, so you can visually separate short-term vs higher-timeframe structure.
	•	Colors indicate direction:
	•	Green = bearish band above price (acting as resistance)
	•	Red = bullish band below price (acting as support)
	•	Drops compact labels (5m, 15m, 30m, etc.) every 20 bars right on the corresponding Supertrend level, so you can quickly identify which line belongs to which timeframe.
Why this helps
Supertrend is great for trend definition and trailing stops. But one timeframe alone can whipsaw you. By stacking multiple timeframes:
	•	Confluence stands out. When several higher-TF bands cluster, price often reacts.
	•	You see where intraday pullbacks are likely to pause (lower TF bands) and where trend reversals are more meaningful (higher TF bands).
	•	It’s easier to align entries with the dominant trend while still timing them on your working timeframe.
How it works (quick refresher)
Supertrend uses ATR to offset a median price with a multiplier (Factor). When price crosses the band, direction flips and the trailing line switches sides. This script exposes:
	•	ATR Length (default 10): sensitivity of the ATR. Smaller = tighter band, more flips. Larger = smoother, fewer flips.
	•	Factor (default 3.0): multiplier applied to ATR. Larger = wider band, more conservative.
The same settings are used for all timeframes for clean, apples-to-apples comparisons.
How to use it
	•	Trend alignment: Prefer longs when most higher-TF lines are below price (red support). Prefer shorts when most are above price (green resistance).
	•	Pullback entries: In an uptrend, look for pullbacks into a lower-TF red band that lines up near a higher-TF red band. That overlap is your “zone.”
	•	Breakout confirmation: A strong break and close beyond a higher-TF band carries more weight than a lower-TF poke.
	•	Stops and targets: Use the nearest opposing band as a logic point. For example, in a long, if price loses the lower-TF red band and the next higher-TF band is close overhead, trim or tighten.
Signals you can read at a glance
	•	Stacking: Multiple red bands beneath price = strong bullish structure. Multiple green bands above price = strong bearish structure.
	•	Compression: Bands from different TFs squeezing together often precede expansion.
	•	Flip zones: When a higher-TF band flips side, treat that level as newly minted support/resistance.
Design choices in the code
	•	lookahead_off on all request.security calls avoids repainting from future data.
	•	Increasing transparency as the timeframe rises makes lower-TF context visible without drowning the chart.
	•	Labels every 20 bars keep the chart readable while still giving you frequent anchors.
Good to know (limits and tips)
	•	This is an overlay of closed-bar Supertrend values from higher TFs. Intrabar moves can still exceed a band before close; final signal prints at candle close of that timeframe.
	•	Using the same ATR/factor across TFs makes confluence easier to judge. If you need independent tuning per TF, you can clone the security calls and add separate inputs.
	•	On very low timeframes with many symbols, multiple request.security calls can be heavy. If performance drops, hide one or two higher TFs or increase the label spacing.
Risk note
This is a context tool, not an auto-trader. Combine it with structure (HH/HL vs LH/LL), volume, and your execution rules. Always test on your market and timeframe before committing real capital.
Buy Dip Multiple Positions🎯 Objective
This strategy aims to capture aggressive dip-buying opportunities during volume-confirmed price reversals in short term downtrending markets. It is optimized for multi-entry precision, adaptive stop management, and real-time trade monitoring.
It allows traders to execute multiple long entries and dynamically trail stops to maximize gains while capping risk. Designed with modular inputs, this strategy is ideal for intraday momentum scalping and swing trading alike.
🔧 How It Operates
The strategy triggers buy entries when three conditions align:
Reversal Candle: Current close < prior low × 0.998
Volume Confirmation: Current volume exceeds average of prior 2 bars × 1.2
Price Surge Threshold: Current close below user-defined % of close from N bars ago
Once a reversal candle is confirmed, the strategy:
Calculates position size based on user-defined risk parameters
Allows up to a max number of simultaneous trades
Trailing Stop kicks in 2 bars after entry, climbing by a user-defined % each bar
Exit occurs when price hits either the trailing stop or target price
🛠️ Inputs
Users can customize all major aspects of the strategy:
Max Simultaneous Trades: Default 20
Trailing Stop Increase per Bar (%): Default 1%
Initial Stop (% of Reversal Low): Default 85%
Target Price (% Above Reversal Low): Default 60%
Price Surge Threshold (% of Past Close): Default 89%
Surge Lookback Bars: Default 14
Show Active Trade Dot: Toggle to display green trade status dot
📊 Visual Overlays
The chart displays the following:
Marker	Description
🟢 Green Dot	Active trade (toggleable)
🔴 Red Dot	Max trades reached
📈 Trailing Stop	Applied internally but not plotted (can be added)
📊 Metrics	Plots of win rate, winning/losing trade counts
📎 Notes
Strategy uses strategy.cash allocation logic
Entry size adapts to account equity and risk per trade
All parameters are accessible via the settings panel
Built entirely in Pine Script v5
This strategy balances flexibility and precision, giving traders control over entry timing, capital allocation, and stop behavior. Ideal for those looking to automate dip-buy setups with tactical overlays and visual alerts.
Rifle UnifiedThis script is designed for use on 30-second charts of Dow Jones-related symbols (YM, MYM, US30). It provides automated buy and sell signals using a combination of price action, RSI (Relative Strength Index), and volume analysis. The script is intended for both live trading signals and backtesting, with configurable risk management and debugging features.
 Core Functionality 
1. Signal Generation Logic
 
  Trigger: The algorithm looks for a sharp price move (drop or rise) of a user-defined threshold (default: 80 points) within a specified lookback window (default: 20 minutes).
  Levels: It monitors for price drops below specific numerical levels ending in 23, 43, or 73 (e.g., 42223, 42273).
  RSI Condition: When price falls below one of these levels and the RSI is below 30, the setup is considered active.
 
Buy Signal: A buy is triggered if, after setup:
 
  Price rises back above the level,
  The RSI rate of change (ROC) indicates exhaustion of the drop,
  The current bar shows positive momentum. 
 
2. Trade Management
 
  Stop Loss & Take Profit: Configurable fixed or trailing stop loss and take profit levels are plotted and managed automatically.
  Exit Signals: The script signals exit based on price action relative to these risk management levels.
 
3. Filters & Enhancements
 
  Parabolic Move Filter: Prevents entries during extreme price moves.
  Dead Cat Bounce Filter: Avoids false signals after sharp reversals.
  Volume Filter: Optionally requires volume conditions for trade entries (especially for shorts).
   Multiple Confirmation Layers : Includes checks for 5-minute RSI, momentum, and price retracement.
 
 User Inputs & Customization 
 
  Trade Direction: Toggle between LONG and SHORT signal generation.
  Trigger Settings: Adjust thresholds for price moves, lookback windows, RSI ROC, and volume requirements.
  Trade Settings: Set take profit, stop loss, and trailing stop behavior.
  Debug & Visualization: Enable or disable various plots, labels, and debug tables for in-depth analysis.
  Backtesting: Integrated backtester with summary and detailed statistics tables.
 
 Technical Features 
 
  Uses External Libraries: Relies on RifleShooterLib for core logic and BackTestLib for backtesting and statistics.
  Multi-timeframe Analysis: Incorporates both 30-second and 5-minute RSI calculations.
  Chart Annotations: Plots entry/exit points, risk levels, and debug information directly on the chart.
  Alert Conditions: Built-in alert triggers for key events (initial move, stall, entry).
 
 Intended Use 
 
  Markets: Dow Jones symbols (YM, MYM, US30, or US30 CFD).
  Timeframe: 30-second chart.
  Purpose: Automated signal generation for discretionary or algorithmic trading, with robust risk management and backtesting support.
 
 Notable Customization & Extension Points 
 
  Momentum Calculation: Plans to replace the current momentum measure with "sqz momentum".
  Displacement Logic: Future update to use "FVG concept" for displacement.
  High-Contrast RSI: Optional visual enhancements for RSI extremes.
  Time-based Stop: Consideration for adding a time-based stop mechanism.
 
This script is highly modular, with extensive user controls, and is suitable for both live trading and historical analysis of Dow Jones index movements
Alpha - Combined BreakoutThis Pine Script indicator, "Alpha - Combined Breakout," is a combination between Smart Money Breakout Signals   and UT Bot Alert, The UT Bot Alert indicator was initially developer by Yo_adriiiiaan
The idea of original code belongs HPotter. 
This Indicator helps you identify potential trading opportunities by combining two distinct strategies: Smart Money Breakout and a modified UT Bot (likely a variation of the Ultimate Trend Bot). It provides visual signals, draws lines for potential take profit (TP) and stop loss (SL) levels, and includes a dashboard to track performance metrics.
Tutorial: 
Understanding and Using the "Alpha - Combined Breakout" Indicator
This indicator is designed for traders looking for confirmation of market direction and potential entry/exit points by blending structural analysis with a trend-following oscillator.
How it Works (General Concept)
The indicator combines two main components:
Smart Money Breakout: This part identifies significant breaks in market structure, which "smart money" traders often use to gauge shifts in supply and demand. It looks for higher highs/lows or lower highs/lows and flags when these structural points are broken.
UT Bot: This is a trend-following component that generates buy and sell signals based on price action relative to an Average True Range (ATR) based trailing stop.
You can choose to use these signals independently or combined to generate trading alerts and visual cues on your chart. The dashboard provides a quick overview of how well the signals are performing based on your chosen settings and display mode.
Parameters and What They Do
Let's break down each input parameter:
1. Smart Money Inputs
These settings control how the indicator identifies market structure and breakouts.
swingSize (Market Structure Time-Horizon):
What it does: This integer value defines the number of candles used to identify significant "swing" (pivot) points—highs and lows.
Effect: A larger swingSize creates a smoother market structure, focusing on longer-term trends. This means signals might appear less frequently and with some delay but could be more reliable for higher timeframes or broader market movements. A smaller swingSize will pick up more minor market structure changes, leading to more frequent but potentially noisier signals, suitable for lower timeframes or scalping.
Analogy: Think of it like a zoom level on your market structure map. Higher values zoom out, showing only major mountain ranges. Lower values zoom in, showing every hill and bump.
bosConfType (BOS Confirmation Type):
What it does: This string input determines how a Break of Structure (BOS) is confirmed. You have two options:
'Candle Close': A breakout is confirmed only if a candle's closing price surpasses the previous swing high (for bullish) or swing low (for bearish).
'Wicks': A breakout is confirmed if any part of the candle (including its wick) surpasses the previous swing high or low.
Effect: 'Candle Close' provides stronger, more conservative confirmation, as it implies sustained price movement beyond the structure. 'Wicks' provides earlier, more aggressive signals, as it captures momentary breaches of the structure.
Analogy: Imagine a wall. 'Candle Close' means the whole person must get over the wall. 'Wicks' means even a finger touching over the top counts as a breach.
choch (Show CHoCH):
What it does: A boolean (true/false) input to enable or disable the display of "Change of Character" (CHoCH) labels. CHoCH indicates the first structural break against the current dominant trend.
Effect: When true, it helps identify early signs of a potential trend reversal, as it marks where the market's "character" (its tendency to make higher highs/lows or lower lows/highs) first changes.
BULL (Bullish Color) & BEAR (Bearish Color):
What they do: These color inputs allow you to customize the visual appearance of bullish and bearish signals and lines drawn by the Smart Money component.
Effect: Purely cosmetic, helps with visual identification on the chart.
sm_tp_sl_multiplier (SM TP/SL Multiplier (ATR)):
What it does: A float value that acts as a multiplier for the Average True Range (ATR) to calculate the Take Profit (TP) and Stop Loss (SL) levels specifically when you're in "Smart Money Only" mode. It uses the ATR calculated by the UT Bot's nLoss_ut as its base.
Effect: A higher multiplier creates wider TP/SL levels, potentially leading to fewer trades but larger wins/losses. A lower multiplier creates tighter TP/SL levels, potentially leading to more frequent but smaller wins/losses.
2. UT Bot Alerts Inputs
These parameters control the behavior and sensitivity of the UT Bot component.
a_ut (UT Key Value (Sensitivity)):
What it does: This integer value adjusts the sensitivity of the UT Bot.
Effect: A higher value makes the UT Bot less sensitive to price fluctuations, resulting in fewer and potentially more reliable signals. A lower value makes it more sensitive, generating more signals, which can include more false signals.
Analogy: Like a noise filter. Higher values filter out more noise, keeping only strong signals.
c_ut (UT ATR Period):
What it does: This integer sets the look-back period for the Average True Range (ATR) calculation used by the UT Bot. ATR measures market volatility.
Effect: This period directly influences the calculation of the nLoss_ut (which is a_ut * xATR_ut), thus defining the distance of the trailing stop loss and take profit levels. A longer period makes the ATR smoother and less reactive to sudden price spikes. A shorter period makes it more responsive.
h_ut (UT Signals from Heikin Ashi Candles):
What it does: A boolean (true/false) input to determine if the UT Bot calculations should use standard candlestick data or Heikin Ashi candlestick data.
Effect: Heikin Ashi candles smooth out price action, often making trends clearer and reducing noise. Using them for UT Bot signals can lead to smoother, potentially delayed signals that stay with a trend longer. Standard candles are more reactive to raw price changes.
3. Line Drawing Control Buttons
These crucial boolean inputs determine which type of signals will trigger the drawing of TP/SL/Entry lines and flags on your chart. They act as a priority system.
drawLinesUtOnly (Draw Lines: UT Only):
What it does: If checked (true), lines and flags will only be drawn when the UT Bot generates a buy/sell signal.
Effect: Isolates UT Bot signals for visual analysis.
drawLinesSmartMoneyOnly (Draw Lines: Smart Money Only):
What it does: If checked (true), lines and flags will only be drawn when the Smart Money Breakout logic generates a bullish/bearish breakout.
Effect: Overrides drawLinesUtOnly if both are checked. Isolates Smart Money signals.
drawLinesCombined (Draw Lines: UT & Smart Money (Combined)):
What it does: If checked (true), lines and flags will only be drawn when both a UT Bot signal AND a Smart Money Breakout signal occur on the same bar.
Effect: Overrides both drawLinesUtOnly and drawLinesSmartMoneyOnly if checked. Provides the strictest entry criteria for line drawing, looking for strong confluence.
Dashboard Metrics Explained
The dashboard provides performance statistics based on the lines drawing control button selected. For example, if "Draw Lines: UT Only" is active, the dashboard will show stats only for UT Bot signals.
Total Signals: The total number of buy or sell signals generated by the selected drawing mode.
TP1 Win Rate: The percentage of signals where the price reached Take Profit 1 (TP1) before hitting the Stop Loss.
TP2 Win Rate: The percentage of signals where the price reached Take Profit 2 (TP2) before hitting the Stop Loss.
TP3 Win Rate: The percentage of signals where the price reached Take Profit 3 (TP3) before hitting the Stop Loss. (Note: TP1, TP2, TP3 are in order of distance from entry, with TP3 being furthest.)
SL before any TP rate: This crucial metric shows the number of times the Stop Loss was hit / the percentage of total signals where the stop loss was triggered before any of the three Take Profit levels were reached. This gives you a clear picture of how often a trade resulted in a loss without ever moving into profit target territory.
Short Tutorial: How to Use the Indicator
Add to Chart: Open your TradingView chart, go to "Indicators," search for "Alpha - Combined Breakout," and add it to your chart.
Access Settings: Once added, click the gear icon next to the indicator name on your chart to open its settings.
Choose Your Signal Mode:
For UT Bot only: Uncheck "Draw Lines: Smart Money Only" and "Draw Lines: UT & Smart Money (Combined)". Ensure "Draw Lines: UT Only" is checked.
For Smart Money only: Uncheck "Draw Lines: UT Only" and "Draw Lines: UT & Smart Money (Combined)". Ensure "Draw Lines: Smart Money Only" is checked.
For Combined Signals: Check "Draw Lines: UT & Smart Money (Combined)". This will override the other two.
Adjust Parameters:
Start with default settings. Observe how the signals appear on your chosen asset and timeframe.
Refine Smart Money: If you see too many "noisy" market structure breaks, increase swingSize. If you want earlier breakouts, try "Wicks" for bosConfType.
Refine UT Bot: Adjust a_ut (Sensitivity) to get more or fewer UT Bot signals. Change c_ut (ATR Period) if you want larger or smaller TP/SL distances. Experiment with h_ut to see if Heikin Ashi smoothing suits your trading style.
Adjust TP/SL Multiplier: If using "Smart Money Only" mode, fine-tune sm_tp_sl_multiplier to set appropriate risk/reward levels.
Interpret Signals & Lines:
Buy/Sell Flags: These indicate the presence of a signal based on your selected drawing mode.
Entry Line (Blue Solid): This is where the signal was generated (usually the close price of the signal candle).
SL Line (Red/Green Solid): Your calculated stop loss level.
TP Lines (Dashed): Your three calculated take profit levels (TP1, TP2, TP3, where TP3 is the furthest target).
Smart Money Lines (BOS/CHoCH): These lines indicate horizontal levels where market structure breaks occurred. CHoCH labels might appear at the first structural break against the prior trend.
Monitor Dashboard: Pay attention to the dashboard in the top right corner. This dynamically updates to show the win rates for each TP and, crucially, the "SL before any TP rate." Use these statistics to evaluate the effectiveness of the indicator's signals under your current settings and chosen mode.
*
Set Alerts (Optional): You can set up alerts for any of the specific signals (UT Bot Long/Short, Smart Money Bullish/Bearish, or the "Line Draw" combined signals) to notify you when they occur, even if you're not actively watching the chart.
By following this tutorial, you'll be able to effectively use and customize the "Alpha - Combined Breakout" indicator to suit your trading strategy.
Warrior Trading Momentum Strategy
# 🚀 Warrior Trading Momentum Strategy - Day Trading Excellence
## Strategy Overview
This comprehensive Pine Script strategy replicates the proven methodologies taught by Ross Cameron and the Warrior Trading community. Designed for active day traders, it identifies high-probability momentum setups with strict risk management protocols.
## 📈 Core Trading Setups
### 1. Gap and Go Trading
- **Primary Focus**: Stocks gapping up 2%+ with volume confirmation
- **Entry Logic**: Breakout above gap open with momentum validation
- **Volume Filter**: 2x average volume requirement for quality setups
### 2. ABCD Pattern Recognition
- **Pattern Detection**: Automated identification of classic ABCD reversal patterns
- **Validation**: A-B and C-D move relationship analysis
- **Entry Trigger**: D-point breakout with volume confirmation
### 3. VWAP Momentum Plays
- **Strategy**: Entries near VWAP with bounce confirmation
- **Distance Filter**: Configurable percentage distance for optimal entries
- **Direction Bias**: Above VWAP bullish momentum validation
### 4. Red to Green Reversals
- **Setup**: Reversal patterns after consecutive red candles
- **Confirmation**: Volume spike with bullish close required
- **Momentum**: Trend change validation with RSI support
### 5. Breakout Momentum
- **Logic**: Breakouts above recent highs with volume
- **Filters**: EMA20 and RSI confirmation for quality
- **Trend**: Established momentum direction validation
## ⚡ Key Features
### Smart Risk Management
- **Position Sizing**: Automatic calculation based on account risk percentage
- **Stop Loss**: 2 ATR-based stops for volatility adjustment
- **Take Profit**: Configurable risk-reward ratios (default 1:2)
- **Trailing Stops**: Profit protection with adjustable triggers
### Advanced Filtering System
- **Time Filters**: Market hours trading with lunch hour avoidance
- **Volume Confirmation**: Multi-timeframe volume analysis
- **Momentum Indicators**: RSI and moving average trend validation
- **Quality Control**: Multiple confirmation layers for signal accuracy
### PDT-Friendly Design
- **Trade Limiting**: Built-in daily trade counter for accounts under $25K
- **Selective Trading**: Priority scoring system for A+ setups only
- **Quality over Quantity**: Maximum 2-3 high-probability trades per day
## 🎯 Optimal Usage
### Best Timeframes
- **Primary**: 5-minute charts for entry timing
- **Secondary**: 1-minute for precise execution
- **Context**: Daily charts for gap analysis
### Ideal Market Conditions
- **Volatility**: High-volume, momentum-driven markets
- **Stocks**: Market cap $100M+, average volume 1M+ shares
- **Sectors**: Technology, biotech, growth stocks with news catalysts
### Account Requirements
- **Minimum**: $500+ for proper position sizing
- **Recommended**: $25K+ for unlimited day trading
- **Risk Tolerance**: Active day trading experience preferred
## 📊 Performance Optimization
### Entry Criteria (All Must Align)
1. ✅ Time filter (market hours, avoid lunch)
2. ✅ Volume spike (2x+ average volume)
3. ✅ Momentum confirmation (RSI 50-80)
4. ✅ Trend alignment (above EMA20)
5. ✅ Pattern completion (setup-specific)
### Risk Parameters
- **Maximum Risk**: 1-2% per trade
- **Position Size**: 25% of account maximum
- **Stop Loss**: 2 ATR below entry
- **Take Profit**: 2:1 risk-reward minimum
## 🔧 Customization Options
### Gap Trading Settings
- Minimum gap percentage threshold
- Volume multiplier requirements
- Gap validation criteria
### Pattern Recognition
- ABCD ratio parameters
- Swing point sensitivity
- Pattern completion filters
### Risk Management
- Risk-reward ratio adjustment
- Maximum daily trade limits
- Trailing stop trigger levels
### Time and Session Filters
- Trading session customization
- Lunch hour avoidance toggle
- Market condition filters
## ⚠️ Important Disclaimers
### Risk Warning
- **High Risk**: Day trading involves substantial risk of loss
- **Capital Requirements**: Only trade with risk capital
- **Experience**: Strategy requires active monitoring and experience
- **Market Conditions**: Performance varies with market volatility
### PDT Considerations
- **Day Trading Rules**: Accounts under $25K limited to 3 day trades per 5 days
- **Compliance**: Strategy includes trade counting for PDT compliance
- **Alternative**: Consider swing trading modifications for smaller accounts
### Backtesting vs Live Trading
- **Slippage**: Real trading involves execution delays and slippage
- **Commissions**: Factor in broker fees for accurate performance
- **Market Impact**: Large positions may affect fill prices
- **Psychological Factors**: Live trading involves emotional challenges
## 📚 Educational Value
This strategy serves as an excellent learning tool for understanding:
- Professional day trading methodologies
- Risk management principles
- Pattern recognition techniques
- Volume and momentum analysis
- Multi-timeframe analysis
## 🤝 Community and Support
Based on proven Warrior Trading methodologies with active community support. Strategy includes comprehensive plotting and information tables for educational purposes and trade analysis.
---
**Disclaimer**: This strategy is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management and never risk more than you can afford to lose.
**Tags**: #DayTrading #Momentum #WarriorTrading #GapAndGo #ABCD #VWAP #PatternTrading #RiskManagement
Momentum Trail Oscillator [AlgoAlpha]🟠 OVERVIEW 
This script builds a Momentum Trail Oscillator designed to measure directional momentum strength and dynamically track shifts in trend bias using a combination of smoothed price change calculations and adaptive trailing bands. The oscillator aims to help traders visualize when momentum is expanding or contracting and to identify transitions between bullish and bearish conditions.
🟠 CONCEPTS 
The core idea combines two methods. First, the script calculates a normalized momentum measure by smoothing price changes relative to their absolute values, which creates a bounded oscillator that highlights whether moves are directional or choppy. Second, it uses a trailing band mechanism inspired by volatility stops, where bands adapt to the oscillator’s volatility, adjusting the thresholds that define a shift in directional bias. This dual approach seeks to address both the magnitude and persistence of momentum, reducing false signals in ranging markets.
🟠 FEATURES 
The momentum calculation applies Hull Moving Averages and double EMA smoothing to price changes, producing a smooth, responsive oscillator.
  
The trailing bands are derived by offsetting a weighted moving average of the oscillator by a multiple of recent momentum volatility. A directional state variable tracks whether the oscillator is above or below the bands, updating when the momentum crosses these dynamic thresholds. 
  
Overbought and oversold zones are visually marked between fixed levels (+30/+40 and -30/-40), with color fills to highlight when momentum is in extreme areas. The script plots signals on both the oscillator pane and optionally overlays markers on the main price chart for clarity.
  
🟠 USAGE 
To use the indicator, apply it to any symbol and timeframe. The “Oscillator Length” controls how sensitive the momentum line is to recent price changes—lower values react faster, higher values smooth out noise. The “Trail Multiplier” sets how far the adaptive bands sit from the oscillator mid-line, which affects how often trend state changes occur. When the momentum line rises into the upper filled area and then crosses back below +40, it signals potential overbought exhaustion. The opposite applies for the oversold zone below -40. The plotted trailing bands switch visibility depending on the current directional state: when momentum is trending up, the lower band acts as the active trailing stop, and when trending down, the upper band becomes active. Trend changes are marked with circular symbols when the direction variable flips, and optional overlay arrows appear on the price chart to highlight overbought or oversold reversals. Traders can combine these signals with their own price action or volume analysis to confirm entries or exits.
MACD + RSI + EMA + BB + ATR Day Trading StrategyEntry Conditions and Signals
The strategy implements a multi-layered filtering approach to entry conditions, requiring alignment across technical indicators, timeframes, and market conditions .
Long Entry Requirements
Trend Filter: Fast EMA (9) must be above Slow EMA (21), price must be above Fast EMA, and higher timeframe must confirm uptrend 
MACD Signal: MACD line crosses above signal line, indicating increasing bullish momentum 
RSI Condition: RSI below 70 (not overbought) but above 40 (showing momentum) 
Volume & Volatility: Current volume exceeds 1.2x 20-period average and ATR shows sufficient market movement 
Time Filter: Trading occurs during optimal hours (9:30-11:30 AM ET) when market volatility is typically highest 
Exit Strategies
The strategy employs multiple exit mechanisms to adapt to changing market conditions and protect profits :
Stop Loss Management
Initial Stop: Placed at 2.0x ATR from entry price, adapting to current market volatility 
Trailing Stop: 1.5x ATR trailing stop that moves up (for longs) or down (for shorts) as price moves favorably 
Time-Based Exits: All positions closed by end of trading day (4:00 PM ET) to avoid overnight risk 
Best Practices for Implementation
Settings
Chart Setup: 5-minute timeframe for execution with 15-minute chart for trend confirmation 
Session Times: Focus on 9:30-11:30 AM ET trading for highest volatility and opportunity 
ATR Overlay with Trailing Flip [ask2maniish]📘 ATR Overlay with Trailing Flip  
🔍 Overview
The ATR Overlay with Trailing Flip is a dynamic, visually-enhanced overlay indicator designed to assist traders in trend detection, trailing stop management, and volatility-based decision making. It leverages the Average True Range (ATR) with optional dynamic multipliers, filters, and alerts to enhance trade execution precision.
⚙️ Features Summary
✅ Static & dynamic ATR multiplier
✅ Customizable trailing stop logic
✅ Volume & Bollinger Band filters
✅ Buy/Sell label signals with alerts
✅ ATR bands with color fill
✅ Optional candle coloring based on trend
✅ Table showing current ATR multiplier
✅ Fully customizable visual controls
🔧 User Inputs
📘 Info Panel
ATR Usage Guide
Tooltip with trading-style recommendations:
Scalping: ATR 5–10,  Intraday: ATR 10–14 , Swing: ATR 14–21 , Position: ATR 21–50
📊 Visual Elements
📈 Plots
Upper/Lower ATR Bands
ATR Fill Zone
Dynamic Trailing Stop Line
🕯 Candle Coloring
Candles colored green (uptrend) or red (downtrend)
Wick coloring matches body
🏷 Signal Labels
"BUY" below candle when trend flips up
"SELL" above candle when trend flips down
📊 Table (Top Right)
Displays current multiplier value:
If static: Static: x.x
If dynamic: percentage format based on ATR ratio
🔔 Alerts
Two alert conditions:
Flip to Long → "📈 ATR flip to LONG"
Flip to Short → "📉 ATR flip to SHORT"
Sound can be enabled for real-time feedback.
🧠 Best Practices
Combine this tool with support/resistance or order flow indicators
Use dynamic ATR during volatile periods for better adaptability
Filter signals in ranging markets with BBand Width Filter
For scalping, reduce ATR period and multiplier for tighter risk
🛠️ Customization Tips
Adjust trailingPeriod for tighter/looser stops
Use color inputs to match your charting theme
Disable features (labels/fill) to declutter chart
UT Bot + Hull MA Confirmed Signal DelayOverview 
This indicator is designed to detect high-probability reversal entry signals by combining "UT Bot Alerts" (UT Bot Alerts script adapted from QuantNomad   - Originally developed by Yo_adriiiiaan   and idea of original code for "UT Bot Alerts" from HPotter  ) with confirmation from a Hull Moving Average (HMA) Developed by Alan Hull  . It focuses on capturing momentum shifts that often precede trend reversals, helping traders identify potential entry points while filtering out false signals.
🔍  How It Works 
 This strategy operates in two stages: 
1. UT Bot Momentum Trigger
The foundation of this script is the "UT Bot Alerts"  , which uses an ATR-based trailing stop to detect momentum changes. Specifically:
The script calculates a dynamic stop level based on the Average True Range (ATR) multiplied by a user-defined sensitivity factor (Key Value).
When price closes above this trailing stop and the short-term EMA crosses above the stop, a potential buy setup is triggered.
Conversely, when price closes below the trailing stop and the short-term EMA crosses below, a potential sell setup is triggered.
These UT Bot alerts are designed to identify the initial shift in market direction, acting as the first filter in the signal process.
2. Hull MA Confirmation
To reduce noise and false triggers from the UT Bot alone, this script delays the entry signal until price confirms the move by crossing the Hull Moving Average (or its variants: HMA, THMA, EHMA) in the same direction as the UT Bot trigger:
A Buy Signal is generated only when:
A UT Bot Buy condition is active, and
The price closes above the Hull MA.
Or, if a UT Bot Buy condition was recently triggered but price hadn’t yet crossed above the Hull MA, a delayed buy is signaled when price finally breaks above it.
A Sell Signal is generated only when:
A UT Bot Sell condition is active, and
The price closes below the Hull MA.
Similarly, a delayed sell signal can occur if price breaks below the Hull MA shortly after a UT Bot Sell trigger.
This dual-confirmation process helps traders avoid premature entries and improves the reliability of reversal signals.
📈  Best Use Cases 
Reversal Trading: This strategy is particularly well-suited for catching early trend reversals rather than trend continuations. It excels at identifying momentum pivots that occur after pullbacks or exhaustion moves.
Heikin Ashi Charts Recommended: The script offers a Heikin Ashi mode for smoothing out noise and enhancing visual clarity. Using Heikin Ashi candles can further reduce whipsaws and highlight cleaner shifts in trend direction.
MACD Alignment: For best results, trade in the direction of the MACD trend or use it as a filter to avoid counter-trend trades.
⚠️  Important Notes 
Entry Signals Only: This indicator only plots entry points (Buy and Sell signals). It does not define exit strategies, so users should manage trades manually using trailing stops, profit targets, or other exit indicators.
No Signal = No Confirmation: You may see a UT Bot trigger without a corresponding Buy/Sell signal. This means the price did not confirm the move by crossing the Hull MA, and therefore the setup was considered too weak or incomplete.
⚙️  Customization 
UT Bot Sensitivity: Adjust the “Key Value” and “ATR Period” to make the UT Bot more or less reactive to price action.
Use Heikin Ashi: Toggle between standard candles or Heikin Ashi in the indicator settings for a smoother trading experience.
The HMA length may also be modified in the indicator settings from its standard 55 length to increase or decrease the sensitivity of signal.
This strategy is best used by traders looking for a structured, logic-based way to enter early into reversals with added confirmation to reduce risk. By combining two independent systems—momentum detection (UT Bot) and trend confirmation (Hull MA)—it aims to provide high-confidence entries without overwhelming complexity.
Let the indicator guide your entries—you manage the exits.
 Examples of use: 
Futures:
  
Stock:
  
Crypto:
  
As shown in the snapshots this strategy, like most, works the best when price action has a sizeable ATR and works the least when price is choppy. Therefore it is always best to use this system when price is coming off known support or resistance levels and when it is seen to respect short term EMA's like the 9 or 15.
My personal preference to use this system is for day trading on a 3 or 5 minute chart. But it is valid for all timeframes and simply marks a high probability for a new trend to form.
Sources:
  Quant Nomad - www.tradingview.com
  Yo_adriiiiaan - www.tradingview.com
  HPotter - www.tradingview.com
  Hull Moving Average - alanhull.com
Guppy Multiple Moving Average (GMMA)The GMMA Momentum Indicator plots 12 EMAs on your chart, divided into two groups:
Short-term EMAs (6 lines, default periods: 3, 5, 8, 10, 12, 15): Represent short-term trader sentiment and momentum.
Long-term EMAs (6 lines, default periods: 30, 35, 40, 45, 50, 60): Reflect long-term investor behavior and broader market trends.
By analyzing the interaction between these two groups, the indicator identifies:
Bullish and bearish trends based on the relative positions of the short- and long-term EMAs.
Momentum strength through the spread or convergence of the EMAs.
Potential reversals or breakouts via compression signals.
This PineScript version enhances the traditional GMMA by adding visual cues like background colors, bearish signals, and compression detection, making it ideal for swing traders seeking clear, actionable insights.
The GMMA Momentum Indicator provides several key features:
1. Trend Identification
Bullish Trend: When the short-term EMAs (green lines) are above the long-term EMAs (blue lines) and spreading apart, it signals strong upward momentum. The chart background turns light green to highlight this condition.
Bearish Trend: When the short-term EMAs cross below the long-term EMAs and converge, it indicates downward momentum. The background turns light red, and an orange downward triangle appears above the bar to mark a new bearish signal.
2. Momentum Analysis
The spread between the short-term EMAs reflects the strength of short-term momentum. A wide spread suggests strong momentum, while a tight grouping indicates weakening momentum or consolidation. Similarly, the long-term EMAs act as dynamic support or resistance, guiding traders on the broader trend.
3. Compression Detection
Compression occurs when both the short-term and long-term EMAs converge, signaling low volatility and a potential breakout or reversal. A yellow upward triangle appears below the bar when compression is detected, alerting traders to watch for price action.
4. Visual Cues
Green short-term EMAs: Show short-term trader activity.
Blue long-term EMAs: Represent long-term investor sentiment.
Background colors: Light green for bullish trends, light red for bearish trends, and transparent for neutral conditions.
Orange downward triangles: Mark new bearish trends.
Yellow upward triangles: Indicate compression, hinting at potential breakouts.
How to Use the GMMA Momentum Indicator for Swing Trading
Swing trading involves capturing price moves over days to weeks, and the GMMA Momentum Indicator is an excellent tool for this strategy. Here’s how to use it effectively:
1. Identifying Trade Entries
Buy Opportunities:
Look for a bullish trend (green background) where the short-term EMAs are above the long-term EMAs and spreading apart, indicating strong momentum.
A compression signal (yellow triangle) followed by a breakout above resistance or a bullish candlestick pattern can confirm an entry.
Example: On a daily chart, if the short-term EMAs cross above the long-term EMAs and the background turns green, consider entering a long position, especially if volume supports the move.
Sell Opportunities:
Watch for a bearish signal (orange downward triangle) or a bearish trend (red background) where the short-term EMAs cross below the long-term EMAs.
Example: If the short-term EMAs collapse below the long-term EMAs and an orange triangle appears, it may signal a shorting opportunity or a time to exit longs.
2. Managing Trades
Use the long-term EMAs as dynamic support (in uptrends) or resistance (in downtrends) to set stop-loss levels or trail stops.
Monitor the spread of the short-term EMAs. A widening spread suggests the trend is strong, while convergence may indicate it’s time to take profits or tighten stops.
3. Anticipating Reversals
Compression signals (yellow triangles) highlight periods of low volatility, often preceding significant price moves. Combine these with price action (e.g., breakouts or reversals) or other indicators (e.g., RSI or volume) for confirmation.
Example: If a compression signal appears near a key support level and the price breaks upward, it could signal the start of a new bullish swing.
4. Best Practices
Timeframes: The indicator works well on daily or 4-hour charts for swing trading, but you can adjust the EMA periods for shorter (e.g., 1-hour) or longer (e.g., weekly) timeframes.
Confirmation: Combine the GMMA with other tools like support/resistance levels, candlestick patterns, or oscillators (e.g., MACD) to reduce false signals.
Risk Management: Always use proper position sizing and stop-losses, as EMAs are lagging indicators and may produce delayed signals in choppy markets.
Dskyz (DAFE) AI Adaptive Regime - Beginners VersionDskyz (DAFE) AI Adaptive Regime - Pro: Revolutionizing Trading for All
Introduction
In the fast-paced world of financial markets, traders need tools that can keep up with ever-changing conditions while remaining accessible. The Dskyz (DAFE) AI Adaptive Regime - Pro is a groundbreaking TradingView strategy that delivers advanced, AI-driven trading capabilities to everyday traders. Available on TradingView (TradingView Scripts), this Pine Script strategy combines sophisticated market analysis with user-friendly features, making it a standout choice for both novice and experienced traders.
Core Functionality
The strategy is built to adapt to different market regimes—trending, ranging, volatile, or quiet—using a robust set of technical indicators, including:
Moving Averages (MA): Fast and slow EMAs to detect trend direction.
Average True Range (ATR): For dynamic stop-loss and volatility assessment.
Relative Strength Index (RSI) and MACD: Multi-timeframe confirmation of momentum and trend.
Average Directional Index (ADX): To identify trending markets.
Bollinger Bands: For assessing volatility and range conditions.
Candlestick Patterns: Recognizes patterns like bullish engulfing, hammer, and double bottoms, confirmed by volume spikes.
It generates buy and sell signals based on a scoring system that weighs these indicators, ensuring trades align with the current market environment. The strategy also includes dynamic risk management with ATR-based stops and trailing stops, as well as performance tracking to optimize future trades.
What Sets It Apart
The Dskyz (DAFE) AI Adaptive Regime - Pro distinguishes itself from other TradingView strategies through several unique features, which we compare to common alternatives below:
| Feature | Dskyz (DAFE) | Typical TradingView Strategies|
|---------|-------------|------------------------------------------------------------|
| Regime Detection | Automatically identifies and adapts to **four** market regimes | Often static or limited to trend/range detection |
| Multi‑Timeframe Analysis | Uses higher‑timeframe RSI/MACD for confirmation | Rarely incorporates multi‑timeframe data |
| Pattern Recognition | Detects candlestick patterns **with volume confirmation** | Limited or no pattern recognition |
| Dynamic Risk Management | ATR‑based stops and trailing stops | Often uses fixed stops or basic risk rules |
| Performance Tracking | Adjusts thresholds based on past performance | Typically static parameters |
| Beginner‑Friendly Presets | Aggressive, Conservative, Optimized profiles | Requires manual parameter tuning |
| Visual Cues | Color‑coded backgrounds for regimes | Basic or no visual aids |
The Dskyz strategy’s ability to integrate regime detection, multi-timeframe analysis, and user-friendly presets makes it uniquely versatile and accessible, addressing the needs of everyday traders who want professional-grade tools without the complexity.
-Key Features and Benefits
 [Why It’s Ideal for Everyday Traders
⚡The Dskyz (DAFE) AI Adaptive Regime - Pro democratizes advanced trading by offering professional-grade tools in an accessible package. Unlike many TradingView strategies that require deep technical knowledge or fail in changing market conditions, this strategy simplifies complex analysis while maintaining robustness. Its presets and visual aids make it easy for beginners to start, while its adaptive features and performance tracking appeal to advanced traders seeking an edge.
🔄Limitations and Considerations
Market Dependency: Performance varies by market and timeframe. Backtesting is essential to ensure compatibility with your trading style.
Learning Curve: While presets simplify use, understanding regimes and indicators enhances effectiveness.
No Guaranteed Profits: Like all strategies, success depends on market conditions and proper execution. The Reddit discussion highlights skepticism about TradingView strategies’ universal success (Reddit Discussion).
Instrument Specificity: Optimized for futures (e.g., ES, NQ) due to fixed tick values. Test on other instruments like stocks or forex to verify compatibility.
📌Conclusion
The Dskyz (DAFE) AI Adaptive Regime - Pro is a revolutionary TradingView strategy that empowers everyday traders with advanced, AI-driven tools. Its ability to adapt to market regimes, confirm signals across timeframes, and manage risk dynamically. sets it apart from typical strategies. By offering beginner-friendly presets and visual cues, it makes sophisticated trading accessible without sacrificing power. Whether you’re a novice looking to trade smarter or a pro seeking a competitive edge, this strategy is your ticket to mastering the markets. Add it to your chart, backtest it, and join the elite traders leveraging AI to dominate. Trade like a boss today! 🚀
Use it with discipline. Use it with clarity. Trade smarter.
**I will continue to release incredible strategies and indicators until I turn this into a brand or until someone offers me a contract.
-Dskyz
Trend Zone Moving Averages📈 Trend Zone Moving Averages 
The Trend Zone Moving Averages indicator helps traders quickly identify market trends using the 50SMA, 100SMA, and 200SMA. With dynamic background colors, customizable settings, and real-time alerts, this tool provides a clear view of bullish, bearish, and extreme trend conditions.
🔹 Features:
Trend Zones with Dynamic Background Colors
Green → Bullish Trend (50SMA > 100SMA > 200SMA, price above 50SMA)
Red → Bearish Trend (50SMA < 100SMA < 200SMA, price below 50SMA)
Yellow → Neutral Trend (Mixed signals)
Dark Green → Extreme Bullish (Price above all three SMAs)
Dark Red → Extreme Bearish (Price below all three SMAs)
 Customizable Moving Averages
 
Toggle 50SMA, 100SMA, and 200SMA on/off from the settings.
Perfect for traders who prefer a cleaner chart.
  Real-Time Trend Alerts 
Get instant notifications when the trend changes:
🟢 Bullish Zone Alert – When price enters a bullish trend.
🔴 Bearish Zone Alert – When price enters a bearish trend.
🟡 Neutral Zone Alert – When trend shifts to neutral.
🌟 Extreme Bullish Alert – When price moves above all SMAs.
⚠️ Extreme Bearish Alert – When price drops below all SMAs.
✅ Perfect for Any Market
Works on stocks, forex, crypto, and commodities.
Adaptable for day traders, swing traders, and investors.
⚙️ How to Use: Trend Zone Moving Averages Strategy
This strategy helps traders identify and trade with the trend using the Trend Zone Moving Averages indicator. It works across stocks, forex, crypto, and commodities.
🟢 Bullish Trend Strategy (Green Background)
Objective: Look for buying opportunities when the market is in an uptrend.
Entry Conditions:
✅ Background is Green (Bullish Zone).
✅ Price is above the 50SMA (confirming strength).
✅ Price pulls back to the 50SMA and bounces OR breaks above a key resistance level.
Stop Loss:
🔹 Place below the most recent swing low or just under the 50SMA.
Take Profit:
🔹 First target at the next resistance level or recent swing high.
🔹 Second target if price continues higher—trail stops to lock in profits.
🔴 Bearish Trend Strategy (Red Background)
Objective: Look for shorting opportunities when the market is in a downtrend.
Entry Conditions:
✅ Background is Red (Bearish Zone).
✅ Price is below the 50SMA (confirming weakness).
✅ Price pulls back to the 50SMA and rejects OR breaks below a key support level.
Stop Loss:
🔹 Place above the most recent swing high or just above the 50SMA.
Take Profit:
🔹 First target at the next support level or recent swing low.
🔹 Second target if price keeps falling—trail stops to secure profits.
🌟 Extreme Trend Strategy (Dark Green / Dark Red Background)
Objective: Trade with momentum when the market is in a strong trend.
Entry Conditions:
✅ Dark Green Background → Extreme Bullish: Price is above all three SMAs (strong uptrend).
✅ Dark Red Background → Extreme Bearish: Price is below all three SMAs (strong downtrend).
Trade Execution:
🔹 For longs (Dark Green): Look for breakout entries above resistance or pullbacks to the 50SMA.
🔹 For shorts (Dark Red): Look for breakdown entries below support or rejections at the 50SMA.
Risk Management:
🔹 Use tighter stop losses and trail profits aggressively to maximize gains.
🟡 Neutral Trend Strategy (Yellow Background)
Objective: Avoid trading or wait for a breakout.
What to Do:
🔹 Avoid trading in this zone—price is indecisive.
🔹 Wait for confirmation (background turns green/red) before taking a trade.
🔹 Use alerts to notify you when the trend resumes.
📌 Final Tips
Use this strategy with price action for extra confirmation.
Combine with support/resistance levels to improve accuracy.
Set alerts for trend changes so you never miss an opportunity.
Enjoy!






















