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.
Médias Móveis
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 ;)
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.
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.
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.
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.
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)
Scalping V5 - Strongest S/R & Predictive PanelScalping V5: Predictive Momentum & Institutional S/R by Herman Sangivera ( Papua )
Overview
Scalping V5 is a high-precision momentum indicator designed for lower timeframe traders (1m, 5m, 15m) who require a blend of trend-following logic and real-time structural analysis. Unlike standard indicators that only look at price action, this script utilizes a Dual-EMA Ribbon for momentum, a 200-period Filter for institutional bias, and a Predictive Probability Panel to gauge the strength of a potential move.
Key Features
1. Smart Momentum Ribbon (EMA 12/36)
The core of the strategy uses a dynamic ribbon.
Blue Ribbon: Indicates aggressive bullish momentum.
Red Ribbon: Indicates aggressive bearish momentum.
Traders should look for "Value Area" entries when the price retraces into the ribbon before continuing the trend.
2. Institutional Trend Guard (EMA 200)
To avoid "choppy" markets and counter-trend traps, the script plots a thick white baseline.
Above 200 EMA: Only Long setups are prioritized.
Below 200 EMA: Only Short setups are prioritized.
3. Dynamic Support & Resistance (S/R)
The script automatically calculates the Strongest Resistance (Highest High) and Strongest Support (Lowest Low) based on a 50-period lookback. This helps scalpers identify immediate "walls" in the market to set realistic Take Profit (TP) and Stop Loss (SL) levels.
4. Predictive Analytics Dashboard
The real-time panel in the top right provides:
Strategy State: Detects if the market is breaking out or consolidating.
Probability Score: A weighted calculation (smoothed by SMA) that determines the likelihood of the next move based on trend alignment.
Actionable Recommendation: Flashes "STRONG BUY" or "STRONG SELL" only when momentum and distance-to-target are optimal.
How to Trade with Scalping V5
Long Entry: Price must be above the EMA 200. Wait for the Ribbon to turn Blue and the Dashboard to display a Probability Up > 65%. Ensure there is enough "room" to the Red Resistance line.
Short Entry: Price must be below the EMA 200. Wait for the Ribbon to turn Red and the Dashboard to display a Probability Down > 65%. Ensure there is room to the Green Support line.
Exit Strategy: Take profits at the S/R levels or when the price closes back inside the EMA Ribbon.
Settings & Optimization
EMA 12/36: Optimized for Scalping. Increase to 20/50 for Day Trading.
Lookback S/R: Set to 50 for intraday levels; increase to 100 for more "significant" swing levels.
Overlay: This indicator is designed to be used directly on the price chart.
Disclaimer: Scalping involves significant risk. This tool is designed to assist your analysis and should be used in conjunction with proper risk management and price action confirmation.
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
Takashi Kotegawa Dip Reversal StrategyYou can use this alongside my other indicator to see if a stock is good with the indicator.
EZ Trend Indicator**EZ Trend Indicator (ElectZA)**
EZ Trend Indicator is a clean, lightweight trend tool built around the classic **EMA 50 / EMA 200** relationship. It plots both moving averages directly on price and automatically shades the chart background to quickly show whether the market is in a **bullish** or **bearish** environment. It also includes alert conditions for trend state changes so you can monitor direction without staring at the screen.
### What it shows
* **EMA 50 (Blue):** faster trend line (shorter-term direction)
* **EMA 200 (Red):** slower trend line (longer-term direction)
* **Background shading:**
* **Green** when EMA50 is above EMA200 (bullish trend)
* **Red** when EMA50 is below EMA200 (bearish trend)
### How to use
* **Trend filter (simple & effective):**
* When the background is **green**, prioritize **buy/long setups** and avoid counter-trend sells.
* When the background is **red**, prioritize **sell/short setups** and avoid counter-trend buys.
* **Crossover confirmation:**
* A shift from red → green suggests a potential bullish trend transition.
* A shift from green → red suggests a potential bearish trend transition.
* **Alerts:**
* Use **Bull Trend** alerts to get notified when the script detects a bullish trend state.
* Use **Bear Trend** alerts to get notified when the script detects a bearish trend state.
* **Best practice tip:**
* Combine this with your entry model (price action, support/resistance, MACD/RSI, etc.)—use EZ Trend Indicator as the **direction filter**, not the only trigger.
---
### Disclaimer
This indicator/script is provided for **educational and informational purposes only** and does **not** constitute financial, investment, or trading advice. Trading involves **significant risk**, and you may lose some or all of your capital. Past performance is **not** indicative of future results. Always do your own research, backtest on your market/timeframe, and apply proper risk management. By using this script, you accept full responsibility for all trading decisions and outcomes.
ATR DEEPATR Bottom Indicator:
ATR Bottom is a dynamic support level based on market volatility (ATR) and a long-term moving average. It helps identify a price zone where downside risk significantly increases.
Unlike static levels, this indicator adapts to current market volatility and adjusts as market conditions change.
How it works:
Calculated using a moving average and ATR
The level represents the difference between average price and volatility
Always plotted below price and updates dynamically
Not a standalone entry signal
Interpretation:
Price above the line — market remains stable
Price touching the line — potential reaction or slowdown zone
Close below the line — sign of scenario shift and increased bearish pressure
Important:
Does not predict exact market bottoms
Designed for scenario-based analysis
Best used in combination with other analytical tools
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.
CTR Weekly MA + 1D MA (improved)This does what the previous version does but more. I've added color candles to match the three weekly MAs. It helps show the stronger pullback as it goes deeper into each of the 3 weekly MAs and once the pullback is over and price goes back above or below the lowest or highest MA (depending on whether you are trading in a bear market or bull market) the candle colors will turn bright green or bright red.
ED by bigmmED by bigmm identifies significant price divergences from the 200-period Exponential Moving Average (EMA) by analyzing closing and opening price extremes. This tool marks the three most recent candles with the largest percentage deviations.
Key Features
EMA200 Analysis: Uses the 200-period Exponential Moving Average as the primary reference level for measuring price deviations
Deviation Calculation: Computes percentage-based deviations for both closing (below EMA) and opening (above EMA) prices
Top 3 Extremes: Identifies and marks only the three most recent maximum deviations for each direction
Visual Simplicity: Uses minimalistic green and red dots for clear visual identification without chart clutter
Historical Analysis: Evaluates the last 1440 bars (approximately 3 years on daily timeframe) to find significant deviation patterns
Recommended Usage
Best used on higher timeframes (H4, D1, W1) for the following reasons:
Reduced Noise: Higher timeframes filter out market noise and provide cleaner deviation signals
Trend Context: EMA200 carries more significance on daily and weekly charts as a major trend indicator
Strategic Signals: Extreme deviations on higher timeframes often correspond to important support/resistance levels and potential reversal zones
Reduced False Signals: Longer timeframes minimize whipsaws and provide more reliable extreme readings
Position Trading: Ideal for swing traders and position traders who base decisions on daily or weekly price action
SENTINEL CORE by Pipsomnian🛡️ Sentinel Core — Learning Mode (Structure & Probability Engine)
by Pipsomnian
Sentinel Core is the core structure and probability framework within the Sentinel ecosystem.
It is designed to help traders move beyond binary signals and learn how to grade market environments based on structure, momentum, and session quality.
This tool does not predict price.
It evaluates context.
🎯 What Sentinel Core Is
Sentinel Core is an EMA-structured learning and decision-grading indicator built to train:
• Trend alignment
• Pullback behavior
• Market structure continuation
• Session discipline (London & New York)
• Probability stacking
Instead of asking “Is there a signal?”,
Sentinel Core trains you to ask:
“How strong is this setup?”
🧠 The Scoring Concept
Each potential setup is evaluated using multiple structural components:
• EMA trend alignment
• Pullback to value
• Strong candle confirmation
• Market structure continuation
• Active trading session
The result is a setup quality grade:
• A+ → Full structural alignment
• B → Strong but incomplete alignment
Lower-quality environments are intentionally ignored.
This encourages patience, selectivity, and discipline.
🟢 Who Sentinel Core Is For
Sentinel Core is designed for traders who:
• Already understand basic EMA structure
• Want fewer, higher-quality setups
• Trade session-based markets (especially Gold)
• Value discipline over frequency
• Want to develop judgment, not dependency
🚫 What Sentinel Core Is NOT
Sentinel Core is not:
• A signal service
• An automated strategy
• A promise of profitability
• A replacement for risk management
• A shortcut to consistency
Execution, risk control, and psychology remain your responsibility.
⏱️ Recommended Use
• Timeframe: 5-Minute
• Markets: XAUUSD (Gold), major FX, liquid indices
• Sessions: London & New York
EMAs are used for structure and context, not prediction.
🧭 Position in the Sentinel Framework
• Sentinel Lite — Learn structure & discipline
• Sentinel Core — Grade probability & judgment
• Sentinel A+ — Refine timing & precision
• Sentinel Gold Standard — Execute with control
⚠️ Educational use only. No financial advice.
— Pipsomnian
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.
SPY Quant ML + Session Filter Strategy [CocoChoco]S&P 500 Quant: Machine Learning & Mean Reversion (Session-Filtered)
Overview
This is a professional-grade quantitative strategy designed specifically for the S&P 500. It combines classical statistical mean reversion (Z-Score) with a modern Machine Learning filter and rigorous institutional-grade risk management.
The strategy is optimized for traders who prioritize high win rates and capital preservation, specifically avoiding the "gap risk" associated with holding positions overnight.
Core Methodology
1. Statistical Entry (The Z-Score Engine)
The strategy identifies "oversold" conditions in a bullish context. It calculates the Z-Score of the price relative to its 20-period Mean (SMA). By default, it looks for a -1.2 Standard Deviation extension, signaling a high-probability "dip" ripe for a snap-back to the mean.
2. Trend & ML Filters
To avoid "catching a falling knife," the strategy uses two layers of confirmation:
Trend Filter: Only takes Long positions when the price is above the 200-period SMA, ensuring we only buy dips in a confirmed uptrend.
ML Correlation Filter: A Machine Learning-inspired module that analyzes the correlation between RSI and Volatility (ATR). It only permits entries when market internal dynamics suggest a reversal is technically "healthy."
3. Institutional Risk Management
This script is built for "safety-first" automation:
Hard Stop Loss: Fixed at 1.5% to protect against sudden market shocks.
Active Trailing: A dual-trigger trailing stop. It activates once the price touches the 20 SMA (The Mean) OR once a trade reaches a 0.50% profit threshold. This ensures near-winners are protected and large runners are captured.
Intraday Circuit Breaker: Includes a Max Daily Drawdown (2%) limit. If hit, the script automatically closes losing positions and halts trading for the day, while allowing winning positions to continue.
Key Features
Session-Specific: Tailored for the US Trading Session (UTC/NY times).
Zero Overnight Risk: Automatically flattens all positions before the market close (16:00 NY Time).
Holiday Intelligence: Hard-coded logic for US Market Holidays and Early Closes (2026–2028), ensuring the bot doesn't get stuck in illiquid holiday markets.
Hourly Entry Cap: Limits entries to one per hour to prevent over-concentration during a single price leg.
How to Use
Timeframe: I suggest you use it on the 5-minute or 1-hour timeframe for optimal results.
Instrument: Designed for the S&P 500, but highly effective on SPY, IVV, and ES (Futures).
Pyramiding: Designed to handle up to 3 concurrent positions, allowing the strategy to scale into a move as the Z-Score deepens.
Automation Ready
This script is fully compatible with webhook-based automation tools. All signals (Entry, SL, Trail, Market Close, and Daily Limit) are clearly labeled in the Alert comments for seamless execution. I haven't tasted it though. This is not financial advice. Please perform your own tests and manage your risk.
Disclaimer
Past performance does not guarantee future results. This script is a tool for quantitative analysis and should be used as part of a broader diversified trading plan.
Custom 4 EMA [TickDaddy]Custom 4 EMA
Hey everyone! I put together this EMA indicator because I wanted more flexibility than what's built into TradingView. Figured I'd share it in case anyone else finds it useful.
What it does:
Customizable EMA Periods
Change all 4 EMAs to whatever periods you want (I default them to 20/50/100/200 but you do you)
Not stuck with preset values - make it work for your strategy
Toggle EMAs On/Off
Each EMA has its own checkbox
Super handy when you want to hide one without losing your settings
Multi-Timeframe EMAs
This is the big one - you can view higher timeframe EMAs on your current chart
Like if you're day trading on a 15-min chart but want to see where the daily EMAs are
Works with any timeframe: Daily, Weekly, 4-Hour, whatever you need
Helps you respect the bigger picture while trading lower timeframes
Smooth Lines on Multi-Timeframe
Got rid of that annoying zigzag effect when using higher timeframes
You can adjust how smooth you want them (or turn it off)
Clean Setup
All the style stuff (colors, thickness, line style) is in the Style tab where it should be
Input settings are organized and not cluttered
Built this with Pine Script v6. Hope it helps with your trading!






















