Step Generalized Moving Average [BackQuant]Step Generalized Moving Average
Overview
Step Generalized Moving Average (StepGMA) is a trend-structure moving average designed to solve two common problems with classic MAs:
They overreact to noise in chop, causing constant micro-flips.
They lag too much when you smooth them enough to stop that noise.
StepGMA tackles this by combining two layers:
A Generalized Moving Average (GMA) that increases responsiveness without simply shortening length.
A Step Filter that converts the MA into discrete “steps” sized by ATR, suppressing insignificant movement and only updating when the move is meaningful.
The output is a trend line that behaves more like market structure: it holds its level through noise, then “reprices” in chunks when volatility-adjusted movement is large enough.
What the indicator is trying to represent
Instead of showing every tiny MA wiggle, StepGMA tries to represent the idea that:
Most price movement is noise relative to volatility.
Trend only matters when it advances by a meaningful amount.
A good trend line should stay stable until the market forces it to move.
That makes this indicator useful as:
A regime filter (trend vs chop).
A trend-following bias line.
A structure-like dynamic S/R reference.
A signal generator with fewer low-quality flips.
Component 1: Moving Average engine (selectable)
The base smoothing is not fixed. You can choose between multiple MA types:
SMA, EMA, WMA, VWMA: classic smoothing families.
DEMA, TEMA: reduced-lag EMA variants.
T3: smooth yet responsive, good for trend.
HMA: very low lag, can be twitchy without filtering.
ALMA: center-weighted smoothing, often “cleaner” visually.
KAMA: adaptive smoothing based on efficiency ratio, good in mixed regimes.
LSMA: regression-based, tends to track trend direction well.
McGinley: dynamic smoothing designed to reduce lag during fast moves.
This matters because the StepGMA is not “one MA.” It is a framework that lets you pick the underlying smoothing behavior, then applies the generalization and step logic on top.
Component 2: Generalized Moving Average (GMA)
Where the idea comes from
Generalized MA here is essentially a form of two-stage smoothing compensation . A common trick in signal processing and technical analysis is:
Apply a smoother once (MA1).
Apply it again (MA2).
Use MA2 as a “lag reference,” then combine MA1 and MA2 to reduce lag while keeping smoothness.
This is related in spirit to reduced-lag filters (like DEMA/TEMA) and “zero-lag” style constructions that subtract part of the lag component. You are not magically removing lag, you are biasing the output toward the first-pass MA while subtracting some of the second-pass smoothing that represents delayed response.
How this script does it
It computes:
ma1 = MA(src, len)
ma2 = MA(ma1, len)
Then combines them using a volume factor (vf):
generalized = ma1 * (1 + vf) - ma2 * vf
Interpretation:
ma2 is a “more delayed” version of ma1.
Subtracting vf * ma2 and adding (1+vf) * ma1 pushes the output toward responsiveness.
vf controls how aggressive that push is.
Volume Factor (vf) is really an aggressiveness knob
The script clamps vf between 0.01 and 1.0 to keep it stable. Conceptually:
Low vf: behaves closer to a normal MA1, smoother, more lag.
High vf: more compensation, faster response, more risk of overshoot or noise sensitivity (which is then handled by the step filter).
So the GMA stage tries to give you a cleaner, faster trend estimate without just shrinking the MA period.
Component 3: Step Filter (the key behavior)
What a step filter is
A step filter turns a continuous signal (here, the generalized MA) into a discrete “staircase” signal. Instead of updating every bar, it updates only when the input has moved far enough to justify a new step.
This is conceptually similar to:
A quantizer in signal processing (rounding changes to discrete increments).
A volatility threshold filter (ignore changes smaller than X).
Market structure logic where levels matter more than micro movement.
How it works in this script
The filter maintains a persistent value: stepped .
Each bar:
diff = src - stepped
If |diff| < stepSize, do nothing (hold the level).
If |diff| >= stepSize, move stepped by a number of step increments.
The step increment size is:
stepSize = (stepMult / 100) * ATR(atrPeriod)
This is critical:
In higher volatility, ATR is larger, so steps are larger, fewer updates, more stability.
In lower volatility, ATR is smaller, so steps are smaller, more updates, more sensitivity.
So the step behavior automatically adapts to volatility.
Multiple-step catching behavior
If price jumps far beyond one step, the script does not move only one step. It moves by:
floor(|diff| / stepSize) * stepSize
So it “catches up” in discrete blocks, preserving the stepped character without lagging massively after large moves.
Direction and regime
Direction is determined by the stepped line, not the raw MA:
direction = +1 if steppedMA is rising
direction = -1 if steppedMA is falling
otherwise direction stays the same
Signals only trigger on direction state changes:
Long when direction flips to +1
Short when direction flips to -1
This matters because it prevents repeated signals while the trend remains intact. You only get a signal when the market has moved enough (in ATR terms) to justify a structural step in the opposite direction.
Secondary line and gradient fill
The script also plots a secondary “slow MA” (length 25, same MA type). This is not the core logic, it is a visual context layer:
StepGMA is the structure line (discrete, regime-driven).
Slow MA is a smoother reference for the underlying drift.
The gradient fill highlights separation and dominance.
When StepGMA sits above the slow MA, the fill reinforces bullish bias. When below, it reinforces bearish bias. It is basically a “trend pressure” visual, not a separate signal.
How to interpret it
1) StepGMA as trend structure
Flat steps mean price is not making enough volatility-adjusted progress to move structure.
Up-steps mean the market has advanced enough to reprice the trend line upward.
Down-steps mean deterioration significant enough to reprice structure downward.
2) Direction is a regime, not a tick-by-tick call
Because direction is derived from step changes, it is naturally a regime filter:
Fewer flips in chop.
Clearer regime transitions.
Signals tend to occur later than ultra-fast tools, but with better confirmation quality.
3) Step size controls noise rejection
StepMult is the main “anti-chop” control:
Higher stepMult = bigger ATR steps = fewer updates, fewer signals, more confirmation, slower to react.
Lower stepMult = smaller steps = more updates, more signals, more sensitivity, more chop risk.
4) Generalization controls responsiveness of the underlying trend estimate
vf controls how “fast” the MA tries to be before stepping:
Higher vf makes the MA respond faster to new price information.
Lower vf makes the MA smoother and more conservative.
The step filter then decides whether that change is meaningful enough to matter.
Practical use cases
Trend filter for entries
Only take longs when direction is bullish.
Only take shorts when direction is bearish.
Avoid trades when StepGMA is flat for long periods, market is not repricing meaningfully.
Dynamic support and resistance
Because the line holds levels, it often behaves like structure:
In uptrends it can act as a rising support reference.
In downtrends it can act as falling resistance.
Signal quality layer
The step-based flip signals tend to be higher quality than basic MA crossovers because they require:
A meaningful volatility-adjusted move.
A confirmed direction change in the stepped trend structure.
Trade management
Use StepGMA as a trailing invalidation reference.
Use direction flips as “hard” regime exits.
Use separation vs slow MA as a “pressure” gauge for scaling decisions.
Tuning guidelines
MA Type
Pick based on the character you want:
T3, ALMA, KAMA are usually good defaults for clean trend representation.
HMA/LSMA are faster but may need larger stepMult to avoid twitch.
SMA is slow and stable but can be too laggy unless vf is increased.
MA Period
Sets the base smoothing horizon. Longer periods give “macro trend,” shorter periods give “tactical trend.”
Volume Factor (vf)
Sets responsiveness compensation:
0.05–0.25 is usually sensible.
Higher than that can get aggressive, step filter will save you, but your steps may fire more often.
ATR Period and StepMult
These define your structure sensitivity:
ATR Period controls how stable the volatility estimate is.
StepMult controls how large a move must be to change structure.
If you want fewer flips, increase StepMult or ATR Period. If you want quicker reaction, lower StepMult or ATR Period.
What this indicator is and is not
It is:
A trend structure MA that ignores sub-threshold noise.
A regime tool that uses volatility-adjusted repricing logic.
A configurable framework that works across assets and timeframes.
It is not:
A predictive reversal tool.
A scalping signal machine.
A replacement for risk management.
Summary
Step Generalized Moving Average combines a lag-compensated moving average (generalization via MA1/MA2 blending) with a volatility-scaled step filter (ATR-based quantization). The result is a stable, structure-like trend line that updates only when price movement is meaningful relative to volatility, producing cleaner regimes, fewer chop flips, and clearer trend bias than conventional moving averages.
ATR
ATR/Structure Trail Stop Loss This indicator is a high-performance trend-following tool designed to help traders stay in winning positions for maximum "R" gains. It solves the common problem of getting stopped out too early by combining Volatility (ATR) with Market Structure (Price Action Swings).
How it Works
The script calculates two different stop-loss levels and automatically chooses the most "conservative" one to protect your capital:
ATR Stop: Measures the current market volatility. If the market gets wild, the stop widens. If the market gets calm, the stop tightens.
Structure Stop: Looks at the lowest lows (for Longs) or highest highs (for Shorts) of the last few candles. This ensures you don't stay in a trade if the actual price trend breaks.
Key Features
Hybrid Logic: The stop strictly follows Closing Prices to prevent "wick-outs" from temporary spikes.
Trend Dashboard: A real-time table tracks ADX (Trend Power).
"RUN IT": High momentum; keep trailing for 12R–30R targets.
"TIGHTEN": Momentum is dying; consider locking in profits.
Visual Diamonds: Uses a Step-Line style with diamonds to show exactly when your stop-loss "locks in" a new level.
How to Use It (Step-by-Step)
Entry: Enter your trade based on your standard breakout strategy.
Initial Risk: Use the Initial Stop (5 points) until the price moves in your favor.
The Trail: Once the trend establishes, follow the Light White Diamonds.
Scaling: Use the ATR Multiplier input to adjust the "breathing room."
Lower Multiplier (e.g., 1.5): Tighter trail, good for scalp targets.
Higher Multiplier (e.g., 2.5+): Wider trail, best for catching 30R monster moves.
Exit: Close the position immediately when a candle closes on the opposite side of the diamonds.
STRAT PANEL HTF (D/W/M/Q/Y) and ATRUse on Daily / Weekly / Monthly charts.
Higher-timeframe STRAT continuity for: D / W / M / Q / Y (Extended session toggle in settings).
Columns: STRAT (last 3 closed), LAST (last closed type), CUR (current type: Live/Stable), DIR, REV.
Includes ATR context: D / W / M / 12M + optional ATR-based estimated moves.
Adaptive MA SuperTrendAdaptive MA SuperTrend
Adaptive MA SuperTrend is a trend-following overlay indicator designed to deliver smoother and more responsive signals than the classical SuperTrend by dynamically combining two moving averages with volatility-based band calculations.
Instead of relying on a single average, the script calculates a selectable pair of moving averages and continuously assigns them as the upper or lower base depending on which value is greater at each bar. This adaptive swapping allows the structure to respond better to changing market conditions while preserving overall trend stability.
A volatility component is then added to the bases using either:
• Average True Range (ATR)
• Standard Deviation (SD)
The selected volatility measure is multiplied by a configurable factor to create adaptive bands around the moving-average bases. Price crossing these bands determines trend direction changes.
When price crosses above the upper band, the trend switches bullish and the lower band becomes the trailing support line. When price crosses below the lower band, the trend switches bearish and the upper band becomes the trailing resistance line. Only the active trend side is plotted to reduce visual noise and improve chart clarity.
Multiple moving-average pair options are provided, allowing users to choose combinations that match their preferred balance between smoothness and responsiveness, including SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, and ALMA-based combinations. Additional parameters are available when ALMA is selected.
⚙️ Key Features
• Adaptive swapping between two moving averages
• Choice of MA pairs with different responsiveness profiles
• ATR or Standard Deviation volatility bands
• Configurable volatility length and multiplier
• Optional ALMA tuning parameters
• Trend visualization with color-coded support/resistance lines
• Signal markers displayed on trend transitions
🧩 Inputs Overview
• Moving average pair selection
• Moving average length and price source
• Volatility method, length, and multiplier
• Optional ALMA offset and sigma parameters
📌 Usage Notes
• Designed to help visualize prevailing trend direction and potential trend shifts.
• Can be combined with confirmation tools or risk management rules within broader strategies.
• Signals are generated when price crosses volatility-adjusted moving-average bands; signals may update intrabar, especially on lower timeframes.
• This script is intended for analytical purposes and does not constitute financial advice. Users should test and validate performance within their own workflow before applying it to live trading.
Adaptive ATR Trend FollowerDESCRIPTION:
A practical educational tool for learning volatility-based trend following. This indicator demonstrates how to use ATR-adjusted trailing stops to adapt to changing market conditions. It shows traders how to dynamically adjust stop distances based on market volatility rather than using fixed price levels.
WHAT MAKES IT UNIQUE:
• Three preset trading modes (Fast/Balanced/Smooth) optimized for different market environments
• ATR-based dynamic stops that automatically widen during high volatility and tighten during calm periods
• Clear visual trend zones with adjustable transparency for better chart readability
• Educational focus on risk management concepts and adaptive position sizing
• Signal markers that highlight exact trend change points for precise analysis
HOW IT WORKS:
1. Calculates Average True Range (ATR) to measure current market volatility
2. Creates dynamic trailing stops using: Current Price ± (ATR × Multiplier)
3. Automatically switches trend direction when price crosses the trailing stop level
4. Provides continuous visual feedback through colored zones, signal markers, and bar coloring
5. Updates stop levels in real-time as market conditions change
EDUCATIONAL VALUE:
This indicator serves as a learning tool for understanding:
- How to use ATR for dynamic position and risk management
- The importance of adapting trading systems to current volatility conditions
- Trend-following principles with immediate visual feedback
- Risk management techniques through adaptive stop placement
- The relationship between volatility and optimal stop distances
SETTINGS EXPLAINED:
• ATR Period (14): The lookback period for volatility measurement. Higher values give smoother readings.
• ATR Multiplier (3.0): Determines stop distance from price. Higher = wider stops, Lower = tighter stops.
• Trading Style: Fast (tight stops for active trading), Balanced (default settings), Smooth (wide stops for volatile markets)
• Price Smoothing (1): EMA period applied to price. Reduces noise for cleaner trend detection.
• Trend Fill Transparency (80%): Controls visibility of the colored trend zone between price and stop line.
RISK WARNING & DISCLAIMER:
This is an educational trend-following tool designed for learning purposes. Important considerations:
• May produce whipsaw signals during sideways/consolidating markets
• Works best in clearly trending market environments
• Always combine with other analysis techniques for confirmation
• Practice proper risk management - never risk more than you can afford to lose
• Past performance does not guarantee future results
• This is NOT financial advice. Use at your own risk and discretion.
USE CASES:
- Learning about volatility-based trading systems and concepts
- Identifying potential trend direction changes with visual confirmation
- Setting adaptive stop-loss levels that adjust to market conditions
- Educational tool for understanding how ATR affects position management
- Visual study of how volatility impacts trend-following strategies
COMPATIBILITY:
• Works on all markets: Forex, Stocks, Crypto, Commodities, Indices
• Effective on multiple timeframes (5-minute to daily charts recommended)
• Compatible with other indicators for multi-factor analysis
INSTALLATION & USAGE:
1. Add indicator to your chart
2. Start with "Balanced" mode for most markets
3. Adjust ATR multiplier based on your risk tolerance
4. Use signals as potential entry/exit points (with confirmation)
5. Observe how stops adapt to changing volatility conditions
EDUCATIONAL TIP:
Try switching between Fast/Balanced/Smooth modes to see how different settings perform in various market conditions. Notice how wider stops (Smooth mode) can prevent premature exits during volatile trends, while tighter stops (Fast mode) may work better in calm, steady trends.
ATR% Table BoxATR Label Box.
What this does
Shows a live ATR% box
Turns green if ATR% ≤ 5%
Turns red if ATR% > 5%
Updates only on the last bar (no clutter)
House Rules SuperTrend Strategy (ATR-Based, Non-Repainting)📝 DESCRIPTION
Overview
The House Rules SuperTrend Strategy is a clean, rule-based trading strategy built using Pine Script® v6.
It is designed for transparent backtesting, non-repainting signals, and simple trend-following execution across all markets and timeframes.
This strategy uses TradingView’s built-in SuperTrend indicator, which is derived from Average True Range (ATR), to identify trend direction changes and generate long and short trades.
How the Strategy Works
Long Entry
A long position is opened when the SuperTrend flips from bearish to bullish
This confirms a potential upward trend shift
Short Entry
A short position is opened when the SuperTrend flips from bullish to bearish
This confirms a potential downward trend shift
Exits
Positions are closed when either:
The opposite SuperTrend signal appears, or
The ATR-based Stop Loss or Take Profit is reached (if enabled)
All signals are calculated on confirmed candle closes only, ensuring accurate and fair backtesting.
Risk Management
Optional ATR-based Stop Loss
Optional ATR-based Take Profit
Position sizing based on percentage of equity
Commission included for realistic performance results
All parameters are user-adjustable from the settings panel.
Backtesting & Transparency
This is a strategy, not an indicator
No repainting
No future data usage
No hidden filters
No lookahead bias
Fully compatible with TradingView’s Strategy Tester
Users are encouraged to test different symbols, timeframes, and parameter values to suit their trading style.
Recommended Use
This strategy can be used on:
Cryptocurrencies
Forex
Stocks
Indices
Futures
It performs best in trending market conditions and may underperform during low-volatility or ranging markets.
Disclaimer
This script is provided for educational and research purposes only.
It is not financial advice. Always test and validate strategies before using them in live trading.
ATR with History (Red/Yellow Style)Gives you last 20 candles ATR (Red Line) , and averages the last 2 weeks' ATR at your current time (Yellow Line)
ATR Levels - Current Candle Open [MTF]a further improvement from the first version of the script. My intent is to look at 4H ATR levels meanwhile being on 5m or 1m.
Let me know if you have any questions or any suggestions to improve.
Multi-Timeframe Support
Anchor to any timeframe (e.g., 240 for 4H, D for Daily)
Leave blank to use chart's timeframe
ATR Levels
24 configurable levels (0.5 - 12.0 ATR)
4 groups for easy management
Bull color (default: teal) / Bear color (default: orange)
Adjustable line width
Optional level labels
Levels start at current HTF candle open, extend right
Live Extension Display
NOW row shows real-time UP/DN extension in ATR units
Updates as price moves within current HTF candle
Anchor Marker
Line + crosshair at current HTF open
Configurable colors (label bg, text, line)
Adjustable label offset (0-100 bars)
Statistics Table
REACH / REACT / REACT % for levels 0.5-3.0 ATR
Color-coded: green ≥50%, orange 30-50%, red <30%
Position: bottom-right
Size: Normal/Large/Huge
ATR Levels - Previous Candle Open [MTF]a further improvement from the first version of the script. My intent is to look at 4H ATR levels meanwhile being on 5m or 1m.
Let me know if you have any questions or any suggestions to improve
Multi-Timeframe Support
Anchor to any timeframe while viewing on a different chart timeframe
Examples: View 4H ATR levels on 5m chart (set to 240), Daily on 1H (D), etc.
Leave blank to use chart's timeframe
ATR Levels
24 configurable levels from 0.5 to 12.0 ATR (in 0.5 increments)
Organized in 4 groups for easy management
Separate bull/bear colors
Adjustable line width
Optional level labels
Previous Candle Zone
Visual background box showing previous HTF candle's high-low range
Configurable zone color and transparency
Toggle on/off
Extend Levels Setting
0 = Levels end exactly where previous candle closed
-1 = Extend infinitely to the right
1-500 = Extend specific number of bars beyond candle close
Anchor Marker
Horizontal line + vertical crosshair at anchor point
Configurable label background, text color, and line color
Adjustable label offset (0-100 bars)
Line extends to meet the label
Statistics Table
Tracks REACH (times price hit level) and REACT (times price reversed)
REACT % color-coded: green ≥50%, orange 30-50%, red <30%
Based on HTF candle data (100 bars)
Configurable table size (Normal/Large/Huge)
Positioned top-right
ATR Levels - Current Candle Close1 of 3 scripts
I use all 3 together to "tell the story"
specifically designed for NQ to watch 4H timeframe.
code is generated by Claude AI so thats why it is free.
ATR Levels - Current Candle Open1 of 3 scripts
I use all 3 together to "tell the story"
specifically designed for NQ to watch 4H timeframe.
code is generated by Claude AI so thats why it is free.
ATR Levels - Previous Candle Open1 of 3 scripts
I use all 3 together to "tell the story"
specifically designed for NQ to watch 4H timeframe.
code is generated by Claude AI so thats why it is free.
Maor Beniash | Pro DashboardMB-PRO | Smart Info & Risk Dashboard
Description The MB-PRO indicator is a minimalist dashboard designed to provide traders with rapid situational awareness and critical risk management data, without cluttering the chart. This tool consolidates fundamental and technical data into one organized corner, helping avoid common errors such as entering a trade right before an earnings report or incorrect stop-loss calculations.
Key Features:
Full Company Name: Displays the complete name of the entity.
Market Cap: Shows the current market capitalization.
Sector & Industry: Quickly identifies the sector and industry classification.
Risk Management (ATR): Displays the Average True Range (14) in both absolute value and percentage (crucial for stop-loss sizing).
Earnings Alert: A smart warning mechanism where the text automatically turns orange when the report date is approaching (default: 21 days, adjustable). This helps prevent holding positions during high-risk periods.
ATR Value Number Display Only (No line chart)OVERVIEW:
The ATR (Average True Range) Value Display provides a clean, always-visible ATR reading on your chart. This essential volatility indicator helps traders set appropriate stop losses, position sizes, and profit targets based on current market volatility.
KEY FEATURES:
• Real-Time ATR Display: Shows current ATR value in a clean table format
• Customizable Appearance: Fully customizable text and background colors
• Adjustable Period: Standard 14-period default with full customization
• Bottom-Right Positioning: Non-intrusive placement that doesn't obstruct price action
• Tick Precision: Displays ATR value with accurate tick formatting
• Lightweight: Minimal resource usage with maximum clarity
HOW TO USE:
1. Add the indicator to any timeframe chart
2. Adjust ATR Length based on your trading style (14 is standard)
3. Customize colors to match your chart theme
4. Use ATR value to:
- Set stop loss distances (e.g., 1.5x ATR)
- Calculate position sizes based on risk tolerance
- Identify increasing/decreasing volatility trends
- Set realistic profit targets
SETTINGS:
• ATR Length: Calculation period (default: 14)
• Text Color: Customize the ATR text color (default: white)
• Box Color: Customize the background box color (default: semi-transparent blue)
PERFECT FOR:
✓ Position sizing based on volatility
✓ Setting dynamic stop losses that adapt to market conditions
✓ Identifying high/low volatility periods
✓ Comparing volatility across different instruments
✓ Risk management and trade planning
WHAT IS ATR?
Average True Range (ATR) measures market volatility by calculating the average range between high and low prices over a specified period. Higher ATR values indicate higher volatility, while lower values suggest calmer markets.
TIP: Use ATR on multiple timeframes to understand volatility across different trading horizons.
Luminous Volatility Flux [Pineify]```
Luminous Volatility Flux - Dynamic ATR Bands with Hull Moving Average Baseline
The Luminous Volatility Flux indicator is a sophisticated trend-following and volatility analysis tool that combines the responsiveness of the Hull Moving Average (HMA) with adaptive ATR-based bands that expand and contract based on real-time market volatility conditions. This indicator helps traders identify trend direction, volatility regimes, and potential breakout opportunities with high-probability entry signals.
Key Features
Hull Moving Average baseline for low-lag trend detection
Dynamic volatility bands that breathe with market conditions
Flux Factor system comparing short-term vs long-term ATR
Volatility-filtered breakout signals to reduce false entries
Gradient-filled zones for intuitive visual analysis
Real-time bar coloring based on trend direction
How It Works
The indicator operates on three core calculation layers:
1. Hull Moving Average Baseline
The foundation of this indicator is the Hull Moving Average, calculated using the formula: WMA(2*WMA(n/2) - WMA(n), sqrt(n)). Unlike traditional moving averages, the HMA dramatically reduces lag while maintaining smoothness. This makes it ideal for identifying trend changes earlier than conventional EMAs or SMAs. When the HMA is rising, the baseline turns green indicating bullish momentum; when falling, it turns red for bearish conditions.
2. Volatility Flux Factor
The unique aspect of this indicator is the Flux Factor calculation. It compares short-term ATR (default 14 periods) against long-term ATR (default 100 periods) to determine the current volatility regime:
Flux Factor > 1.0 = Volatility Expansion (market is more volatile than usual)
Flux Factor < 1.0 = Volatility Compression (market is in a squeeze)
This ratio creates a dynamic multiplier that causes the bands to expand during high volatility periods and contract during consolidation phases.
3. Dynamic Band Calculation
The upper and lower bands are calculated as: Baseline ± (Short ATR × Multiplier × Flux Factor). This means the bands automatically widen when volatility increases and tighten during quiet market conditions, providing context-aware support and resistance levels.
Trading Ideas and Insights
Trend Following: Trade in the direction of the baseline color. Green baseline suggests looking for long opportunities; red baseline suggests short opportunities.
Volatility Breakouts: The indicator plots "Flux" signals when price breaks above the upper band (bullish) or below the lower band (bearish) during volatility expansion phases. These signals indicate potential momentum continuation.
Mean Reversion: During compression phases (tight bands), prices often revert to the baseline. Consider taking profits near the bands and re-entering near the baseline.
Squeeze Detection: When bands are unusually tight (Flux Factor < 1), the market is coiling for a potential explosive move. Prepare for breakout trades.
How Multiple Indicators Work Together
This indicator integrates three distinct technical analysis concepts into a cohesive system:
The Hull Moving Average provides the trend direction foundation with minimal lag. The dual ATR comparison (short vs long) creates the Flux Factor that measures relative volatility. The dynamic bands combine both elements, using the HMA as the center and ATR-based deviations that scale with the Flux Factor.
The synergy works as follows: The HMA identifies the trend, the Flux Factor determines market regime (expansion vs compression), and the bands provide dynamic support/resistance levels. Breakout signals only trigger when all components align - price breaks the band AND volatility is expanding. This multi-layered approach filters out many false signals that would occur with static bands or simple moving average crossovers.
Unique Aspects
Unlike Bollinger Bands that use standard deviation, this indicator uses ATR ratio-based dynamic bands that better capture directional volatility
The Flux Factor concept is original - comparing two ATR timeframes to create a volatility regime indicator
Breakout signals are filtered by volatility expansion, reducing false signals during choppy, low-volatility conditions
Gradient fills provide instant visual feedback on the strength of the bullish or bearish zones
How to Use
Add the indicator to your chart. It works on all timeframes and instruments.
Observe the baseline color for overall trend direction (green = bullish, red = bearish).
Watch for band expansion/contraction to gauge volatility regime.
Look for "Flux" signals for potential breakout entries - these appear only during volatility expansion.
Use the gradient zones to identify potential support (lower green zone) and resistance (upper red zone) areas.
Customization
Baseline Length (default: 24) - Controls the HMA period. Lower values = more responsive but noisier; higher values = smoother but more lag.
ATR Length (default: 14) - Short-term ATR period for band calculation. Standard setting works well for most markets.
Flux Multiplier (default: 2.0) - Controls band width. Increase for wider bands (fewer signals), decrease for tighter bands (more signals).
Flux Sensitivity (default: 100) - Long-term ATR period for Flux Factor calculation. Higher values create a more stable volatility reference.
Conclusion
The Luminous Volatility Flux indicator offers traders a comprehensive view of market conditions by combining trend detection, volatility analysis, and signal generation into one elegant tool. Its adaptive nature makes it suitable for various market conditions - from trending markets where it identifies direction and momentum, to ranging markets where it highlights compression and potential breakout zones. The volatility-filtered signals help traders focus on high-probability setups while the visual gradient fills make chart analysis intuitive and efficient.
Note: This indicator is designed as a technical analysis tool. Always use proper risk management and consider multiple factors before making trading decisions. Past performance does not guarantee future results.
```
Session Liquidity Sweep + Trend ConfirmationThis strategy aims to capture high-probability intraday trades by combining liquidity sweeps with a trend confirmation filter. It is designed for traders who want a systematic approach to trade breakouts during specific market sessions while controlling risk with ATR-based stops.
How it Works:
Session Filter: Trades are only considered during a defined session (default 9:30 - 11:00). This helps avoid low-volume periods that can lead to false signals.
Trend Confirmation: The strategy uses a 50-period EMA to identify the market trend. Long trades are only taken in an uptrend, and short trades in a downtrend.
Liquidity Sweep Detection:
A long entry occurs when price dips below the prior N-bar low but closes back above it, indicating a potential liquidity sweep that stops being triggered before the trend continues upward.
A short entry occurs when price spikes above the prior N-bar high but closes below it, signaling a potential sweep of stops before the downward trend resumes.
ATR-Based Risk Management:
Stop loss is calculated using the Average True Range (ATR) multiplied by a configurable factor (default 1.5).
Take profit is set based on a risk-reward ratio (default 2.5x).
Position Sizing: Default position size is 5% of equity per trade, making it suitable for risk-conscious trading.
Inputs:
Session Start/End (HHMM)
Liquidity Lookback Period (number of bars to define prior high/low)
ATR Length for stop calculation
ATR Stop Multiplier
Risk-Reward Ratio
EMA Trend Filter Length
Visuals:
Prior Liquidity High (red)
Prior Liquidity Low (green)
EMA Trend (blue)
Why Use This Strategy:
Captures stop-hunt moves often triggered by larger market participants.
Only trades with trend confirmation, reducing false signals.
Provides automatic ATR-based stop loss and take profit for consistent risk management.
Easy to adjust session time, ATR, EMA length, and risk-reward to suit your trading style.
Important Notes:
Assumes 0.05% commission and 1-pip slippage. Adjust according to your broker.
Not financial advice; intended for educational, backtesting, or paper trading purposes.
Always test strategies thoroughly before applying to live accounts.
Monthly Weekly Daily ATR Calculation A weekly options trading script showing optimal levels using daily and weekly ATR ranges and stop loss. (Open ± ATR)
Bar-Close Confirmed SupertrendOverview
This indicator is a Supertrend-style trend follower that confirms direction changes only after a bar closes. Trend flips are determined using the previous bar’s close relative to the bands, which helps avoid intrabar changes during live candles.
How it works
Computes ATR (Average True Range)
Builds upper/lower bands using ATR and a multiplier
Updates trend direction only when a prior candle confirms a break of the band
Confirmation logic (bar-close based)
Trend direction is updated using conditions based on the previous candle, such as:
close > upper → confirm uptrend
close < lower → confirm downtrend
Because signals are confirmed on the prior bar, trend changes and markers are displayed only when confirmation exists.
Signals
Uptrend confirmation: prior candle closes above the upper band → bullish marker
Downtrend confirmation: prior candle closes below the lower band → bearish marker
Inputs
ATR Length (default 10)
ATR Multiplier (default 3.0)
Notes
This script is intended for bar-close workflows. Behavior and responsiveness may differ across markets and timeframes depending on volatility and chosen settings.
ATR + STRAT Dashboard (LAST + DIR + REV) + Est MovesATR + STRAT Dashboard is a multi-timeframe market structure indicator built around The Strat and ATR context. It summarizes higher-timeframe control (buyers vs sellers), highlights key Strat conditions (inside/outside/2-1-2 style transitions), and flags common reversal candles (hammer / shooting star style signals) to help spot potential turns. It also includes ATR-based context and estimated move guidance so you can quickly gauge whether price has “room” to run or is extended.
What it shows
MTF Dashboard: quick read of trend/control across multiple timeframes
Direction/Control: color-based bias (buyers vs sellers in charge)
Reversal Flags: highlights reversal-style candles for awareness (not guaranteed)
ATR Context + Estimated Moves: volatility-based framework for targets/expectations
Non-repainting HTF behavior: designed to use closed higher-timeframe bars to reduce repaint surprises
Note: This tool is for structure + context, not trade signals by itself. Always confirm with your plan/risk management.
Quality-Controlled Trend StrategyOverview
This strategy demonstrates a clean, execution-aware trend framework with fully isolated risk management.
Entry conditions and risk logic are intentionally separated so risk parameters can be adjusted without altering signal behavior.
All calculations are evaluated on confirmed bars to ensure backtest behavior reflects real-time execution.
Design intent
Many scripts mix entries and exits in ways that make results fragile or misleading.
This strategy focuses on structural clarity by enforcing:
confirmed-bar logic only
fixed and transparent risk handling
consistent indicator calculations
one position at a time
It is intended as a baseline framework rather than an optimized system.
Trading logic (high level)
Trend context
EMA 50 vs EMA 200 defines directional bias
Entry
Price alignment with EMA 50
RSI used as a momentum confirmation, not as an overbought/oversold signal
Risk management
Stop-loss based on ATR
Fixed risk–reward structure
Risk logic is isolated from entry logic
Editing risk without affecting signals
All stop-loss and take-profit calculations are handled in a dedicated block.
Users can adjust:
ATR length
stop-loss multiplier
risk–reward ratio
without modifying entry conditions.
This allows controlled experimentation while preserving signal integrity.
Usage notes
Results vary by market, timeframe, and volatility conditions.
This script is provided for testing and educational purposes and should be validated across multiple symbols and forward-tested before use in live environments.
Volume-Adjusted CCI Trend [Alpha Extract]A sophisticated trend identification system that combines dual EMA direction analysis with volume-weighted normalization and CCI momentum filtering for comprehensive trend validation. Utilizing Volume RSI integration and standard deviation-based bands that expand and contract with volume characteristics, this indicator delivers institutional-grade trend detection with multi-layered confirmation requirements. The system's volume adjustment mechanism modulates signal sensitivity based on participation strength while CCI thresholds prevent false signals during weak momentum conditions, creating a robust trend-following framework with reduced whipsaw susceptibility.
🔶 Advanced Dual EMA Direction Engine
Implements fast and slow exponential moving average comparison to establish primary trend direction bias with configurable period parameters for timeframe optimization. The system calculates trend direction as binary +1 (bullish when fast EMA exceeds slow EMA) or -1 (bearish when slow exceeds fast), providing foundational directional input that requires additional confirmation before generating actionable trend states.
🔶 Volume-Adjusted Normalization Framework
Features sophisticated normalization calculation that measures price deviation from basis EMA, scales by standard deviation, then applies volume-weighted adjustment factor for participation-sensitive signal generation. The system calculates Volume RSI to quantify relative volume strength, converts to ratio format, and multiplies normalized deviation by volume factor scaled by impact parameter, creating signals that strengthen during high-volume confirmations and weaken during low-volume moves.
// Volume-Adjusted Normalization
Vol_Ratio = Volume_RSI / 50
Vol_Factor = 1 + (Vol_Ratio - 1) * Vol_Impact
Dev = src - Basis_EMA
Raw_Normalized = Dev / (StdDev * Multiplier)
Vol_Adjusted_Norm = Raw_Normalized * Vol_Factor
🔶 CCI Momentum Filter Integration
Implements Commodity Channel Index threshold system with configurable upper and lower bounds to validate trend strength and filter sideways market conditions. The system calculates standard CCI with adjustable length, compares against asymmetric thresholds (default +100 bullish, -50 bearish), and requires CCI confirmation in addition to EMA direction and normalized deviation before transitioning trend states, ensuring only high-conviction signals generate entries.
🔶 Multi-Layer Trend State Logic
Provides intelligent trend state machine requiring simultaneous confirmation from EMA direction, volume-adjusted normalization threshold breach, and optional CCI momentum validation. The system maintains persistent trend state that only transitions when all three conditions align, preventing premature reversals during temporary retracements or low-volume fluctuations while capturing genuine trend changes with institutional-grade confirmation requirements.
🔶 Dynamic Volume Band Architecture
Creates volatility-adjusted bands around basis EMA using standard deviation multiplied by volume factor, producing channels that widen during high-volume periods and contract during low-volume consolidations. The system applies identical volume adjustment to band calculations as normalization metric, ensuring visual envelope consistency with underlying signal logic and providing intuitive reference boundaries for trend-following price action.
🔶 Gradient Strength Visualization System
Implements color intensity modulation based on normalized signal strength relative to threshold requirements, creating visual feedback that communicates trend conviction. The system calculates strength ratio by dividing absolute normalized value by threshold, caps at 1.0, and applies gradient interpolation from muted to vivid colors, instantly conveying whether current trend exhibits marginal or strong characteristics through line and candle coloring.
🔶 Volume RSI Calculation Engine
Utilizes RSI methodology applied to volume series rather than price to quantify relative participation strength with normalization to 0.5-1.5 range for factor multiplication. The system processes volume through standard RSI calculation, divides by 50 to center around 1.0, and produces ratio values where readings above 1.0 indicate above-average volume and below 1.0 suggest below-average participation for signal adjustment purposes.
🔶 Asymmetric Threshold Configuration
Features separate positive and negative normalization thresholds with independent CCI upper and lower bounds enabling optimization for bullish versus bearish signal generation characteristics. The system defaults to symmetric normalized thresholds (±0.2) but asymmetric CCI levels (+100/-50), recognizing that bullish momentum often requires stronger confirmation than bearish reversals in typical market structures.
🔶 Comprehensive Visual Integration
Provides multi-dimensional trend visualization through color-coded basis line, volume-adjusted bands with gradient fills, trend-synchronized candle coloring, and transition signal labels. The system enables selective display toggling for each visual component while maintaining consistent color scheme and strength-based intensity across all elements for cohesive chart presentation without overwhelming information density.
🔶 Alert and Signal Framework
Generates trend change alerts when state transitions occur with all confirmation requirements satisfied, providing notifications for bullish (transition to +1) and bearish (transition to -1) signals. The system implements state change detection through comparison with previous bar trend state, ensuring single alert per transition rather than continuous notifications during sustained trends.
🔶 Performance Optimization Architecture
Employs efficient calculation methods with null value handling for Volume RSI initialization and nz() functions preventing calculation errors during early bars. The system includes intelligent state persistence maintaining previous trend during ambiguous conditions and optimized gradient calculations balancing visual quality with computational efficiency across extended historical periods.
🔶 Why Choose Volume-Adjusted CCI Trend ?
This indicator delivers sophisticated trend identification through multi-layered confirmation combining directional EMA analysis, volume-weighted normalization, and momentum validation via CCI filtering. Unlike traditional trend indicators relying solely on price-based calculations, the volume adjustment mechanism ensures signals strengthen during high-participation moves and weaken during low-volume drifts, reducing false breakouts and choppy market whipsaws. The system's requirement for simultaneous EMA direction, normalized threshold breach, and CCI momentum confirmation creates institutional-grade signal quality suitable for systematic trend-following approaches across cryptocurrency, forex, and equity markets. The volume-adjusted bands provide dynamic support/resistance references while the gradient strength visualization enables instant assessment of trend conviction for position sizing and risk management decisions.
ADR% / ATR / LoD dist. Table - V2ADR% / ATR / LoD Distance Table (V2) + ATR Range Lines is a simple “daily volatility dashboard” that helps you quickly judge how extended a stock is during the day and where “normal” daily movement zones sit relative to price.
It’s designed to help you answer:
“Has this stock already made most of its usual daily move?”
“Am I chasing too late?”
“Where are typical +ATR / −ATR stretch and pullback zones?”
What you’ll see
ADR% (Average Daily Range %)
Shows the stock’s typical daily travel (low → high) as a percentage.
Example: ADR% = 4% means the stock often swings ~4% in a normal day.
ATR (Average True Range)
Shows the stock’s typical daily movement in price units ($ / points).
Example: ATR = 2.50 means it often moves about $2.50 per day.
LoD dist. (Low of Day distance)
Shows how far price is from today’s Low of Day, measured relative to ATR (as a %).
Higher % = more extended away from the day’s low.
Optional: ATR Range Lines (added in this version)
You can enable two guide lines that extend to the right:
ATR Up Line = Price + ATR
ATR Down Line = Price − ATR
These act like volatility guardrails to visualize “typical daily stretch” and “typical pullback” zones.
ATR “Live vs Locked” option (important)
Lock ATR to last completed day (no intraday updates):
ON (Locked): Uses the last completed daily ATR (yesterday’s finished value).
✅ ATR stays constant all day while the market is live.
OFF (Live): ATR can update intraday as today’s daily candle expands.
✅ ATR may change during the session.
Either way, ATR is still based on your chosen ATR Length (lookback period). Locking simply prevents the ATR from drifting intraday.
How to use it (Kullamägi-style principle)
Kristjan Kullamägi’s momentum style emphasizes pressing strength when conditions are right, but also respecting extension and risk/reward. This tool helps you quantify that:
If ADR%/ATR suggests the stock already moved near its usual daily range, chasing can be lower reward.
The ATR lines help you visualize when price is in a “normal stretch zone” vs a better risk area.
Locking ATR gives you stable intraday reference levels for cleaner execution.
Tips
Use ADR% to understand whether there’s likely “room” left in today’s move.
Use LoD dist. to quickly gauge if price is already far from the day’s low (extended).
Use ATR Up/Down Lines as a simple volatility framework for entries, add-ons, and risk planning.
Keep Lock ATR ON if you prefer stable levels throughout the session.
Credits
Original indicator concept & script: ArmerSchlucker
ADR% formula credit: MikeC / TheScrutiniser and GlinckEastwoot
Modifications (V2): TradersPod
Added optional ATR Up/Down lines extending to the right
Added “Lock ATR to last completed day” option for stable intraday ATR reference
Kept the original logic and purpose intact






















