ATR ZLEMA [QuantAlgo]🟢 Overview
The ATR ZLEMA indicator identifies trend direction and reversal points using a Zero Lag Exponential Moving Average (ZLEMA) combined with volatility-adjusted dynamic trailing stops. It eliminates the inherent lag of traditional moving averages while incorporating Average True Range (ATR) volatility measurement to create adaptive support and resistance levels that automatically adjust to market conditions, with optional noise filtering to reduce whipsaws in choppy markets, helping traders and investors identify trend changes, maintain positions during trending markets, and exit when momentum shifts across multiple timeframes and asset classes.
🟢 How It Works
The indicator's core methodology lies in its zero-lag trend detection system combined with volatility-adaptive trailing stops, where the ZLEMA eliminates moving average lag while ATR-based bands provide dynamic support and resistance levels:
lag = math.floor((zlemaLength - 1) / 2)
rawZlema = ta.ema(source + (source - source ), zlemaLength)
The Zero Lag EMA calculation uses lag reduction through data compensation, adding the difference between current price and lagged price to eliminate the delay inherent in traditional exponential moving averages, providing faster response to trend changes while maintaining smoothness.
The script incorporates an optional ATR-based noise filter that prevents the ZLEMA from updating during insignificant price movements, helping to reduce false signals in choppy, range-bound markets:
if enableNoiseFilter
noiseThreshold = atr * noiseFilter
priceChange = math.abs(rawZlema - zlema)
if priceChange > noiseThreshold
zlema := rawZlema
First, the indicator calculates the Average True Range to measure current market volatility, then applies a user-defined multiplier to determine the distance of the trailing stop from the ZLEMA:
atr = ta.rma(ta.tr(true), atrLength)
atrBand = atr * atrMultiplier
Next, dynamic trend detection occurs through a state-based system where the indicator tracks whether the ZLEMA is above or below the ATR trailing line, automatically adjusting the trailing stop position:
if trend == 1
if zlema < zlemaATR
trend := -1
zlemaATR := zlema + atrBand
else
zlemaATR := math.max(zlemaATR, zlema - atrBand)
The ATR trailing line acts as a volatility-adjusted stop that follows the ZLEMA during trends but never moves against the trend direction. It ratchets upward with the ZLEMA in uptrends and ratchets downward in downtrends, creating a protective barrier that adapts to market volatility.
Finally, trend reversal signals are generated when the ZLEMA crosses the ATR trailing line, indicating a shift in market momentum:
bullSignal = trend == 1 and trend == -1
bearSignal = trend == -1 and trend == 1
This creates a volatility-adaptive trend-following system that combines ZLEMA with dynamic support/resistance levels and optional noise filtering, providing traders with responsive directional signals and automatic stop-loss levels that adjust to both price momentum and market volatility conditions.
🟢 Signal Interpretation
▶ Bullish Trend (Green): ZLEMA trading above ATR trailing line with indicator showing bullish color, indicating established upward momentum with zero-lag confirmation = Long/Buy opportunities
▶ Bearish Trend (Red): ZLEMA trading below ATR trailing line with indicator showing bearish color, indicating established downward momentum with zero-lag confirmation = Short/Sell opportunities
▶ ATR Trailing Line as Dynamic Support: In uptrends, the trailing line acts as volatility-adjusted support level that rises with ZLEMA, never declining = Use as potential stop-loss reference for long positions = ZLEMA holding above indicates trend strength and momentum continuation
▶ ATR Trailing Line as Dynamic Resistance: In downtrends, the trailing line acts as volatility-adjusted resistance level that falls with ZLEMA, never rising = Use as potential stop-loss reference for short positions = ZLEMA holding below indicates trend weakness and momentum continuation
🟢 Features
▶ Preconfigured Presets: Three optimized parameter sets for different trading styles and market conditions. "Default" provides balanced configuration suitable for swing trading on daily and 4-hour charts with standard ZLEMA and ATR periods, moderate multiplier, and moderate noise filtering that works across most market conditions. "Fast Response" delivers aggressive configuration designed for intraday trading and scalping on 5-minute to 1-hour charts with shorter ZLEMA period for quick trend detection, reduced ATR period for rapid volatility adaptation, tighter multiplier for early entries/exits, and minimal noise filtering for maximum responsiveness. This is ideal for active traders monitoring positions closely but expect more frequent signals and potential whipsaws in choppy conditions. "Smooth Trend" focuses on conservative configuration for position trading and long-term trend following on daily to weekly charts with extended ZLEMA period for smoother trend identification, longer ATR period for stable volatility measurement, wide multiplier to filter minor corrections, and aggressive noise filtering to ensure only strong sustained trends trigger signals. This is best for patient traders focused on major trend moves with fewer reversals.
▶ Built-in Alerts: Three alert conditions enable comprehensive automated monitoring of trend changes and zero-lag momentum shifts. "Bullish Trend" triggers when the ZLEMA crosses above the ATR trailing line and trend state changes from bearish to bullish, signaling potential long entry opportunities with lag-eliminated confirmation. "Bearish Trend" activates when the ZLEMA crosses below the ATR trailing line and trend state changes from bullish to bearish, signaling potential short entry or long exit points with immediate momentum detection. "Any Trend Change" provides a combined alert for any trend reversal regardless of direction, allowing traders to be notified of all zero-lag momentum shifts without setting up separate alerts. These notifications enable traders to capitalize on trend changes and protect positions without continuous chart monitoring, leveraging the indicator's zero-lag technology for faster trend change alerts.
▶ Color Customization: Six visual themes (Classic, Aqua, Cosmic, Ember, Neon, plus Custom) accommodate different chart backgrounds and visual preferences, ensuring optimal contrast for identifying bullish versus bearish trends across various trading environments. The adjustable cloud fill transparency control (0-100%) allows fine-tuning of the gradient area prominence between the ATR trailing line and ZLEMA, with higher transparency values (70-95) creating subtle background context without overwhelming the chart while lower values (20-40) produce bold, prominent trend zone emphasis for instant recognition. Optional bar coloring with adjustable transparency (0-100%) extends the trend color directly to the price bars themselves based on ZLEMA trend state, providing immediate visual reinforcement of current trend direction without requiring reference to the indicator lines.
المتوسطات المتحركة
Root Deviation Loop | Lyro RSThe Root Deviation Loop indicator is a multi-mode trend signal tool that detects price momentum and breakout conditions using Root Mean Square Deviation (RMSD) instead of standard deviation. It provides a flexible framework for analyzing market conditions through three distinct signal generation methods: Bollinger Band-style deviation, a loop-based scoring system, and a hybrid combined signal. These modes help highlight trend continuation or reversal zones with a focus on smoothing out noise and avoiding extreme outlier effects.
Indicator Modes
Bollinger-Style RMSD Bands
This mode plots upper and lower volatility bands using RMSD around a selected moving average. RMSD is used instead of standard deviation for a more stable measurement of price dispersion. The formula for the bands is:
Upper Band = Moving Average + (RMSD × Multiplier)
Lower Band = Moving Average − (RMSD × Multiplier)
The bands dynamically expand and contract based on market volatility. Crossovers above or below these bands are used to signal trend shifts or breakouts.
For-Loop Momentum Scoring
This mode calculates a loop-based trend score by comparing the RMSD-weighted source to its historical values within a defined range. The loop evaluates the directional bias of price changes:
If the current value is greater than past values, it adds to the score.
If it is lower, it subtracts from the score.
This produces a net momentum score used to determine bullish or bearish dominance.
RMSD Weighted Source = (Price × RMSD) / RMSD
Score = Sum over loop: (src > src ) ? +1 : -1
Combined Signal
This mode merges the outputs of the Bollinger RMSD and For-Loop modes. It averages both signals into a single composite score. A long or short signal is generated based on whether the combined score crosses above or below user-defined thresholds.
Signal Interpretation
In the Bollinger Bands mode, signals are generated based on price interaction with the RMSD bands:
A long signal occurs when price crosses above the upper RMSD band
A short signal occurs when price crosses below the lower RMSD band
No signal is produced when price remains between bands
These signals suggest potential breakout points when price momentum exceeds recent volatility-defined boundaries.
⚠️Disclaimer
This indicator is a technical analysis tool and does not guarantee results. It should be used in conjunction with additional analysis methods and proper risk management strategies. The creators of this indicator are not responsible for any financial decisions made based on its signals.
GK Trend Ribbon 10L (Ultra Tight) + PREPARE HUDThis upgraded GK Trend Ribbon keeps original ultra tight 10-line trend engine but now adds a Real Time Preparation system to help traders get ready before the signal print
New Additions
Prepare Alerts (Early Warming System)
Before a GK BUY or GK SELL confirms, the indicator now detects when trend conditions are forming and prints
PREPARE GK BUY
PREPARE GK SELL
this gives traders time to: Set lot Sizes
Mark entries
Prepare risk management
Avoid late entries
Live Trend HUD (heads up display)
green Bullish mode
red Bearish mode
grey Neutral/wait
Warning symbol PREPARE GK BUY/SELL when a move is building
this acts like a market control panel keeping traders aligned with the trend direction at all times
CORE ENGINE (unchanged power)
zero lag trend structure
ATR based dynamic bands
1 clean GK BUY/SELL per confirmed trend shift
visual ribbon showing strength and direction
this version improves timing, preparation, and confidence-without adding clutter
this indicator are for educational purposes only
Gaussian MA - Progressive Multi-FilterThe previously published indicator based on Watson's Quadratic kernel was a bit complicated and "quadratic" in its calculations – it's an old indicator, and I've updated it a bit. I'm currently using Gaussian MA due to its simpler design and additional features that the former lacked.
Gaussian MA is an advanced trend-following indicator that combines statistical data smoothing with dynamic noise filtering. Here's a step-by-step analysis:
1. Gaussian Kernel Regression - the heart of the script is the gaussian_regression_max function. Instead of a simple average, it calculates a weight for each past price using a Gaussian distribution (bell curve):
Weights: Prices closest to the current candlestick have the greatest impact on the result, while those further away lose their importance exponentially.
The result: A very smooth line (yhat) that reacts faster than traditional moving averages while maintaining high resistance to short-term price spikes.
2. Progressive Volume Filter (ALMA Volume) - this is a unique part of the code that adjusts the indicator's sensitivity to market activity:
- the script calculates the moving average volume using the ALMA algorithm. The vol_ratio (current volume / average volume) is calculated.
Logic: If volume increases, the prog_factor decreases. This makes the filter thresholds "tighter," allowing the indicator to react more quickly to strong moves supported by high volume.
3. Dynamic Thresholds (Hysteresis) Instead of reacting to every change in the direction of the yhat line, the code calculates a "safety zone" (filter) that the price change must break through to signal a new trend:
- ATR: Threshold based on volatility (Average True Range).
- Percentage: Threshold percentage of the current price.
Both thresholds are multiplied by the previously mentioned prog_factor (volume).
4. Trend Detection and Visualization
Finally, the script compares the change in the regression value (diff) with the calculated thresholds:
- Bullish: If the change is positive and greater than the dynamic threshold.
- Bearish: If the change is negative and less than the negative threshold.
Result: The color of the line on the chart changes (green/red), and the alertcondition function allows you to set a notification when the color changes.
In short: Gaussian MA is an intelligent average that "knows" when the market is chaotic (it then increases the filtering thresholds) and when real momentum with volume is emerging (it then becomes more sensitive).
How to optimize the indicator parameters:
1. for the h parameter - (Lookback Window)
The h parameter controls the degree of regression smoothing. The higher the timeframe (e.g., Daily), the smaller h can be; on lower timeframes (e.g., 1m, 5m), you need more smoothing.
- For Scalping (1m - 5m): Set h in the range of 2.5 - 4.0. Noise on lower timeframes is high, so you need a "heavier" Gaussian kernel.
- For Day Trading (15m - 1h): Set h in the range of 1.5 - 2.5. This is the golden mean for ensuring liquidity without significant lag.
- For Swing (4h - Daily): Set h in the range of 0.75 - 1.5.
Trends on higher timeframes are stronger, so a smaller smoothing will allow for faster movement.
2. Calibrate vol_sens (Volume Sensitivity)
This parameter determines how much a "volume spike" facilitates a trend change.
- High Sensitivity (0.7 - 1.0): Aggressive approach. Even a small increase in trading volume will cause the indicator to react to price changes. Good for currency pairs with low liquidity.
- Low Sensitivity (0.1 - 0.4): Conservative approach. The indicator will ignore price movements unless accompanied by heavy volume (so-called "smart money"). Ideal for filtering out false positives (fakeouts).
It's safest to start with a setting of 0.5...
The above guidelines are indicative and are intended only to facilitate the use of the indicator - there are no perfect trading solutions; this indicator attempts to mathematically indicate points where entries/exits are statistically highly probable...
Works well with the MACD ALMA Edition ;)
Extreme HMA ATR BandsExtreme HMA ATR Bands
Extreme HMA ATR Bands are a fast and smooth trend-following tool designed to capture directional moves while minimizing false signals across volatile markets.
🚀 Benefits
• High responsiveness to market moves
• Smooth trend tracking with fewer false signals
• Strong performance on assets such as SOLUSD, SUIUSD, and CROUSD
• Clear visual band structure for easier market interpretation
💡 Core Idea
The indicator builds adaptive bands around a smoothed price structure derived from Hull-type processing. By focusing on extreme values and combining them into a balanced midpoint, the bands capture trend direction while maintaining smooth behavior.
ATR is then applied to dynamically scale the bands according to market volatility.
⚙️ How It Works
A fast-smoothed price series is calculated using Hull-style logic.
Highest and lowest values of this series are measured over multiple stages.
These extremes are processed again to balance responsiveness and smoothness.
The resulting midpoint forms the base trend line.
ATR is added and subtracted from this midpoint to generate adaptive upper and lower bands.
The result is a fast yet stable band structure that reacts efficiently to market direction changes.
📌 Usage Notes
• Price moving above the upper band suggests bullish pressure.
• Price moving below the lower band suggests bearish pressure.
• Band expansion signals increasing volatility.
• Band contraction often indicates consolidation phases.
Enjoy and trade smart.
PREMIUM TRADE ZONES - [EntryLab]Premium Trade Zones is a channel-based indicator designed to highlight potential high-probability areas for considering long and short trades, as well as ideal zones for taking profits. It uses dynamic channels to identify when price may be overextended (overbought or oversold), providing visual confluence for trade decisions.
Key Features are the Purple & Blue Channels: These represent the core overbought (upper/purple) and oversold (lower/blue) zones. Price entering or reacting at these levels often signals potential reversals or exhaustion.
Upper & Lower Channels: Serve as dynamic support/resistance levels. Use them as added confluence for: Entry points (long near lower channel in uptrends, short near upper in downtrends).
Profit-taking areas (scale out or exit when price reaches the opposing channel).
The oscillator component helps gauge momentum strength and when price deviates significantly into extreme zones.
How to Use Overbought/Oversold Insight:
Watch for price pushing into the purple channel (potential overbought → consider shorts or profit on longs) or blue channel (potential oversold → consider longs or profit on shorts). Reactions at these levels can offer good insight into mean reversion or continuation pauses.
Trade Entries — Look for confluence: e.g., price bouncing off the lower channel + bullish momentum on the oscillator = stronger case for long. Reverse for shorts at upper channel.
Profit Taking — Use the opposite channel as a target zone to take partial or full profits. For example, take some profit near the upper channel on a long trade.
General Tip — Combine with your existing trend analysis, support/resistance, or other indicators for better context. This tool works best as confluence rather than a standalone signal.
This indicator does not repaint and aims to provide clear, visual zones to simplify decision-making on entries, exits, and risk management. Always use proper risk management—trading involves risk.Feel free to adjust settings like channel sensitivity (if your inputs allow) to match different timeframes or assets.
DarkFutures Where/How/WhenTesting - for 15min Gold scalps
It identifies 4hr Where, 30m How and 5min When sareas of trade, then gives a signal to buy/sell based on that trend and momentum information using 8/21 EAM and Vwaps.
Adaptive Moving AverageAdaptive Moving Average
The Adaptive Moving Average (AMA) dynamically adjusts to market conditions, selecting the most responsive behavior while filtering noise to provide clearer trend guidance.
🚀 Why It’s Unique
• Exclusive adaptive logic unique to this script
• High speed with reduced noise
• Strong performance on volatile assets such as SOLUSD and CROUSD
• Highly customizable moving average combinations
• Multi-layer processing for improved accuracy
• Color-changing plots and reversal highlights for quick interpretation
💡 Core Idea
The indicator blends multiple user-selected moving averages and dynamically emphasizes the one best suited to current market conditions. This preserves responsiveness during strong moves while filtering weak or noisy signals.
⚙️ How It Works
Three user-selected moving averages are calculated using the same base length.
A first adaptation layer weights the averages based on their rate of change responsiveness.
A second rate-of-change filter measures market conditions to suppress signals during unstable environments.
The final adaptive average changes behavior depending on market speed and direction.
The result is a moving average that reacts quickly during trends while remaining stable during choppy periods.
📌 Usage Notes
• Color changes indicate shifts in trend direction.
• Highlighted diamonds mark reversal events.
• Higher adaptation thresholds reduce signals but increase reliability.
• Lower thresholds increase responsiveness for faster trading styles.
🧭 Conclusion
The Adaptive Moving Average continuously adjusts its behavior to reduce false signals while maintaining speed and responsiveness. It offers a versatile tool for traders seeking clearer market structure and improved strategy execution.
SPY 200SMA +4% Entry -3% Exit TQQQ/QLD/GLDM THREE PHASE STRATEGYWanted to take a look at all of the individual trades and provide a series of options to balance performance and risk. This post is expanding on my previous one - www.reddit.com
Here is the data and the backtesting splitting the strategy into three primary phases with multiple options and exact trade dates to help people easily backtest other combinations - docs.google.com (Three Tabs with the three phases)
If you just want my personal recommendations this would be what I will be using -
PHASE 1 (Strategy BUY signal triggers when SPY price crosses +4% over the SPY 200SMA) = 100% TQQQ
If trade lasts 366 days (Long Term Cap Gains) go to PHASE 2
If SPY price crosses below -3% SPY 200SMA go to PHASE 3
PHASE 2 (PHASE 1 lasts 366 days) = Deleverage and diversify into 50% QLD & 50% GLDM
PHASE 3 (Strategy SELL signal triggers when SPY price crosses -3% below the SPY 200SMA) = Defensive posture with 50% SGOV & 50% GLDM
As market degrades start selling SGOV and buying QQQ until 50% QQQ & 50% GLDM
TradingView Script for the THREE PHASE STRATEGY (imgur.com):
//
@version=
5
strategy("SPY 200SMA +4% Entry -3% Exit Strategy",
overlay=true,
default_qty_type=strategy.percent_of_equity,
default_qty_value=100)
// === Inputs ===
smaLength = input.int(200, title="SMA Period", minval=1)
entryThreshold = input.float(0.04, title="Entry Threshold (%)", step=0.01)
exitThreshold = input.float(0.03, title="Exit Threshold (%)", step=0.01)
startYear = input.int(1995, "Start Year")
startMonth = input.int(1, "Start Month")
startDay = input.int(1, "Start Day")
// === Time filter ===
startTime = timestamp(startYear, startMonth, startDay, 0, 0)
isAfterStart = time >= startTime
// === Calculations ===
sma200 = ta.sma(close, smaLength)
upperThreshold = sma200 * (1 + entryThreshold)
lowerThreshold = sma200 * (1 - exitThreshold)
// === Strategy Logic ===
enterLong = close > upperThreshold
exitLong = close < lowerThreshold
if isAfterStart
if enterLong and strategy.position_size == 0
strategy.entry("Buy", strategy.long)
if exitLong and strategy.position_size > 0
strategy.close("Buy")
// === 366-Day Marker Logic (Uninterrupted) ===
var
int
targetTime = na
// 1. Capture entry time only when a brand new position starts
if strategy.position_size > 0 and strategy.position_size == 0
targetTime := time + (366 * 24 * 60 * 60 * 1000)
// 2. IMPORTANT: If position is closed or a sell signal hits, reset the timer to "na"
if strategy.position_size == 0
targetTime := na
// 3. Trigger only if we are still in the trade and hit the timestamp
isAnniversary = not na(targetTime) and time >= targetTime and time < targetTime
// === Visuals ===
p_sma = plot(sma200, title="200 SMA", color=color.rgb(255, 0, 242))
p_upper = plot(upperThreshold, title="Entry Threshold (+4%)", color=color.rgb(0, 200, 0))
p_lower = plot(lowerThreshold, title="Exit Threshold (-3%)", color=color.rgb(255, 0, 0))
fill(p_sma, p_upper, color=color.new(color.green, 80), title="Entry Zone")
// Draw marker only if 366 days passed without a sell
if isAnniversary
label.new(bar_index, high, "366 DAYS - PHASE 2", style=label.style_label_down, color=color.yellow, textcolor=color.black, size=size.small)
// === Entry/Exit Labels ===
newOpen = strategy.position_size > 0 and strategy.position_size == 0
newClose = strategy.position_size == 0 and strategy.position_size > 0
if newOpen
label.new(x=bar_index, y=low * 0.97, text="BUY - PHASE 1", xloc=xloc.bar_index, yloc=yloc.price, color=color.lime, style=label.style_label_up, textcolor=color.black, size=size.small)
if newClose
label.new(x=bar_index, y=high * 1.03, text="SELL - PHASE 3", xloc=xloc.bar_index, yloc=yloc.price, color=color.red, style=label.style_label_down, textcolor=color.white, size=size.small)
200 SMA SPY Trading Range Bands Script:
//
@version=
5
indicator("200 SMA SPY Trading Range Bands", overlay=true)
// === Settings ===
smaLength = input.int(200, title="SMA Length")
mult1 = input.float(1.09, title="Multiplier 1 (9% Over)")
mult2 = input.float(1.15, title="Multiplier 2 (15% Over)")
// === Calculations ===
smaValue = ta.sma(close, smaLength)
line9Over = smaValue * mult1
line15Over = smaValue * mult2
// === Plotting ===
plot(smaValue, title="200 SMA", color=color.gray, linewidth=1, style=plot.style_linebr)
plot(line9Over, title="9% Over 200 SMA", color=color.rgb(255, 145, 0), linewidth=1)
plot(line15Over, title="15% Over 200 SMA", color=color.rgb(38, 1, 1), linewidth=2)
Adaptive RSIAdaptive RSI
Adaptive RSI is an enhanced version of the classic Relative Strength Index designed to automatically adjust its behavior to changing market conditions. The indicator can operate both as a mean-reversion oscillator and as a trend-following momentum tool, allowing traders to detect high/low value zones while also capturing directional moves.
Unlike the traditional RSI, which uses a fixed smoothing method, Adaptive RSI dynamically changes its calculation speed depending on market activity. This helps reduce false signals in slow or choppy markets while allowing faster responses during strong moves.
🔍 Concept & Idea
The goal behind Adaptive RSI is to make RSI responsive when opportunities appear and more conservative during uncertain or low-activity environments.
By automatically adjusting its internal smoothing and reaction speed, the indicator attempts to balance:
• Early entries during strong market moves
• Reduced noise during consolidation
• Mean-reversion opportunities in ranging markets
• Momentum confirmation in trending markets
This adaptive behavior makes the oscillator more versatile across multiple market conditions.
⚙️ How It Works
The indicator evaluates market activity using three drivers:
• True Range (volatility)
• Volume activity
• Rate of price change
Users can define which of these factors has priority. The script then checks up to three conditions; the more conditions that are satisfied, the faster and more responsive the RSI calculation becomes.
This creates multiple internal speed tiers ranging from smooth and conservative to highly responsive.
After the adaptive RSI is calculated, an additional adaptive smoothing layer is applied using the same logic, improving signal clarity while preserving responsiveness.
An optional feature allows the RSI to use a special Rate-of-Change weighted price source. This feature is more advanced and mainly intended for users who understand how weighted price construction affects oscillators.
A divergence measure between the base RSI and the smoothed Adaptive RSI is also plotted to help visualize shifts in momentum strength.
⚙️ Key Features
• Adaptive RSI calculation speed
• Works for both trend-following and mean-reversion approaches
• Adjustable long and short signal thresholds
• Overbought and oversold zone highlighting
• Divergence histogram between RSI and adaptive smoothing
• Trend-based coloring and visual signal markers
• Optional ROC-weighted source for advanced users
🧩 Inputs Overview
• RSI calculation length and smoothing length
• Price source selection or optional special weighted source
• Speed tier selection (slow, medium, fast behavior)
• Activity priority order (volatility, volume, momentum)
• Long/short and overbought/oversold thresholds
📌 Usage Notes
• Can be used both for trend continuation and mean-reversion strategies.
• Adaptive logic helps reduce noise during sideways markets.
• Strong moves may cause faster RSI transitions due to adaptive speed selection.
• Signals may update intrabar on lower timeframes.
• Works best when combined with risk management and confirmation tools.
• No indicator is perfect; always test before live use.
This script is intended for analytical purposes only and does not provide financial advice.
Length Adaptive MA SuperTrendLength Adaptive MA SuperTrend
Length Adaptive MA SuperTrend is a third-generation evolution of the SuperTrend concept, designed to improve signal accuracy while maintaining high responsiveness across different market conditions. The indicator dynamically adjusts its moving-average length to better match current market activity, allowing it to react quickly in fast markets while remaining stable during slower phases.
This adaptive behavior helps traders and investors visualize trend direction more clearly while reducing unnecessary noise, making the tool suitable for both beginners and advanced users seeking a responsive trend overlay.
🔍 How It Works
The indicator uses a moving average as the foundation for a SuperTrend-style structure, but instead of keeping the moving-average length fixed, it continuously adapts to changing market environments.
The script compares average activity levels across three horizons:
• Long-term period
• Medium-term period (half length)
• Short-term period (square-root length)
Activity is measured using one of three selectable drivers:
• ATR (volatility)
• Volume
• Standard deviation
Whichever period shows the strongest average activity becomes the active length used for calculating the moving-average base. This allows the indicator to automatically shift between faster and slower behavior depending on market conditions.
After selecting the active length, the result is slightly smoothed using the chosen moving-average type to produce a cleaner and more stable trend structure.
ATR-based bands are then applied around the adaptive base, and trend direction changes when price crosses these bands.
⚙️ Key Features
• Adaptive moving-average length selection
• Automatic adjustment between short, medium, and long market conditions
• Multiple smoothing types (SMA, EMA, WMA, HMA, VWMA, DEMA, TEMA, EWMA)
• ATR-based SuperTrend structure
• Trend transition markers
• Optional candle coloring based on active trend
🧩 Inputs Overview
• Moving-average smoothing type
• Base length and price source
• ATR length and multiplier
• Adaptive driver selection (ATR, Volume, or Standard Deviation)
📌 Usage Notes
• Helps visualize prevailing market trends across changing environments.
• Automatically adapts speed for trending and consolidating markets.
• Signals may change intrabar on lower timeframes.
• Best used with confirmation tools and proper risk management.
• Intended as an analytical tool, not financial advice.
Alg0 Hal0 CCI SnapAlg0 ۞ Hal0 CCI Snap
1. The Core PhilosophyThe A۞H CCI Snap is a dual-confirmation momentum oscillator. Unlike standard oscillators that only look at one data stream, this tool separates Market Structure (Background Trend) from Momentum Velocity (CCI Snap). It is designed to identify "Mean Reversion" opportunities and "Trend Continuation" snaps.
2. The Interface (Visual Components)The CCI Line (Blue): Tracks the "typical price" relative to its average. It tells you how fast the market is moving.The Signal Line (Yellow): A customizable moving average (HMA, TEMA, etc.) of the CCI. It filters out the "jitters" of the blue line.Background Trend (Green/Red): This is independent of the CCI. It tracks whether the actual Price is above or below a long-term Moving Average (default is 50 SMA).The 5-Color Heatmap Dashboard: A real-time data table that calculates the "Heat" of the current momentum compared to the last 3 bars.
3. How to Trade with A۞H CCI Snap
۞ The "Snap" Entry (Trend Continuation)This is the highest probability trade. You are looking for a momentary dip in a strong trend.Check Background: Background must be solid Green.Observe CCI: The Blue CCI line dips below the Yellow Signal line (a "cooling off").The Trigger: Enter when the Blue line snaps back above the Yellow line.Confirmation: The Dashboard should show Dark Green (Accelerating Bullish Heat).
۞ The Zero-Line Rejection (Trend Strength)
The 0 line is the "Fair Value" of momentum.Bullish: In a Green background, if CCI drops toward 0 but bounces off it without crossing, it confirms the trend is extremely strong.
Bearish: In a Red background, if CCI rises toward 0 but "rejects" and heads back down, it confirms heavy selling pressure.
۞ Exhaustion Warning (Mean Reversion)If the CCI is above +200 or below -200, the market is overextended. Look at the Dashboard Heatmap: If the CCI is at +210 but the cell color turns from Dark Green to Light Green, the "Heat" is leaving the move. This is your signal to tighten stop-losses or take profits.
4. Input Customization Guide and Recommendations
* Setting GroupFunctionPro-TipCCI CoreSets the sensitivity of the blue line.
* Use 14 for scalping, 20 for day trading.
* CCI SignalSets the smoothing of the yellow line.
* HMA (Hull) is best for crypto due to low lag.Background
* TrendDrives the Green/Red chart color.
* Set to 50 SMA for a "Trend Filter" or 200 SMA for "Macro" view.
* Alert SettingsToggles specific notifications.
* Turn off "Zero Cross" if you only want major Trend Flips.
5. Interpreting the Heatmap Dashboard:
۞ Dark Green (+): Bullish Acceleration (Buy/Hold).
۞ Light Green (+): Bullish Deceleration (Caution/Take Profit).
۞ Gray (0): No Momentum (Range-bound/Sideways).
۞ Orange/Light Red (-): Bearish Deceleration (Short Cover/Bottom Fish).
۞ Dark Red (-): Bearish Acceleration (Sell/Short).
!! Important Technical Note!!
VWAP Option: If you select VWAP as your Trend MA Type, the background will only color on charts that provide Volume Data (Stocks, Crypto, most Futures). It will appear gray on most Forex pairs.
Volatility Smoothed Moving Average BandVolatility Smoothed Moving Average Bands
The Volatility Smoothed Moving Average Bands are volatility-based bands that combine multiple measurements to provide a robust and accurate view of market trend and direction.
🚀 Benefits
• Reduced noise through multi-source averaging
• Fast response to market changes
• Strong performance on volatile assets, especially altcoins (notably CROUSD)
💡 Core Idea
The goal is to generate accurate and robust signals by averaging multiple components without requiring additional historical data. The method extracts more information from the same data, improving stability and responsiveness simultaneously.
⚙️ How It Works
A fast and a slow moving average are calculated.
Multiple intermediate values are derived and averaged to build a highly stable center line.
Differences between all components are averaged to estimate volatility.
This volatility is added and subtracted from the center line to form dynamic upper and lower bands.
The result is adaptive bands that track market structure with high accuracy and reduced lag.
📌 Usage Notes
• Best suited for trend detection and dynamic support/resistance.
• Bands expanding → volatility increasing.
• Bands contracting → market compression or consolidation.
• Crosses above/below bands often signal strong directional shifts.
Enjoy and trade smart.
ST | MA Occurrence ScannerThis tool is designed to automate the statistical backtesting of Moving Averages. Instead of subjectively looking at a chart to see if an MA is being "respected" by the price, this indicator quantifies every interaction to provide hard data.
How it Works: The scanner detects when price approaches a user-defined Moving Average (SMA) and tracks the outcome of that interaction based on a dynamic "Tolerance Zone."
Moving Average Divergence BandsMoving Average Divergence Bands
Moving Average Divergence Bands (MADB) is a trend-following overlay indicator designed to capture fast-moving trends while filtering out low-quality signals. It was developed with highly volatile markets in mind, particularly altcoins, where rapid entries are important but false breakouts are common.
The indicator builds adaptive price bands using two moving averages of different speeds and applies a statistical filter to allow signals only when market conditions show sufficient momentum. The result is a structure that attempts to combine fast reaction with controlled signal quality.
🚀 Core Idea
The objective of MADB is to create bands that respond quickly to market moves while avoiding entries during low-probability conditions.
This is achieved by combining fast and slower moving averages and activating signals only when price movement shows statistically meaningful deviation from its recent norm. In this way, entries tend to occur during periods with higher potential reward and reduced noise.
🔍 How It Works
The indicator calculates two moving averages:
• A primary moving average using the chosen length
• A secondary moving average using half of that length
Both averages are mathematically combined using exponent-based transformations, producing two divergence-based values. The higher value becomes the upper band, and the lower value becomes the lower band.
To filter signals, the script then computes a Z-score of price relative to its recent average. A trend switch occurs only when:
• Price breaks above or below the adaptive band, and
• The absolute Z-score exceeds the user-defined threshold.
This ensures signals occur only when price movement is statistically significant, reducing entries during low-volatility noise.
⚙️ Key Features
• Fast trend-following bands optimized for volatile markets
• Dual moving-average divergence construction
• Z-score filtering to reduce false signals
• Multiple moving-average types supported
• Adjustable statistical sensitivity
• Visual band and trend coloring styles
🧩 Inputs Overview
• Moving-average length and source
• Moving-average type selection
• Z-score calculation length
• Z-score activation threshold
• Visual style presets for band coloring
📌 Usage Notes
• Designed to identify strong market moves while filtering weak breakouts.
• Particularly suited for volatile markets and altcoin trading environments.
• Band breaks without sufficient Z-score strength will not trigger signals.
• Signals may change intrabar on lower timeframes.
• Best used alongside risk management and confirmation tools.
• No indicator eliminates risk; testing and validation are always recommended.
This script is intended for analytical use only and does not constitute financial advice.
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.
Nadaraya-Watson: Multi-FilterThe "Nadaraya" indicator models a curve fitted to the bars using the Rational Quadratic Kernel function - based on the script with additional filters that help plot the trend directly on the price chart.
The following filters are used:
- ALMA curve logic to smooth the Watson Nadaraya regression curve -Additionally, ALMA has a "volume-weighted" option, which may be important when there is little data or small price fluctuations - it helps stabilize the bar price
- ATR logic to smooth local data based on the assumed window and multiplier
- Local data deviation (fluctuations within the local window) logic to smooth the Watson nadaraya regression curve
The basic data is optimized for BTC on a 1D (daily) timeframe to demonstrate the indicator's capabilities.
Due to the relatively complex process of optimizing parameters for any timeframe, it is recommended to start with ATR and %. After optimization for a given interval, the indicator is very precise, although it is recommended to use it for very liquid assets with a large amount of data (sampling) - this is aimed at creating a smooth curve with an accurate indication of the change in the trend direction.
Momentum RSIMomentum RSI (MRSI | MisinkoMaster)
Momentum RSI is an enhanced version of the classic Relative Strength Index (RSI) developed by J. Welles Wilder. This indicator integrates momentum components directly into the RSI calculation, resulting in a faster, smoother oscillator that helps traders identify trend strength and value zones with greater precision.
Unlike the traditional RSI, which relies on a fixed smoothing approach, the Momentum RSI dynamically incorporates momentum derived from differences between moving averages of RSI values over different lookback periods. This improves signal responsiveness while reducing noise, providing clearer insights for both trend-following and mean-reversion trading strategies.
🔍 Concept & Idea
Momentum RSI aims to improve the original RSI by adding momentum elements that speed up its reaction to price changes without sacrificing smoothness. This hybrid approach helps:
Capture early signals in trending markets
Reduce false signals during sideways or choppy conditions
Highlight overbought and oversold zones more effectively
Provide additional momentum context for more informed trading decisions
By combining RSI with momentum derived from moving average differences, the indicator balances sensitivity and stability for a versatile application across different asset classes and timeframes.
⚙️ How It Works
The Momentum RSI calculation involves several key steps:
Standard RSI Calculation:
The indicator first calculates the classic RSI using user-defined length and smoothing parameters. Users can customize the RSI source price and the smoothing moving average (MA) type applied (options include RMA, SMA, EMA, WMA, DEMA, TEMA, HMA, ALMA).
Momentum Derivation:
Two versions of the RSI are computed with different smoothing lengths—a base RSI and a longer smoothed RSI. The difference between their moving averages represents a momentum component that measures the short-term trend strength.
Additional Momentum:
The difference between shorter-length and longer-length RSI calculations adds another momentum layer, reflecting momentum shifts over different timescales.
Momentum Integration:
These momentum components are combined and added to the previous RSI value, resulting in a momentum-enhanced RSI value (mrsi) that oscillates between 0 and 100.
Trend Detection:
Customizable upper and lower thresholds define long and short signal zones, allowing users to interpret when the market is trending bullish or bearish.
Overbought/Oversold Zones:
Additional thresholds highlight extreme value zones for potential mean-reversion trades.
🧩 Inputs Overview
RSI Length - Controls the primary RSI calculation length (default 20).
Source - Selects the price source for the RSI calculation (default: close).
Smoothing Length - Length used to smooth RSI values with the chosen MA type (default 12).
MA Type - Moving average method used for smoothing (options: RMA, SMA, EMA, WMA, DEMA, TEMA, HMA, ALMA).
ALMA Offset - Offset parameter for ALMA smoothing (applicable only if ALMA is selected).
ALMA Sigma - Sigma parameter for ALMA smoothing (applicable only if ALMA is selected).
Upper Threshold - RSI level above which a bullish (long) signal is triggered (default 55).
Lower Threshold - RSI level below which a bearish (short) signal is triggered (default 45).
Overbought Threshold - RSI level indicating overbought conditions (default 85).
Oversold Threshold - RSI level indicating oversold conditions (default 15).
📌 Usage Notes
Versatile Application: Use Momentum RSI for both trend-following and mean-reversion strategies.
Signal Clarity: The momentum integration reduces noise, helping avoid false breakouts and improving entry timing.
Customization: Adjust smoothing lengths and MA types to match the characteristics of your trading style or the specific asset.
Visual Aids: Background colors, candle coloring, and shape markers facilitate quick interpretation of momentum strength and trend changes.
Threshold Sensitivity: Fine-tune thresholds to balance between early signals and signal reliability.
Intrabar Updates: Signals may update on lower timeframes for responsive trading.
Combine with Other Tools: For best results, use Momentum RSI alongside volume, price action, or other confirmation indicators.
Backtest Before Live Trading: Always validate settings on historical data to ensure suitability for your trading instrument and timeframe.
⚠️ Disclaimer
This script is intended for educational and analytical purposes only and does not constitute financial advice. Trading involves risk, and users should perform their own due diligence before making any trading decisions.
Adaptive MTF EMA (auto TF)Adaptive MTF EMA (Auto TF) — Mid & Slow EMA that adjusts with chart timeframe
by @theadventuredan
This indicator plots two Higher-Timeframe EMAs (a Mid and a Slow EMA) on your current chart — but unlike normal MTF EMA scripts, the higher timeframes adapt automatically when you change the chart timeframe.
Instead of having to reconfigure TFs every time you switch from 5m to 15m to 1h, the indicator keeps the same “relationship” by using timeframe multipliers:
Mid TF = current chart TF × Mid Multiplier
Slow TF = current chart TF × Slow Multiplier
Example (default multipliers: 3× and 12×):
On 5m: Mid = 15m, Slow = 60m
On 15m: Mid = 45m, Slow = 180m (3h)
On 1h: Mid = 3h, Slow = 12h
This is especially useful if you use MTF EMA alignment as a trend filter (e.g., Mid EMA above Slow EMA = bullish bias).
How it works
The script reads your current chart timeframe using timeframe.in_seconds(timeframe.period) and converts it into minutes.
It calculates the adaptive MTF targets:
midMin = curMin × midMult
slowMin = curMin × slowMult
It requests the EMA from those higher timeframes via request.security() and plots them on your chart.
Optional:
A label can display the currently calculated Mid and Slow TFs (in minutes).
Inputs
EMA Length: EMA period (default 50)
Mid TF Multiplier: how many times higher the mid timeframe should be (default 3)
Slow TF Multiplier: how many times higher the slow timeframe should be (default 12)
Use confirmed HTF values (safer):
When enabled, the script uses the previous HTF EMA value (EMA ) to reduce behavior caused by partially formed higher-timeframe candles.
This may lag slightly but is often preferred for signal consistency.
Show TF label: shows a label with the current adaptive TFs
Notes / Limitations
Because the higher timeframe is derived by multiplication, some results may produce less common timeframes (e.g., 45m or 12h). This is expected.
MTF values depend on request.security() and will always reflect higher-timeframe candle logic (especially during an unclosed HTF candle). If you want less “in-progress candle” behavior, enable Use confirmed HTF values.
This is an EMA overlay tool — not a standalone buy/sell system.
Suggested usage
Trend bias filter: Mid EMA > Slow EMA = bullish bias, Mid < Slow = bearish bias
Entry alignment: use the adaptive EMAs as “context” while trading lower TF setups
Dynamic market structure: switch timeframes while keeping consistent “one step higher / two steps higher” EMA reference
MAs+Engulfing O caminho das Criptos
This indicator overlays multiple moving averages (EMAs 12/20/50/100/200 and SMA 200) and highlights bullish/bearish engulfing candles by dynamically coloring the candle body. The EMA 12 (gray) provides short-term momentum insight, helping refine entry timing and micro pullbacks.
When a bullish engulfing is detected, the candle appears as a strong dark green; for bearish engulfing, a vivid red. Normal candles retain classic lime/red colors. Visual alerts and bar coloring make price-action patterns instantly visible.
Includes built-in alert conditions for both patterns, supporting both trading automation and education. The tool upgrades trend-following setups by combining macro structure (longer EMAs) with micro momentum (EMA 12) and automatic price-action insights.
Multi-Timeframe EMA LevelsThis indicator will plot 2 different EMA's from 4 different timeframes on your chart. It displays as horizontal dotted lines so does not clutter your chart with loads of MA's. The lines are labeled with timeframe, EMA length and the level value. Levels update in real time.
If you are trading key levels or ma's this plots everything for you on one single chart.
Takashi Kotegawa Dip Reversal StrategyYou can use this alongside my other indicator to see if a stock is good with the indicator.






















