5EMA_BB_ScalpingWhat?
In this forum we have earlier published a public scanner called 5EMA BollingerBand Nifty Stock Scanner , which is getting appreciated by the community. That works on top-40 stocks of NSE as a scanner.
Whereas this time, we have come up with the similar concept as a stand-alone indicator which can be applied for any chart, for any timeframe to reap the benifit of reversal trading.
How it works?
This is essentially a reversal/divergence trading strategy, based on a widely used strategy of Power-of-Stocks 5EMA.
To know the divergence from 5-EMA we just check if the high of the candle (on closing) is below the 5-EMA. Then we check if the closing is inside the Bollinger Band (BB). That's a Buy signal. SL: low of the candle, T: middle and higher BB.
Just opposite for selling. 5-EMA low should be above 5-EMA and closing should be inside BB (lesser than BB higher level). That's a Sell signal. SL: high of the candle, T: middle and lower BB.
Along with we compare the current bar's volume with the last-20 bar VWMA (volume weighted moving average) to determine if the volume is high or low.
Present bar's volume is compared with the previous bar's volume to know if it's rising or falling.
VWAP is also determined using `ta.vwap` built-in support of TradingView.
The Bolling Band width is also notified, along with whether it is rising or falling (comparing with previous candle).
What's special?
We love this reversal trading, as it offers many benifits over trend following strategies:
Risk to Reward (RR) is superior.
It _Does Hit_ stop losses, but the stop losses are tiny.
Means, althrough the Profit Factor looks Nahh , however due to superior RR, end of day it ended up in green.
When the day is sideways, it's difficult to trade in trending strategies. This sort of volatility, reversal strategies works better.
It's always tempting to go agaist the wind. Whole world is in Put/PE and you went opposite and enter a Call/CE. And turns out profitable! That's an amazing feeling, as a trader :)
How to trade using this?
* Put any chart
* Apply this screener from Indicators (shortcut to launch indicators is just type / in your keyboard).
* It will show you the Green up arrow when buy alert comes or red down arrow when sell comes. * Also on the top right it will show the latest signal with entry, SL and target.
Disclaimer
* This piece of software does not come up with any warrantee or any rights of not changing it over the future course of time.
* We are not responsible for any trading/investment decision you are taking out of the outcome of this indicator.
指數移動平均線(EMA)
AutoFib Breakout Strategy for Uptrend AssetsThis trading strategy is designed to help you catch powerful upward moves on assets that are in a long-term uptrend, such as Gold (XAUUSD). It uses a popular technical tool called the Fibonacci Extension, combined with a trend filter and a risk-managed exit system.
✅ When to Use This Strategy
• Works best on higher timeframes: Daily (1D), 3-Day (3D), or Weekly (W).
• Best used on uptrending assets like Gold.
• Designed for swing trading – holding trades from a few days to weeks.
📊 How It Works
1. Find the Trend
We only want to trade in the direction of the trend.
• The strategy uses the 200-period EMA (Exponential Moving Average) to identify if the market is in an uptrend.
• If the price is above the 200 EMA, we consider it an uptrend and allow long trades.
2. Identify Breakout Levels
• The strategy detects recent high and low pivot points to draw Fibonacci extension levels.
• It focuses on the 1.618 Fibonacci level, which is often a target in strong trends.
• When the price breaks above this level in an uptrend, it signals a potential momentum breakout – a good time to buy.
3. Enter a Trade
• The strategy enters a long (buy) position when the price closes above the 1.618 Fibonacci level and the market is in an uptrend (above the 200 EMA).
4. Manage Risk Automatically
• The trade includes a stop-loss set to 1x the ATR (Average True Range) below the entry price – this protects against sudden drops.
• It sets a take-profit at 3x the ATR above the entry – aiming for higher rewards than risks.
⚠️ Important Notes
• 📈 Higher Timeframes Preferred: This strategy works best on Daily (D), 3-Day (3D), and Weekly (W) charts, especially on Gold (XAUUSD).
• 🧪 Not for Deep Backtesting: Due to the nature of how pivot points and Fib levels are calculated, this strategy may not perform well in backtesting simulations (because the historical calculations can shift). It is better used for live analysis and forward testing.
EMA Hierarchy Alternating Alert MarkersThis script allows you to set EMA 5, 13 & 26 in a single indicator.
It allows you to set an alert when PCO or NCO happens where 5>13>26 (PCO) or 5<13<26 (NCO).
It has been designed in such a way that the alert will only be sounded on the first PCO or NCO.
Once a PCO has happened then the next PCO alert will only come after the NCO has happened.
This feature helps you to avoid getting multiple alerts specially if you are using a lower timeframe.
Scripts: Equities, F&O, Commodity, Crypto, Currency
Time Frame: All
By TrustingOwl83470
Strategy with DI+/DI-, ADX, RSI, MACD, EMA + Time Stop [FAILED]I built this strategy combining trend strength (ADX, DI+/DI-), momentum (MACD, RSI), candle filters, and EMA direction with a time-based stop and fixed SL/TP.
Backtested on BTCUSDT (5-min) from Jan–Apr 2023 using TradingView Premium’s deep data.
🟥 Results:
• 5 trades, 0 wins
• -14.45% total P&L
• All trades hit stop-loss (1.5%)
• Profit factor: 0.00
Despite logical layering, the entry timing didn’t capture profitable moves. Possibly overfiltered or too delayed.
💡 Sharing this for transparency and learning. Not every test wins — but every test teaches. On to the next.
200 EMA Cross with Optional Second EMA and CooldownThis indicator uses two EMA lengths of your choosing.
1. This indicator is similar to the most recent published indicator.
2. There is also an alert when price crosses the faster EMA. But not the slower EMA.
3. You will receive all alerts as price crosses the main EMA, not the optional EMA.
6. The is also a "Cooldown" period between alerts so we do not see too many alerts at the same time. Set it to your own number of candles. On the 3m chart I have it set on 25.
8. All the alerts have been combined into one alert. The buy and sell alerts.
9. I use this on the 3m chart with a 30m Williams %r and a 3H Williams %r. The 30 minute WPR should be enough.
10. This indicator is not designed to catch the tops or bottoms of a trend. It is designed to catch the continuation moves. This indicator need a trending market. The trend is your friend. Do not just take any signal from the indicator, it is best to sell when the higher timeframes are trending down.
11. Use at your own risk. Do your own due diligence before taking a trade and do not rely entirely on this indicator.
12. I have not tested this indicator for repainting.
13. Have fun with the indicator and leave a message and vote it up if you like it.
EMA Trend Filter Alert + CooldownThis indicator uses two EMA lengths of your choosing.
1. There is an alert when price crosses the long EMA which I put in Flags at the top and bottom.
2. There is also an alert when price crosses the second faster EMA.
3. When price is above the slow EMA then only BUY signals will be shown as price crosses the fast EMA.
4. When price is below the fast EMA then only sell signals will be shown as price crosses below the fast EMA.
5. I included colour changing EMAs for both the fast and slow EMA.
6. The is also a "Cooldown" period between alerts so we do not see too many alerts at the same time. Set it to your own number of candles. On the 3m chart I have it set on 25.
7. This indicator is designed to be a trend following indicator. When the market is trending down then price will be under the slow EMA and then only sell signals will appear on the price cross of the fast EMA. During the turning points in the trend we might not see signals on the fast EMA so I added the alert for the cross of the slow EMA.
8. All the alerts have been combined into one alert. The buy and sell alerts and also the cross of the slow EMA.
9. I use this on the 3m chart with a 30m Williams %r and a 3H Williams %r. The 30 minute should be enough.
10. This indicator is not designed to catch the tops or bottoms of a trend. It is designed to catch the continuation moves. This indicator need a trending market. The trend is your friend.
11. Use at your own risk. Do your own due diligence before taking a trade and do not rely entirely on this indicator.
12. I have not tested this indicator for repainting.
13. Have fun with the indicator and leave a message and vote it up if you like it.
Best EMA FinderThis script, Best EMA Finder, is based on the same original logic as the Best SMA Finder I published previously. Although it was not the initial goal of the project, several users asked for an EMA version, so here it is.
The script scans a wide range of Exponential Moving Average (EMA) lengths, from 10 to 500, and identifies the one that historically delivered the most robust performance on the current chart. The choice to stop at 500 is deliberate: beyond that point, EMA curves tend to flatten and converge, adding processing time without meaningful differences in signals or outcomes.
Each EMA is evaluated using a custom robustness score:
Profit Factor × log(Number of Trades) × sqrt(Win Rate)
Only EMA lengths that exceed a user-defined minimum number of trades are considered valid. Among these, the one with the highest robustness score is selected and displayed on the chart.
A table summarizes the results:
- Best EMA length
- Total number of trades
- Profit Factor
- Win Rate
- Robustness Score
You can adjust:
- Strategy type: Long Only or Buy & Sell
- Minimum number of trades required
- Table visibility
This script is designed for analysis and optimization only. It does not execute trades or handle position sizing. Only one open trade per direction is considered at a time.
Leslie's EMA Ribbon: 5/9/21 + VWAPEMA + VWAP Crossover Indicator with Alerts
This script blends three Exponential Moving Averages (5, 9, 21) with VWAP to identify momentum shifts and volume-confirmed trend signals. It’s optimized for the Daily timeframe, but also adaptable to shorter-term trading.
🔍 Why this combination?
EMAs provide fast and reliable trend signals:
- 5/9 EMA crossover → short-term shifts (more frequent)
- 9/21 EMA crossover → swing confirmation (less noise)
- VWAP adds volume context used by institutions for fair value tracking.
- 9EMA crossing VWAP confirms price action supported by volume.
Together, these tools offer a multi-layered view of market momentum — combining speed, confirmation, and conviction.
⚙️ Features:
Clean plots with dynamic labels on latest bar
Adjustable line weights for clarity
Alerts included for all crossovers:
- 5EMA / 9EMA
- 9EMA / 21EMA
- 9EMA / VWAP
✅ How to Use:
- Best on the Daily timeframe
- Use 5/9 as early signals, 9/21 for trend filtering, and 9/VWAP for volume-backed setups
- Turn on alerts to stay informed of key shifts without staring at charts
EWMA & EWVar + EWStd Expansion with MTF_V.5EWMA & EWVar + EWStd Expansion with MTF_V.5
This indicator combines adaptive trend smoothing (EWMA), variance estimation (EWVar) and dynamic volatility “bursts” (EWStd Expansion) with optional higher-timeframe confirmation. It’s designed both for visual chart analysis and for automated alerts on regime changes.
Key Features
EWMA (Exponential Smoothing):
• Computes an exponential moving average with either a custom α or a length-derived α = 2/(N+1).
• Option to recalculate only every N bars (reduces CPU load).
EWVar & EWStd (Variance & Standard Deviation):
• Exponentially weighted variance tracks recent price dispersion.
• EWStd (σ) is computed alongside the EWMA.
• Z-score (deviation in σ units) shows how far price has diverged from trend.
Multi-Timeframe Filter (MTF):
• Optionally require the same trend direction on a chosen higher timeframe (e.g. Daily, Weekly, H4).
• Real-time lookahead available (may repaint).
Gradient Around EWMA:
• A multi-layer “glow” zone of ±1σ, broken into up to 10 steps.
• Color interpolates between “upper” and “lower” shades for bullish, bearish and neutral regimes.
Instantaneous Trendline (ITL):
• Ultra-fast trend filter with slope-based coloring.
• Highlights micro-trends and short-lived accelerations.
Cross-Over Signals (ITL ↔ EWMA):
• Up/down triangles plotted when the ITL crosses the main EWMA.
EWStd Expansion (Volatility Bursts):
• Automatically detects σ expansions (σ growth above a set % threshold).
• Price filter: only when price moves beyond EWMA ± (multiplier·σ).
• Optional higher-timeframe confirmation.
Labels & Alerts:
• Text labels and circular markers on bars where a volatility burst occurs.
• Built-in alertcondition calls for both bullish and bearish expansions.
How to Use
Visual Analysis:
• The gradient around EWMA shows the width of the volatility channel expanding or contracting.
• ITL color changes instantly highlight short-term impulses.
• EWMA line color switches (bullish/bearish/neutral) indicate trend state.
Spotting Volatility Breakouts:
• “EWStd Expansion” labels and circles signal the onset of strong moves when σ spikes.
• Useful for entering at the start of new impulses.
Automated Alerts:
• Set alerts on the built-in conditions “Bullish EWStd Expansion Alert” or “Bearish EWStd Expansion Alert” to receive a popup or mobile push when a burst occurs.
This compact tool unifies trend, volatility and multi-timeframe analysis into a single indicator—ideal for traders who want to see trend direction, current dispersion, and timely volatility burst signals all at once.
Momentum Long + Short Strategy (BTC 3H)Momentum Long + Short Strategy (BTC 3H)
🔍 How It Works, Step by Step
Detect the Trend (📈/📉)
Calculate two moving averages (100-period and 500-period), either EMA or SMA.
For longs, we require MA100 > MA500 (uptrend).
For shorts, we block entries if MA100 exceeds MA500 by more than a set percentage (to avoid fading a powerful uptrend).
Apply Momentum Filters (⚡️)
RSI Filter: Measures recent strength—only allow longs when RSI crosses above its smoothed average, and shorts when RSI dips below the oversold threshold.
ADX Filter: Gauges trend strength—ensures we only enter when a meaningful trend exists (optional).
ATR Filter: Confirms volatility—avoids choppy, low-volatility conditions by requiring ATR to exceed its smoothed value (optional).
Confirm Entry Conditions (✅)
Long Entry:
Price is above both MAs
Trend alignment & optional filters pass ✅
Short Entry:
Price is below both MAs and below the lower Bollinger Band
RSI is sufficiently oversold
Trend-blocker & ATR filter pass ✅
Position Sizing & Risk (💰)
Each trade uses 100 % of account equity by default.
One pyramid addition allowed, so you can scale in if the move continues.
Commission and slippage assumptions built in for realistic backtests.
Stops & Exits (🛑)
Long Stop-Loss: e.g. 3 % below entry.
Long Auto-Exit: If price falls back under the 500-period MA.
Short Stop-Loss: e.g. 3 % above entry.
Short Take-Profit: e.g. 4 % below entry.
🎨 Why It’s Powerful & Customizable
Modular Filters: Turn on/off RSI, ADX, ATR filters to suit different market regimes.
Adjustable Thresholds: Fine-tune stop-loss %, take-profit %, RSI lengths, MA gaps and more.
Multi-Timeframe Potential: Although coded for 3 h BTC, you can adapt it to stocks, forex or other cryptos—just recalibrate!
Backtest Fine-Tuned: Default settings were optimized via backtesting on historical BTC data—but they’re not guarantees of future performance.
⚠️ Warning & Disclaimer
This strategy is for educational purposes only and designed for a toy fund. Crypto markets are highly volatile—you can lose 100 % of your capital. It is not a predictive “holy grail” but a rules-based framework using past data. The parameters have been fine-tuned on historical data and are not valid for future trades without fresh calibration. Always practice with paper-trading first, use proper risk management, and do your own research before risking real money. 🚨🔒
Good luck exploring and experimenting! 🚀📊
MFI + RSI + EMA Dynamic SignalsThe MFI + RSI + EMA Dynamic Signals is a designed to combine with widened criteria to capture more trading opportunities, it balances momentum, trend, and flexibility, making it suitable for trading on timeframes like 15-minute to 4-hour charts.
How It Works
The indicator uses three technical components with relaxed criteria to produce signals:
Money Flow Index (MFI) for Momentum Extremes:
The MFI, calculated over a 14-period length, measures buying and selling pressure using price and volume. A buy signal can trigger when MFI crosses above the oversold level (default: 30, widened from 20), indicating potential buying pressure, while a sell signal can occur when MFI crosses below the overbought level (default: 70, widened from 80), suggesting selling pressure.
Relative Strength Index (RSI) for Momentum Confirmation:
The RSI, calculated over a 14-period length, confirms momentum strength. Bullish momentum is confirmed when RSI is above a buy threshold (default: 45, relaxed from 50), and bearish momentum when below a sell threshold (default: 55, relaxed from 50), allowing more signals near neutral momentum levels.
Exponential Moving Average (EMA) for Trend Sensitivity:
The indicator uses a fast EMA (default: 9 periods) and a slow EMA (default: 21 periods) to detect trend direction and crossovers. Signals can trigger when the fast EMA crosses the slow EMA, or when the fast EMA is within a proximity threshold (default: 0.5%) of the slow EMA, capturing early trend changes and increasing signal frequency.
Signal Generation
Signals are generated using the previous bar’s values to prevent repainting, with widened criteria for more frequent triggers:
Buy Signal: Either the MFI crosses above the oversold level or the fast EMA crosses above the slow EMA, and either RSI confirms bullish momentum (above 45) or the EMAs are near a crossover (within 0.5%). Displayed as a green upward triangle below the bar.
Sell Signal: Either the MFI crosses below the overbought level or the fast EMA crosses below the slow EMA, and either RSI confirms bearish momentum (below 55) or the EMAs are near a crossover (within 0.5%). Displayed as a red downward triangle above the bar.
EMA Distance Indicator [Eddie_Bitcoin]🧠 EMA Distance Indicator
This indicator is a powerful statistical tool designed to provide enhanced context and signal confirmation for traders who want to go beyond price action alone.
🔍 What It Does
It calculates and visualizes the distance (%) between two EMAs (Fast & Slow) on either the current chart symbol or a selected macro/index reference (e.g., BTC Dominance, TOTAL2, SPX). But it doesn't stop there:
Core Features:
✅ Real-time percentage distance between Fast and Slow EMAs
📈 Slope (acceleration) of the distance to capture trend momentum
🎯 Gaussian-based percentile rank of the current distance over a configurable historical sample
📊 Dynamic table display with intuitive emoji-based cues
🟢 Highlights extreme conditions (e.g., TOP 5% or LOW 5% percentile zones)
🔀 Compare both current asset and a macro/index asset side by side
💡 Display Modes:
Show only current symbol
Show only index/macro symbol
Show both with independently positioned tables
🎯 Ideal Use Case
This is not a standalone strategy, but rather a statistical enhancement module designed to pair with tools like my 👉 “AltCoin Index Correlation” indicator. It gives traders a quick-glance view of strength, divergence, and macro alignment for better timing and confidence.
Whether you’re trading altcoins, tracking dominance charts, or watching indices, this tool offers deep visual insight into EMA-based dynamics — wrapped in a clean, emoji-driven UI.
🛠 Created with ❤️ by @Eddie_Bitcoin
🚀 ### Check my profile for other juicy hints and original strategies. ### 🚀
EMA Pullback Speed Strategy 📌 **Overview**
The **EMA Pullback Speed Strategy** is a trend-following approach that combines **price momentum** and **Exponential Moving Averages (EMA)**.
It aims to identify high-probability entry points during brief pullbacks within ongoing uptrends or downtrends.
The strategy evaluates **speed of price movement**, **relative position to dynamic EMA**, and **candlestick patterns** to determine ideal timing for entries.
One of the key concepts is checking whether the price has **“not pulled back too much”**, helping focus only on situations where the trend is likely to continue.
⚠️ This strategy is designed for educational and research purposes only. It does not guarantee future profits.
🧭 **Purpose**
This strategy addresses the common issue of **"jumping in too late during trends and taking unnecessary losses."**
By waiting for a healthy pullback and confirming signs of **trend resumption**, traders can enter with greater confidence and reduce false entries.
🎯 **Strategy Objectives**
* Enter in the direction of the prevailing trend to increase win rate
* Filter out false signals using pullback depth, speed, and candlestick confirmations
* Predefine Take-Profit (TP) and Stop-Loss (SL) levels for safer, rule-based trading
✨ **Key Features**
* **Dynamic EMA**: Reacts faster when price moves quickly, slower when market is calm – adapting to current momentum
* **Pullback Filter**: Avoids trades when price pulls back too far (e.g., more than 5%), indicating a trend may be weakening
* **Speed Check**: Measures how strongly the price returns to the trend using candlestick body speed (open-to-close range in ticks)
📊 **Trading Rules**
**■ Long Entry Conditions:**
* Current price is above the dynamic EMA (indicating uptrend)
* Price has pulled back toward the EMA (a "buy the dip" situation)
* Pullback depth is within the threshold (not excessive)
* Candlesticks show consecutive bullish closes and break the previous high
* Price speed is strong (positive movement with momentum)
**■ Short Entry Conditions:**
* Current price is below the dynamic EMA (indicating downtrend)
* Price has pulled back up toward the EMA (a "sell the rally" setup)
* Pullback is within range (not too deep)
* Candlesticks show consecutive bearish closes and break the previous low
* Price speed is negative (downward momentum confirmed)
**■ Exit Conditions (TP/SL):**
* **Take-Profit (TP):** Fixed 1.5% target above/below entry price
* **Stop-Loss (SL):** Based on recent price volatility, calculated using ATR × 4
💰 **Risk Management Parameters**
* Symbol & Timeframe: BTCUSD on 1-hour chart (H1)
* Test Capital: \$3000 (simulated account)
* Commission: 0.02%
* Slippage: 2 ticks (minimal execution lag)
* Max risk per trade: 5% of account balance
* Backtest Period: Aug 30, 2023 – May 9, 2025
* Profit Factor (PF): 1.965 (Net profit ÷ Net loss, including spreads & fees)
⚙️ **Trading Parameters & Indicator Settings**
* Maximum EMA Length: 50
* Accelerator Multiplier: 3.0
* Pullback Threshold: 5.0%
* ATR Period: 14
* ATR Multiplier (SL distance): 4.0
* Fixed TP: 1.5%
* Short-term EMA: 21
* Long-term EMA: 50
* Long Speed Threshold: ≥ 1000.0 (ticks)
* Short Speed Threshold: ≤ -1000.0 (ticks)
⚠️Adjustments are based on BTCUSD.
⚠️Forex and other currency pairs require separate adjustments.
🔧 **Strategy Improvements & Uniqueness**
Unlike basic moving average crossovers or RSI triggers, this strategy emphasizes **"momentum-supported pullbacks"**.
By combining dynamic EMA, speed checks, and candlestick signals, it captures trades **as if surfing the wave of a trend.**
Its built-in filters help **avoid overextended pullbacks**, which often signal the trend is ending – making it more robust than traditional trend-following systems.
✅ **Summary**
The **EMA Pullback Speed Strategy** is easy to understand, rule-based, and highly reproducible – ideal for both beginners and intermediate traders.
Because it shows **clear visual entry/exit points** on the chart, it’s also a great tool for practicing discretionary trading decisions.
⚠️ Past performance is not a guarantee of future results.
Always respect your Stop-Loss levels and manage your position size according to your risk tolerance.
DECODE Moving Average ToolkitDECODE Moving Average Toolkit: Your All-in-One MA Analysis Powerhouse!
This versatile indicator is designed to be your go-to solution for analysing trends, identifying potential entry/exit points, and staying ahead of market movements using the power of Moving Averages (MAs).
Whether you're a seasoned trader or just starting out, the Decode MAT offers a comprehensive suite of features in a user-friendly package.
Key Features:
Multiple Moving Averages: Visualize up to 10 Moving Averages simultaneously on your chart.
Includes 5 Exponential Moving Averages (EMAs) and 5 Simple Moving Averages (SMAs).
Easily toggle the visibility of each MA and customize its length to suit your trading style and the asset you're analyzing.
Dynamic MA Ribbons: Gain a clearer perspective on trend direction and strength with 5 configurable MA Ribbons.
Each ribbon is formed between a corresponding EMA and SMA (e.g., EMA 20 / SMA 20).
The ribbon color changes to indicate bullish (e.g., green) or bearish (e.g., red) sentiment, providing an intuitive visual cue.
Toggle ribbon visibility with a single click.
Powerful Crossover Alerts: Never miss a potential trading opportunity with up to 5 customizable MA Crossover Alerts.
Define your own fast and slow MAs for each alert from any of the 10 available MAs.
Receive notifications directly through TradingView when your specified MAs cross over or cross under.
Optionally display visual symbols (e.g., triangles ▲▼) directly on your chart at the exact crossover points for quick identification.
Highly Customizable:
Adjust the source price (close, open, etc.) for all MA calculations.
Fine-tune the appearance (colors, line thickness) of every MA line, ribbon, and alert symbol to match your charting preferences.
User-Friendly Interface: All settings are neatly organized in the indicator's input menu, making configuration straightforward and intuitive.
How Can You Use the Decode MAT in Your Trading?
This toolkit is incredibly versatile and can be adapted to various trading strategies:
Trend Identification:
Use longer-term MAs (e.g., 50, 100, 200 period) to identify the prevailing market trend. When prices are consistently above these MAs, it suggests an uptrend, and vice-versa.
Observe the MA ribbons: A consistently green ribbon can indicate a strong uptrend, while a red ribbon can signal a downtrend. The widening or narrowing of the ribbon can also suggest changes in trend momentum.
Dynamic Support & Resistance:
Shorter-term MAs (e.g., 10, 20 period EMAs) can act as dynamic levels of support in an uptrend or resistance in a downtrend. Look for price pullbacks to these MAs as potential entry opportunities.
Crossover Signals (Entries & Exits):
Golden Cross / Death Cross: Configure alerts for classic crossover signals. For example, a 50-period MA crossing above a 200-period MA (Golden Cross) is often seen as a long-term bullish signal. Conversely, a 50-period MA crossing below a 200-period MA (Death Cross) can be a bearish signal.
Shorter-Term Signals: Use crossovers of shorter-term MAs (e.g., EMA 10 crossing EMA 20) for more frequent, shorter-term trading signals. A fast MA crossing above a slow MA can signal a buy, while a cross below can signal a sell.
Use the on-chart symbols for quick visual confirmation of these crossover events.
Confirmation Tool:
Combine the Decode MAT with other indicators (like RSI, MACD, or volume analysis) to confirm signals and increase the probability of successful trades. For instance, a bullish MA crossover combined with an oversold RSI reading could strengthen a buy signal.
Multi-Timeframe Analysis:
Apply the toolkit across different timeframes to get a broader market perspective. A long-term uptrend on the daily chart, confirmed by a short-term bullish crossover on the 1-hour chart, can provide a higher-confidence entry.
The DECODE Moving Average Toolkit empowers you to tailor your MA analysis precisely to your needs.
Quadruple EMA (QEMA)The Quadruple Exponential Moving Average (QEMA) is an advanced technical indicator that extends the concept of lag reduction beyond TEMA (Triple Exponential Moving Average) to a fourth order. By applying a sophisticated four-stage EMA cascade with optimized coefficient distribution, QEMA provides the ultimate evolution in EMA-based lag reduction techniques.
Unlike traditional compund moving averages like DEMA and TEMA, QEMA implements a progressive smoothing system that strategically distributes alphas across four EMA stages and combines them with balanced coefficients (4, -6, 4, -1). This approach creates an indicator that responds extremely quickly to price changes while still maintaining sufficient smoothness to be useful for trading decisions. QEMA is particularly valuable for traders who need the absolute minimum lag possible in trend identification.
▶️ **Core Concepts**
Fourth-order processing: Extends the EMA cascade to four stages for maximum possible lag reduction while maintaining a useful signal
Progressive alpha system: Uses mathematically derived ratio-based alpha progression to balance responsiveness across all four EMA stages
Optimized coefficients: Employs calculated weights (4, -6, 4, -1) to effectively eliminate lag while preserving compound signal stability
Numerical stability control: Implements initialization and alpha distribution to ensure consistent results from the first calculation bar
QEMA achieves its exceptional lag reduction by combining four progressive EMAs with mathematically optimized coefficients. The formula is designed to maximize responsiveness while minimizing the overshoot problems that typically occur with aggressive lag reduction techniques. The implementation uses a ratio-based alpha progression that ensures each EMA stage contributes appropriately to the final result.
▶️ **Common Settings and Parameters**
Period: Default: 15| Base smoothing period | When to Adjust: Decrease for extremely fast signals, increase for more stable output
Alpha: Default: auto | Direct control of base smoothing factor | When to Adjust: Manual setting allows precise tuning beyond standard period settings
Source: Default: Close | Data point used for calculation | When to Adjust: Change to HL2 or HLC3 for more balanced price representation
Pro Tip: Professional traders often use QEMA with longer periods than other moving averages (e.g., QEMA(20) instead of EMA(10)) since its extreme lag reduction provides earlier signals even with longer periods.
▶️ **Calculation and Mathematical Foundation**
Simplified explanation:
QEMA works by calculating four EMAs in sequence, with each EMA taking the previous one as input. It then combines these EMAs using balancing weights (4, -6, 4, -1) to create a moving average with extremely minimal lag and high level of smoothness. The alpha factors for each EMA are progressively adjusted using a mathematical ratio to ensure balanced responsiveness across all stages.
Technical formula:
QEMA = 4 × EMA₁ - 6 × EMA₂ + 4 × EMA₃ - EMA₄
Where:
EMA₁ = EMA(source, α₁)
EMA₂ = EMA(EMA₁, α₂)
EMA₃ = EMA(EMA₂, α₃)
EMA₄ = EMA(EMA₃, α₄)
α₁ = 2/(period + 1) is the base smoothing factor
r = (1/α₁)^(1/3) is the derived ratio
α₂ = α₁ × r, α₃ = α₂ × r, α₄ = α₃ × r are the progressive alphas
Mathematical Rationale for the Alpha Cascade:
The QEMA indicator employs a specific geometric progression for its smoothing factors (alphas) across the four EMA stages. This design is intentional and aims to optimize the filter's performance. The ratio between alphas is **r = (1/α₁)^(1/3)** - derived from the cube root of the reciprocal of the base alpha.
For typical smoothing (α₁ < 1), this results in a sequence of increasing alpha values (α₁ < α₂ < α₃ < α₄), meaning that subsequent EMAs in the cascade are progressively faster (less smoothed). This specific progression, when combined with the QEMA coefficients (4, -6, 4, -1), is chosen for the following reasons:
1. Optimized Frequency Response:
Using the same alpha for all EMA stages (as in a naive multi-EMA approach) can lead to an uneven frequency response, potentially causing over-shooting of certain frequencies or creating undesirable resonance. The geometric progression of alphas in QEMA helps to create a more balanced and controlled filter response across a wider range of movement frequencies. Each stage's contribution to the overall filtering characteristic is more harmonized.
2. Minimized Phase Lag:
A key goal of QEMA is extreme lag reduction. The specific alpha cascade, particularly the relationship defined by **r**, is designed to minimize the cumulative phase lag introduced by the four smoothing stages, while still providing effective noise reduction. Faster subsequent EMAs contribute to this reduced lag.
🔍 Technical Note: The ratio-based alpha progression is crucial for balanced response. The ratio r is calculated as the cube root of 1/α₁, ensuring that the combined effect of all four EMAs creates a mathematically optimal response curve. All EMAs are initialized with the first source value rather than using progressive initialization, eliminating warm-up artifacts and providing consistent results from the first bar.
▶️ **Interpretation Details**
QEMA provides several key insights for traders:
When price crosses above QEMA, it signals the beginning of an uptrend with minimal delay
When price crosses below QEMA, it signals the beginning of a downtrend with minimal delay
The slope of QEMA provides immediate insight into trend direction and momentum
QEMA responds to price reversals significantly faster than other moving averages
Multiple QEMA lines with different periods can identify immediate support/resistance levels
QEMA is particularly valuable in fast-moving markets and for short-term trading strategies where speed of signal generation is critical. It excels at capturing the very beginning of trends and identifying reversals earlier than any other EMA-derived indicator. This makes it especially useful for breakout trading and scalping strategies where getting in early is essential.
▶️ **Limitations and Considerations**
Market conditions: Can generate excessive signals in choppy, sideways markets due to its extreme responsiveness
Overshooting: The aggressive lag reduction can create some overshooting during sharp reversals
Calculation complexity: Requires four separate EMA calculations plus coefficient application, making it computationally more intensive
Parameter sensitivity: Small changes in the base alpha or period can significantly alter behavior
Complementary tools: Should be used with momentum indicators or volatility filters to confirm signals and reduce false positives
▶️ **References**
Mulloy, P. (1994). "Smoothing Data with Less Lag," Technical Analysis of Stocks & Commodities .
Ehlers, J. (2001). Rocket Science for Traders . John Wiley & Sons.
AltCoin Index Correlation🧠 AltCoin Index Correlation — Strategy Overview
AltCoin Index Correlation is a dynamic EMA-based trading strategy designed primarily for altcoins, but also adaptable to stocks and indices, thanks to its flexible reference index system.
🧭 Strategy Philosophy
The core idea behind this strategy is simple yet powerful:
Price action becomes more meaningful when it aligns with broader market context.
This script analyzes the correlation between the asset’s trend and a reference index trend, using dual EMA (Exponential Moving Average) crossovers for both.
When both the altcoin and the reference index (e.g. Altcoin Dominance, BTC Dominance, Total Market Cap, or even indices like the NASDAQ 100 or S&P 500) are aligned in trend direction, the script considers it a high-confidence setup.
It also includes:
Optional inverse correlation logic (for contrarian setups)
Custom leverage settings (e.g., 1x, 1.8x, etc.)
A dynamic scale-out mechanism during weakening trends
Date filtering for controlled backtests
A live performance dashboard with equity, PnL, win rate, drawdown, APR, and more
⚙️ Default Settings & Backtest Results
Timeframe tested: 1H
Test date: May 20, 2025
Sample: 100 high-cap altcoins
Reference index: CRYPTOCAP:OTHERS.D (Altcoin Dominance)
Leverage: 1.8x (180% of capital used)
📊 With default settings:
Win rate: ~80%
Higher profits, due to increased exposure
Best suited for confident trend followers with higher risk tolerance
📉 With fixed capital or 1x leverage:
Win rate improves to ~90%
Lower returns, but greater capital preservation
Ideal for conservative or risk-managed trading styles
🔄 Versatility
While tailored for altcoins, this strategy supports traditional markets as well:
Easily switch the reference index to OANDA:NAS100USD or S&P 500 for stock correlation trading
Adjust EMA lengths and leverage to match the asset class and volatility profile
🧩 Suggested Use
Best used on trending markets (not sideways)
Ideal for 1H timeframes, but adjustable
Suitable for traders who want a rules-based, macro-aware entry/exit system
Try it out, customize it to your style, try different settings and share your results with the community!
Feedback is welcome — and improvements are always in progress.
🚀 ### Check my profile for other juicy hints and original strategies. ### 🚀
Buy/Sell Ei - Premium Edition (Fixed Momentum)**📈 Buy/Sell Ei Indicator - Smart Trading System with Price Pattern Detection 📉**
**🔍 What is it?**
The **Buy/Sell Ei** indicator is a professional tool designed to identify **buy and sell signals** based on a combination of **candlestick patterns** and **moving averages**. With high accuracy, it pinpoints optimal entry and exit points in **both bullish and bearish trends**, making it suitable for forex pairs, stocks, and cryptocurrencies.
---
### **🌟 Key Features:**
✅ **Advanced Candlestick Pattern Detection**
✅ **Momentum Filter (Customizable consecutive candle count)**
✅ **Live Trade Mode (Instant signals for active trading)**
✅ **Dual MA Support (Fast & Slow MA with multiple types: SMA, EMA, WMA, VWMA)**
✅ **Date Filter (Focus on specific trading periods)**
✅ **Win/Loss Tracking (Performance analytics with success rate)**
---
### **🚀 Why Choose Buy/Sell Ei?**
✔ **Precision:** Reduces false signals with strict pattern rules.
✔ **Flexibility:** Works in both live trading and backtesting modes.
✔ **User-Friendly:** Clear labels and alerts for easy decision-making.
✔ **Adaptive:** Compatible with all timeframes (M1 to Monthly).
---
### **🛠 How It Works:**
1. **Trend Confirmation:** Uses MAs to filter trades in the trend’s direction.
2. **Pattern Recognition:** Detects "Ready to Buy/Sell" and confirmed signals.
3. **Momentum Check:** Optional filter for consecutive bullish/bearish candles.
4. **Live Alerts:** Labels appear instantly in Live Trade Mode.
---
### **📊 Ideal For:**
- **Day Traders** (Scalping & Intraday)
- **Swing Traders** (Medium-term setups)
- **Technical Analysts** (Backtesting strategies)
**🔧 Designed by Sahar Chadri | Optimized for TradingView**
**🎯 Trade Smarter, Not Harder!**
Why EMA Isn't What You Think It IsMany new traders adopt the Exponential Moving Average (EMA) believing it's simply a "better Simple Moving Average (SMA)". This common misconception leads to fundamental misunderstandings about how EMA works and when to use it.
EMA and SMA differ at their core. SMA use a window of finite number of data points, giving equal weight to each data point in the calculation period. This makes SMA a Finite Impulse Response (FIR) filter in signal processing terms. Remember that FIR means that "all that we need is the 'period' number of data points" to calculate the filter value. Anything beyond the given period is not relevant to FIR filters – much like how a security camera with 14-day storage automatically overwrites older footage, making last month's activity completely invisible regardless of how important it might have been.
EMA, however, is an Infinite Impulse Response (IIR) filter. It uses ALL historical data, with each past price having a diminishing - but never zero - influence on the calculated value. This creates an EMA response that extends infinitely into the past—not just for the last N periods. IIR filters cannot be precise if we give them only a 'period' number of data to work on - they will be off-target significantly due to lack of context, like trying to understand Game of Thrones by watching only the final season and wondering why everyone's so upset about that dragon lady going full pyromaniac.
If we only consider a number of data points equal to the EMA's period, we are capturing no more than 86.5% of the total weight of the EMA calculation. Relying on he period window alone (the warm-up period) will provide only 1 - (1 / e^2) weights, which is approximately 1−0.1353 = 0.8647 = 86.5%. That's like claiming you've read a book when you've skipped the first few chapters – technically, you got most of it, but you probably miss some crucial early context.
▶️ What is period in EMA used for?
What does a period parameter really mean for EMA? When we select a 15-period EMA, we're not selecting a window of 15 data points as with an SMA. Instead, we are using that number to calculate a decay factor (α) that determines how quickly older data loses influence in EMA result. Every trader knows EMA calculation: α = 1 / (1+period) – or at least every trader claims to know this while secretly checking the formula when they need it.
Thinking in terms of "period" seriously restricts EMA. The α parameter can be - should be! - any value between 0.0 and 1.0, offering infinite tuning possibilities of the indicator. When we limit ourselves to whole-number periods that we use in FIR indicators, we can only access a small subset of possible IIR calculations – it's like having access to the entire RGB color spectrum with 16.7 million possible colors but stubbornly sticking to the 8 basic crayons in a child's first art set because the coloring book only mentioned those by name.
For example:
Period 10 → alpha = 0.1818
Period 11 → alpha = 0.1667
What about wanting an alpha of 0.17, which might yield superior returns in your strategy that uses EMA? No whole-number period can provide this! Direct α parameterization offers more precision, much like how an analog tuner lets you find the perfect radio frequency while digital presets force you to choose only from predetermined stations, potentially missing the clearest signal sitting right between channels.
Sidenote: the choice of α = 1 / (1+period) is just a convention from 1970s, probably started by J. Welles Wilder, who popularized the use of the 14-day EMA. It was designed to create an approximate equivalence between EMA and SMA over the same number of periods, even thought SMA needs a period window (as it is FIR filter) and EMA doesn't. In reality, the decay factor α in EMA should be allowed any valye between 0.0 and 1.0, not just some discrete values derived from an integer-based period! Algorithmic systems should find the best α decay for EMA directly, allowing the system to fine-tune at will and not through conversion of integer period to float α decay – though this might put a few traditionalist traders into early retirement. Well, to prevent that, most traditionalist implementations of EMA only use period and no alpha at all. Heaven forbid we disturb people who print their charts on paper, draw trendlines with rulers, and insist the market "feels different" since computers do algotrading!
▶️ Calculating EMAs Efficiently
The standard textbook formula for EMA is:
EMA = CurrentPrice × alpha + PreviousEMA × (1 - alpha)
But did you know that a more efficient version exists, once you apply a tiny bit of high school algebra:
EMA = alpha × (CurrentPrice - PreviousEMA) + PreviousEMA
The first one requires three operations: 2 multiplications + 1 addition. The second one also requires three ops: 1 multiplication + 1 addition + 1 subtraction.
That's pathetic, you say? Not worth implementing? In most computational models, multiplications cost much more than additions/subtractions – much like how ordering dessert costs more than asking for a water refill at restaurants.
Relative CPU cost of float operations :
Addition/Subtraction: ~1 cycle
Multiplication: ~5 cycles (depending on precision and architecture)
Now you see the difference? 2 * 5 + 1 = 11 against 5 + 1 + 1 = 7. That is ≈ 36.36% efficiency gain just by swapping formulas around! And making your high school math teacher proud enough to finally put your test on the refrigerator.
▶️ The Warmup Problem: how to start the EMA sequence right
How do we calculate the first EMA value when there's no previous EMA available? Let's see some possible options used throughout the history:
Start with zero : EMA(0) = 0. This creates stupidly large distortion until enough bars pass for the horrible effect to diminish – like starting a trading account with zero balance but backdating a year of missed trades, then watching your balance struggle to climb out of a phantom debt for months.
Start with first price : EMA(0) = first price. This is better than starting with zero, but still causes initial distortion that will be extra-bad if the first price is an outlier – like forming your entire opinion of a stock based solely on its IPO day price, then wondering why your model is tanking for weeks afterward.
Use SMA for warmup : This is the tradition from the pencil-and-paper era of technical analysis – when calculators were luxury items and "algorithmic trading" meant your broker had neat handwriting. We first calculate an SMA over the initial period, then kickstart the EMA with this average value. It's widely used due to tradition, not merit, creating a mathematical Frankenstein that uses an FIR filter (SMA) during the initial period before abruptly switching to an IIR filter (EMA). This methodology is so aesthetically offensive (abrupt kink on the transition from SMA to EMA) that charting platforms hide these early values entirely, pretending EMA simply doesn't exist until the warmup period passes – the technical analysis equivalent of sweeping dust under the rug.
Use WMA for warmup : This one was never popular because it is harder to calculate with a pencil - compared to using simple SMA for warmup. Weighted Moving Average provides a much better approximation of a starting value as its linear descending profile is much closer to the EMA's decay profile.
These methods all share one problem: they produce inaccurate initial values that traders often hide or discard, much like how hedge funds conveniently report awesome performance "since strategy inception" only after their disastrous first quarter has been surgically removed from the track record.
▶️ A Better Way to start EMA: Decaying compensation
Think of it this way: An ideal EMA uses an infinite history of prices, but we only have data starting from a specific point. This creates a problem - our EMA starts with an incorrect assumption that all previous prices were all zero, all close, or all average – like trying to write someone's biography but only having information about their life since last Tuesday.
But there is a better way. It requires more than high school math comprehension and is more computationally intensive, but is mathematically correct and numerically stable. This approach involves compensating calculated EMA values for the "phantom data" that would have existed before our first price point.
Here's how phantom data compensation works:
We start our normal EMA calculation:
EMA_today = EMA_yesterday + α × (Price_today - EMA_yesterday)
But we add a correction factor that adjusts for the missing history:
Correction = 1 at the start
Correction = Correction × (1-α) after each calculation
We then apply this correction:
True_EMA = Raw_EMA / (1-Correction)
This correction factor starts at 1 (full compensation effect) and gets exponentially smaller with each new price bar. After enough data points, the correction becomes so small (i.e., below 0.0000000001) that we can stop applying it as it is no longer relevant.
Let's see how this works in practice:
For the first price bar:
Raw_EMA = 0
Correction = 1
True_EMA = Price (since 0 ÷ (1-1) is undefined, we use the first price)
For the second price bar:
Raw_EMA = α × (Price_2 - 0) + 0 = α × Price_2
Correction = 1 × (1-α) = (1-α)
True_EMA = α × Price_2 ÷ (1-(1-α)) = Price_2
For the third price bar:
Raw_EMA updates using the standard formula
Correction = (1-α) × (1-α) = (1-α)²
True_EMA = Raw_EMA ÷ (1-(1-α)²)
With each new price, the correction factor shrinks exponentially. After about -log₁₀(1e-10)/log₁₀(1-α) bars, the correction becomes negligible, and our EMA calculation matches what we would get if we had infinite historical data.
This approach provides accurate EMA values from the very first calculation. There's no need to use SMA for warmup or discard early values before output converges - EMA is mathematically correct from first value, ready to party without the awkward warmup phase.
Here is Pine Script 6 implementation of EMA that can take alpha parameter directly (or period if desired), returns valid values from the start, is resilient to dirty input values, uses decaying compensator instead of SMA, and uses the least amount of computational cycles possible.
// Enhanced EMA function with proper initialization and efficient calculation
ema(series float source, simple int period=0, simple float alpha=0)=>
// Input validation - one of alpha or period must be provided
if alpha<=0 and period<=0
runtime.error("Alpha or period must be provided")
// Calculate alpha from period if alpha not directly specified
float a = alpha > 0 ? alpha : 2.0 / math.max(period, 1)
// Initialize variables for EMA calculation
var float ema = na // Stores raw EMA value
var float result = na // Stores final corrected EMA
var float e = 1.0 // Decay compensation factor
var bool warmup = true // Flag for warmup phase
if not na(source)
if na(ema)
// First value case - initialize EMA to zero
// (we'll correct this immediately with the compensation)
ema := 0
result := source
else
// Standard EMA calculation (optimized formula)
ema := a * (source - ema) + ema
if warmup
// During warmup phase, apply decay compensation
e *= (1-a) // Update decay factor
float c = 1.0 / (1.0 - e) // Calculate correction multiplier
result := c * ema // Apply correction
// Stop warmup phase when correction becomes negligible
if e <= 1e-10
warmup := false
else
// After warmup, EMA operates without correction
result := ema
result // Return the properly compensated EMA value
▶️ CONCLUSION
EMA isn't just a "better SMA"—it is a fundamentally different tool, like how a submarine differs from a sailboat – both float, but the similarities end there. EMA responds to inputs differently, weighs historical data differently, and requires different initialization techniques.
By understanding these differences, traders can make more informed decisions about when and how to use EMA in trading strategies. And as EMA is embedded in so many other complex and compound indicators and strategies, if system uses tainted and inferior EMA calculatiomn, it is doing a disservice to all derivative indicators too – like building a skyscraper on a foundation of Jell-O.
The next time you add an EMA to your chart, remember: you're not just looking at a "faster moving average." You're using an INFINITE IMPULSE RESPONSE filter that carries the echo of all previous price actions, properly weighted to help make better trading decisions.
EMA done right might significantly improve the quality of all signals, strategies, and trades that rely on EMA somewhere deep in its algorithmic bowels – proving once again that math skills are indeed useful after high school, no matter what your guidance counselor told you.
Consecutive Candles Above/Below EMADescription:
This indicator identifies and highlights periods where the price remains consistently above or below an Exponential Moving Average (EMA) for a user-defined number of consecutive candles. It visually marks these sustained trends with background colors and labels, helping traders spot strong bullish or bearish market conditions. Ideal for trend-following strategies or identifying potential trend exhaustion points, this tool provides clear visual cues for price behavior relative to the EMA.
How It Works:
EMA Calculation: The indicator calculates an EMA based on the user-specified period (default: 100). The EMA is plotted as a blue line on the chart for reference.
Consecutive Candle Tracking: It counts how many consecutive candles close above or below the EMA:
If a candle closes below the EMA, the "below" counter increments; any candle closing above resets it to zero.
If a candle closes above the EMA, the "above" counter increments; any candle closing below resets it to zero.
Highlighting Trends: When the number of consecutive candles above or below the EMA meets or exceeds the user-defined threshold (default: 200 candles):
A translucent red background highlights periods where the price has been below the EMA.
A translucent green background highlights periods where the price has been above the EMA.
Labeling: When the required number of consecutive candles is first reached:
A red downward arrow label with the text "↓ Below" appears for below-EMA streaks.
A green upward arrow label with the text "↑ Above" appears for above-EMA streaks.
Usage:
Trend Confirmation: Use the highlights and labels to confirm strong trends. For example, 200 candles above the EMA may indicate a robust uptrend.
Reversal Signals: Prolonged streaks (e.g., 200+ candles) might suggest overextension, potentially signaling reversals.
Customization: Adjust the EMA period to make it faster or slower, and modify the candle count to make the indicator more or less sensitive to trends.
Settings:
EMA Length: Set the period for the EMA calculation (default: 100).
Candles Count: Define the minimum number of consecutive candles required to trigger highlights and labels (default: 200).
Visuals:
Blue EMA line for tracking the moving average.
Red background for sustained below-EMA periods.
Green background for sustained above-EMA periods.
Labeled arrows to mark when the streak threshold is met.
This indicator is a powerful tool for traders looking to visualize and capitalize on persistent price trends relative to the EMA, with clear, customizable signals for market analysis.
Explain EMA calculation
Other trend indicators
Make description shorter
ADX EMA's DistanceIt is well known to technical analysts that the price of the most volatile and traded assets do not tend to stay in the same place for long. A notable observation is the recurring pattern of moving averages that tend to move closer together prior to a strong move in some direction to initiate the trend, it is precisely that distance that is measured by the blue ADX EMA's Distance lines on the chart, normalized and each line being the distance between 2, 3 or all 4 moving averages, with the zero line being the point where the distance between them is zero, but it is also necessary to know the direction of the movement, and that is where the modified ADX will be useful.
This is the well known Directional Movement Indicator (DMI), where the +DI and -DI lines of the ADX will serve to determine the direction of the trend.
Simple Volatility ConeThe Simple Volatility Cone indicator projects the potential future price range of a stock based on recent volatility. It calculates rolling standard deviation from log returns over a defined window, then uses a confidence interval to estimate the upper and lower bounds the price could reach over a future time horizon. These bounds are plotted directly on the chart, offset into the future, allowing traders to visualize expected price dispersion under a geometric Brownian motion assumption. This tool is useful for risk management, trade planning, and visualizing the potential impact of volatility.
Adaptive Dual MA Trend FilterAdaptive Dual MA Trend Filter is a versatile Pine Script™ indicator that delivers clear, reliable trend signals using customizable moving averages:
Dual‑Stage Filtering – Apply any traditional MA (SMA, EMA, VWMA, HMA, RMA, TEMA, DEMA, FRAMA, TRIMA) or advanced smoothing (ALMA, T3) as your “main” and “filter” MAs. The filter MA is double‑smoothed for noise suppression, then converted into a robust “double‑filtered” baseline.
Flexible Inputs – Select lengths, sources (close, high, low, hl2), offsets, sigma, and volume factors to tailor the responsiveness and smoothness to your favorite timeframe or asset class.
Intuitive Signals – The script detects confirmed bullish (green) and bearish (red) trend shifts as:
Circle marker on the MA line
Triangle arrows below/above bars
Full candles and MA line colored by current trend
Clean Overlay – Works directly on your price chart, with optional semi‑transparent fills for extra visual clarity.
Theme Support – Choose from Vibrant, Pastel, Neon, Classic, Monochrome, Solarized, or Material palettes for seamless chart styling.
Ideal for swing traders and intraday scalpers alike, Multi‑Source Double‑Filter Trend offers both “set‑and‑forget” simplicity and deep customization for power users.
Usage
Add to chart → Inputs → tweak MA types/lengths
Watch for color changes and markers
Combine with volume or momentum filters for entry confirmation
Enjoy clearer trend identification and smoother trade signals!
Disclaimer
This script is for educational and informational purposes only. Not financial advice. Use at your own risk.