Moving Averages
SMAs Ghost in the Machine v3SMAs Ghost in the Machine v3
Created by: MecarderoAurum
Overview
The "SMAs Ghost in the Machine" is a powerful multi-timeframe analysis tool designed for traders who want to align their entries and exits with the trend on several different chart periods simultaneously. At its core, the indicator plots the 9-period and 20-period Simple Moving Averages (SMAs) from up to three user-defined timeframes directly onto your active chart.
Its most powerful feature is the Combined Crossover Signal, which allows you to create highly specific, custom trading setups by defining conditions that must occur at the same time across any of the enabled timeframes. This eliminates guesswork and helps you visually confirm when your precise market conditions are met.
Important Note on Line Drawing
This indicator allows you to see trends of other timeframes. A specific design choice was made not to smooth the moving average lines. This is to ensure that the crossover signals appear on the exact candle where the cross occurs in real-time. Smoothing the lines can cause a delay and shift the signal to a later candle.
The side effect of this accuracy is that the lines will appear "stepped." As new data comes in on your current chart, you may need to refresh the chart to keep the higher timeframe lines updated. We are working on a solution to this.
Capabilities
Multi-Timeframe Analysis: Plot the 9 and 20 SMAs from three different timeframes (e.g., 1-minute, 5-minute, and 30-minute) on a single chart.
Individual Crossover Signals: Automatically plots a green triangle (▲) for a "Golden Cross" (9 SMA crosses above 20) and a red triangle (▼) for a "Death Cross" (9 SMA crosses below 20) on each individual timeframe.
Combined Crossover Engine: Define a custom bullish or bearish signal by combining multiple events. The indicator will plot a green diamond (◆) for your bullish setup and a red diamond (◆) for your bearish setup when all specified conditions are met on the same candle.
Customizable Alerts: Create alerts for both the individual 9/20 SMA crosses and your custom Combined Crossover Signal to ensure you never miss a potential setup.
How to Use the Indicator
Basic Setup
Add the "SMAs Ghost in the Machine v3" indicator to your TradingView chart.
Open the indicator settings.
Under the Timeframe Settings, enable the timeframes you want to monitor and select the desired period for each (e.g., TF1: '1', TF2: '5', TF3: '30').
Configuring the Combined Crossover Signal
This is the core feature for defining your specific trading setups.
In the settings, go to the "Combined Crossover Signal" group and check the box to "Enable Combined Signal."
Decide if you are building a bullish (long) or bearish (short) setup.
Under the "Bullish Setup" or "Bearish Setup" sections, check the boxes for every event that must happen at the same time for your signal to trigger.
Example Bullish Setup:
Let's say your strategy is to go long when:
On the 1-minute chart (TF1), the price crosses above the 9 SMA.
AND, on the 5-minute chart (TF3), the price also crosses above its 9 SMA.
To configure this, you would check the following two boxes under the "Bullish Setup":
TF1: Price crosses above 9 SMA
TF3: Price crosses above 9 SMA
Now, a green diamond (◆) will only appear on your chart when both of those conditions are true on the exact same bar, giving you a precise entry signal.
Setting Up Alerts
Go to the "Alert Settings" tab in the indicator options.
Check the boxes for the alerts you want to enable (e.g., "Alert on TF1 SMA Cross," "Alert on Combined Signal").
Close the settings. Now, right-click on the chart and choose "Add alert."
In the "Condition" dropdown, select "SMA Ghosts v3."
A second dropdown will appear. Choose the specific event you want an alert for, such as Combined Bullish Signal or TF1 Golden Cross.
Configure the alert options as desired and click "Create."
Trading Strategies
Trend Confirmation: Use the indicator on a 1-minute chart with the 5-minute 9/20 SMA lines enabled to see the 5-minute trend. Only take 1-minute trades that are in the same direction as the 5-minute SMAs.
Multi-Flow Alignment: Keep track of bigger timeframes (like the 30-min or 4-hour) to also match your entries with longer-term market flows.
Avoid Flat Markets: Avoid taking trades when the SMA lines from multiple timeframes are flat or moving sideways, as this indicates a lack of clear trend.
Stochastic Ribbon & EMAsHere's a comprehensive description for publishing your indicator:
---
# **Stochastic Ribbon & EMAs**
A clean and powerful trading indicator that combines **Stochastic Support/Resistance levels** with **Essential Moving Averages** for comprehensive market analysis.
## **📊 What It Does**
This indicator provides **7 key reference lines** on your chart:
- **3 Stochastic levels** (20%, 50%, 80%) - Dynamic support/resistance zones
- **4 Essential EMAs** (20, 50, 100, 200) - Trend direction and momentum
## **🎯 Key Features**
### **Stochastic Ribbon (3 Yellow Lines)**
- **80% Line**: Dynamic resistance level - potential selling zone
- **50% Line**: Market equilibrium - trend direction reference
- **20% Line**: Dynamic support level - potential buying zone
- **Default 50-period lookback** for stable, reliable levels
- **All lines in yellow** for clean, consistent visualization
### **Essential EMAs (4 Colored Lines)**
- **20 EMA** (Purple): Short-term trend and entry timing
- **50 EMA** (Dark Cyan): Medium-term trend direction
- **100 EMA** (Rosy Brown): Long-term trend confirmation
- **200 EMA** (Brown): Major trend and institutional levels
## **📈 How to Use**
### **For Support & Resistance:**
- **Above 80% line**: Look for selling opportunities (overbought zone)
- **Between 50-80%**: Bullish bias, pullbacks to 50% line for entries
- **Around 50% line**: Key equilibrium - watch for direction
- **Between 20-50%**: Bearish bias, bounces to 50% line for exits
- **Below 20% line**: Look for buying opportunities (oversold zone)
### **For Trend Analysis:**
- **EMA Stack Order**: Higher timeframe EMAs above lower = uptrend
- **Price above all EMAs**: Strong bullish momentum
- **Price below all EMAs**: Strong bearish momentum
- **EMA as dynamic support/resistance**: Bounces and rejections
### **For Entry Signals:**
- **Confluence zones**: Where Stochastic levels meet EMA levels
- **Breakouts**: Price breaking through multiple levels simultaneously
- **Reversals**: Price rejection at extreme Stochastic levels with EMA confirmation
## **⚙️ Settings**
### **Stochastic Ribbon**
- **Show/Hide**: Toggle the 3 Stochastic lines
- **Length**: Period for high/low calculation (default: 50)
- **Start**: Multiplier for calculation (default: 1)
### **EMAs**
- **Individual toggles**: Show/hide each EMA separately
- **Custom periods**: Adjust each EMA length (defaults: 20, 50, 100, 200)
- **Custom colors**: Personalize each EMA color
## **🚀 Why This Indicator?**
✅ **Clean & Simple**: No cluttered charts - just essential levels
✅ **Multi-Timeframe**: Works on all timeframes from 1m to 1W
✅ **Versatile**: Suitable for scalping, day trading, and swing trading
✅ **Low Lag**: Dynamic levels that adapt to current market conditions
✅ **Proven Components**: Combines two well-established technical concepts
✅ **Customizable**: Adjust all parameters to fit your trading style
## **💡 Pro Tips**
- **Use multiple timeframes**: Check higher timeframe alignment for stronger signals
- **Combine with volume**: Look for volume confirmation at key levels
- **Watch for confluences**: Best signals occur where multiple levels align
- **Respect the 50% line**: Often acts as the most important level for trend direction
## **📋 Technical Details**
- **Version**: Pine Script v5
- **Overlay**: Yes (displays on main price chart)
- **Plots**: 7 total (well within Pine Script limits)
- **Performance**: Optimized for fast loading and smooth operation
---
**Perfect for traders who want clear, actionable levels without chart clutter. Whether you're a beginner learning support/resistance or an experienced trader looking for clean reference points, this indicator delivers exactly what you need.**
SMA 9 vs SMA 20 Highlight CrossoverHighlight in green the area in between the two SMA do that when the SMA cross above the SMA 20 periods the area is colored in green and when the SMA cross below the SMA 20 periods the area is colored in red
Advanced Swing Breakout + RSI + EMA + Smart Volume SpikeThis indicator is designed to identify high-probability swing trade setups using a confluence of:
Swing High/Low Breakouts
RSI Trend Strength
EMA Directional Bias
Smart Volume Spike Confirmation
It combines key price action levels with volume and momentum filters to generate clean, actionable breakout alerts. It’s perfect for both intraday and swing traders looking to trade breakouts with confirmation from multiple technical layers.
⚙️ How It Works:
✅ Swing Detection:
Plots Swing Highs and Swing Lows based on the past N candles.
Highlights breakouts above highs or breakdowns below lows.
💪 RSI Filter:
Confirms whether the breakout is supported by RSI momentum.
Bullish breakout requires RSI > 50 and price above EMA.
Bearish breakdown requires RSI < 50 and price below EMA.
📈 EMA Trend Bias:
EMA (default 20-period) shows directional bias.
Used as a filter to confirm trade direction.
🔊 Smart Volume Spike:
Detects significant volume spikes above a moving average threshold.
Color-coded bars show whether volume is bullish, bearish, or neutral.
Ensures breakout is not on weak or average volume.
🚨 Alerts Included:
✅ Break Above Swing High: Only triggers when RSI, EMA, and Volume all confirm the move.
⚠️ Break Below Swing Low: Triggered only when bearish conditions are met.
📊 Visual Output:
Swing Highs: 🔴 Red Dots
Swing Lows: 🟢 Green Dots
EMA Line: 🟠 Orange Line
Volume Spike Bars: Appears in separate pane with dynamic color logic.
🧠 Best Use Cases:
Intraday Scalping (5m–15m timeframes)
Swing Trading (1H–4H)
Breakout Confirmation
Volume-Supported Entry Filtering
3 EMA Pullback Strategy with ATRThis script will not only plot the moving averages but also identify potential trade setups by highlighting trend conditions, marking entry points, and dynamically plotting the corresponding Stop Loss and Take Profit levels directly on your chart.
Here is the Pine Script code for your strategy.
Elliott Wave Probability System Pro v2🎯 Major Improvements Made to Elliott Wave Script
Key Changes:
1. Advanced Trend Detection (Lines 55-82)
Uses 5 different methods to determine trend over last 75 bars:
Price position in range
Linear regression slope
Moving average alignment
Higher highs/lows pattern
Up vs down bar count
Combines all methods into a trendScore for accurate direction
2. Adaptive Target Direction
New input: adaptiveTargets (line 28) - can toggle on/off
When ON: Targets follow the 75-bar trend regardless of short-term indicators
When OFF: Works like original (based on current momentum)
3. Improved Target Calculation
Bullish targets use extensions from current price to recent high
Bearish targets use retracements from current price to recent low
More realistic price levels based on actual market structure
4. Enhanced Status Display
Added "Trend (75 bars)" row showing BULLISH/BEARISH/NEUTRAL
Helps you see why targets are pointing a certain direction
5. Better Probability Calculation
Base probability adjusts with trend strength (70% if strong trend, 50% if not)
Gradual probability decay with distance
Minimum 15% probability (more realistic than 10%)
New Features:
Trend-Based Alerts
Alerts when 75-bar trend changes from bullish to bearish (or vice versa)
Trend Weight in Scoring
Added trendWeight to the total score calculation
Makes signals more aligned with larger trend
Visual Improvements
Projection lines now show at 40% probability (was 50%)
Better visibility of likely targets
How It Works Now:
If last 75 bars show a downtrend , targets will be bearish (even if RSI is oversold)
If last 75 bars show an uptrend , targets will be bullish (even if RSI is overbought)
The probability adjusts based on trend strength
This solves the issue where the script was showing bullish targets in a clear downtrend. Now it properly reflects the dominant trend direction while still considering short-term indicators for probability calculations.
filter duplicate buy sell short cover signals[VP]I was looking for an indicator that would filter signals but could only find solutions for a buy/sell system. I couldn't locate one that dealt with buy/sell AND short/cover.
The indicator expands the idea from the link:
stackoverflow.com
Intelligent Moving📘 Intelligent Moving – Adaptive Neural Trend Engine
Intelligent Moving is an invite-only, closed-source indicator that dynamically adjusts itself to evolving market conditions using a built-in neural optimizer. It combines a custom adaptive Moving Average, ATR-based deviation bands, and a fully internal virtual trade simulator to deliver smart trend signals and automatic parameter tuning — all without repainting or manual intervention.
This script is built entirely from original code and does not use any open-source components or built-in TradingView indicators.
🧠 Core Logic and Visual Structure
The indicator plots:
- A central moving average (optimized dynamically),
- Upper and lower deviation bands based on ATR × adaptive coefficients,
- Buy (aqua) and Sell (orange) arrows on reversion signals,
- Color-coded trend zones based on price vs. moving average.
All three bands change color in real time depending on the price’s position relative to the MA, clearly showing uptrends (e.g. blue) and downtrends (e.g. red).
📈 Signal Logic: Reversion from Extremes
- Buy Signal: After price closes below the lower deviation band, it then closes back above it.
- Sell Signal: After price closes above the upper deviation band, it then closes back below it.
These signals are not based on crossovers, oscillators, or lagging logic — they are pure structure-based reversion entries, designed to detect exhaustion and reversal zones.
🤖 Built-In Neural Optimizer (Perceptron Engine)
At the heart of Intelligent Moving lies a self-training engine that uses simulated (virtual) positions to test multiple configurations and pick the best one. Here’s how it works:
🔄 Virtual Trade Simulation
At regular intervals (user-defined), the script:
- Simulates virtual buy/sell positions based on its signal logic.
- Applies virtual Stop-Loss (just beyond the signal zone) and virtual Take-Profit (when price crosses back over the MA).
- Calculates simulated profit for each combination of:
- - MA periods,
- - Upper/lower ATR multipliers.
🧠 Neural Training Process
- A perceptron-like engine evaluates the simulated results.
- It selects the best-performing configuration and applies it to live plotting.
- You can choose whether optimization uses a base value or the last best result from the previous training pass.
This process runs forward-only and never overwrites history or uses future data. It's completely transparent and non-repainting.
⚙️ Customization and Parameters
Users can control:
- MA period range, step, and training type (base vs last best)
- Deviation multiplier ranges and step
- Training depth (number of bars in history)
- Training interval (how often to retrain)
- Spread simulation, alert options, and all visual settings
💡 What Makes It Unique
- ✅ Self-optimization with virtual trades and perceptron logic
- ✅ Adaptive deviation bands based on ATR (not standard deviation)
- ✅ No built-in indicators, no repaints, no curve-fitting
- ✅ Clear trend zones and reversal signals
- ✅ Optimized for live use and consistent behavior across assets
Unlike typical moving average tools, Intelligent Moving thinks, adapts, and reacts — turning a standard concept into a living, learning trend engine.
📊 Use Cases
- Trend detection with adaptive coloring
- Reversion trading from volatility extremes
- Dynamic strategy building with minimal manual input
- Alerts for automated or discretionary traders
🔒 Invite-Only Notice
This script is invite-only and closed-source.
The optimization logic, trade simulation system, and perceptron engine were developed from scratch, specifically for this indicator. No built-in functions (e.g. MA, BB, RSI) or public scripts were used or copied.
All decisions and calculations are based on current and past price only — no repainting, retrofitting, or future leakage.
⚠️ Disclaimer
This indicator is for educational and analytical use only.
It does not predict future prices or guarantee profits. Always use appropriate risk management and test thoroughly before live trading.
Rishabh Jackpot Zones + Open Line narendra📌 Narendra Jackpot Zones + Open Line — by Narendra
This custom indicator is designed to identify key Support and Resistance Zones based on pivot highs/lows, and highlight the Spot Day Open Price — offering traders clear intraday decision-making references.
🔍 Features:
🔸 Dynamic Support and Resistance Zones from pivot structures
🔸 Customizable Spot Open Line for trend bias identification
🔸 Auto-cleaning of old lines for better chart visibility
🔸 Flexible label sizing to suit your chart aesthetics
⚙️ Inputs:
Spot_Day_Open_Price: Manually input today's spot price
Pivot Lookback: Sensitivity of pivot detection
Zone Line Length: Control horizontal zone visibility
Max Lines: Limit visual clutter by setting maximum zones
Label Size: Choose between Small, Normal, Large, Huge
💼 Use Cases:
Intraday and positional traders for reversal & breakout points
Visual clarity for trend continuation vs rejection
Works across all instruments and timeframes
⚠️ Disclaimer: This is an educational tool. Use it with your trading plan and risk management. Not a buy/sell recommendation.
Dynamic Multi-Timeframe Moving Averages Matrix [CdeCripto]This indicator plots up to 10 customizable moving averages (EMA or SMA) from different timeframes on your chart, with optional colored fills and labels. Perfect for traders who want a clear, consolidated view of multiple trend signals at once.
Key Features
Up to 10 MAs: Independently toggle visibility, length, timeframe and type (EMA/SMA) for each moving average.
Multi-Timeframe Support: Fetches data via request.security, letting you overlay higher- or lower-frame MAs on any chart.
Conditional Fills: Optional translucent fills between adjacent MAs to highlight relative strength—green when the faster MA is above, red when below.
Dynamic Labels: On-chart text boxes showing MA length, period and type—fully configurable colour and size for quick reference.
Clean, Lightweight Code: Highly commented and optimized for performance; minimal risk of hitting TradingView’s line/label limits.
Inputs
MA Visibility: Show/hide each of the 10 moving averages.
Length & Type: Set period (e.g. 50, 200) and choose EMA or SMA.
Timeframe: Specify any built-in or custom timeframe (e.g. 1h, 4h, D, W, M).
Colour & Style: Pick distinct colours for each MA; adjust line width and style.
Fill Options: Toggle fills between MA1–MA2, MA2–MA3, … MA9–MA10 and set fill transparency.
Label Options: Turn labels on/off, override label colour, choose font size.
Usage
Scan multiple trend horizons at a glance—ideal for strategies that combine short, medium and long-term moving average signals.
Spot regime changes: when a shorter‐term MA crosses above/below a longer-term MA, the colored fill instantly highlights the shift.
Keep your chart tidy: show only the MAs and fills you need, hide the rest.
How to Add
Copy the Pine Script code into a new indicator in TradingView’s Pine Editor.
Click “Add to Chart.”
Open the settings panel to customize each MA, fills, and labels.
Disclaimer: For educational purposes only. Not financial advice.
Volume Surge Detector[SpeculationLab]Volume Surge Detector
This tool is especially useful for spotting early signs of breakouts, news-driven spikes, or institutional activity that are often preceded by abnormal surges in volume.
For better chart readability, the volume bar colors are based on TradingView’s original Volume indicator, while all other code is fully original by Speculation Lab.
You can customize both the SMA line and the volume bar colors to fit your style.
The logic compares the current volume against its SMA (default length: 14, fully adjustable).
The script comes with two surge levels:
Surge Level 1 (default = 5) → When volume is more than 5× the SMA, the bar turns aqua.
Surge Level 2 (default = 10) → When volume is more than 10× the SMA, the bar turns yellow.
It also includes built-in alerts, so you’ll be notified instantly whenever a surge is detected.
This makes it easier to spot potential breakout moves or large market participation in real time.
Disclaimer: This script is for educational purposes only. It does not provide financial advice.
这是一个用于探测 成交量爆发 的指标。
为了图表美观,成交量柱的颜色借鉴了 TradingView 原始 Volume 指标,其余代码均为 Speculation Lab 原创。
用户可以自由调整成交量柱和其对应的 SMA 均线的颜色。
指标通过对比成交量和其 SMA(默认长度为14,可自定义长度和颜色)的比例来检测放量。
默认设置了两个放量级别:
Surge Level 1(默认=5):当成交量超过均量的 5 倍时,量柱变为水蓝色。
Surge Level 2(默认=10):当成交量超过均量的 10 倍时,量柱变为黄色。
脚本还设置了 内置警报功能,方便交易者在出现放量时实时收到通知。
Trading Panel with EMA Crossovers## Trading Panel with EMA Crossovers - Description
**What it does:**
This indicator creates a comprehensive trading dashboard that monitors 6 key technical indicators and displays them in an easy-to-read table at the bottom right of your chart. It analyzes market conditions in real-time and provides clear buy/sell signals based on multiple confirmation factors.
**Key Features:**
1. **EMA Crossover Tracking (7/21 & 50/200)**
- Shows whether fast EMAs are above (CROSSOVER/BULL) or below (CROSSUNDER/BEAR) slow EMAs
- Helps identify trend direction and potential entry/exit points
- The 7/21 catches short-term momentum shifts
- The 50/200 confirms longer-term trend strength
2. **Momentum Indicators**
- **RSI**: Identifies overbought (>70) and oversold (<30) conditions
- **MFI**: Similar to RSI but includes volume, making it more reliable
- **MACD**: Confirms trend direction and momentum shifts
3. **Volume Analysis**
- **OBV (On Balance Volume)**: Shows whether smart money is accumulating or distributing
- Helps confirm if price moves are supported by volume
4. **Overall Signal System**
- Counts bullish vs bearish signals from all indicators
- Provides clear BUY/SELL/STRONG BUY/STRONG SELL recommendations
- When both EMAs align (both bull or both bear), it triggers the strongest signals
**Why it's helpful:**
1. **All-in-One View**: Instead of cluttering your chart with multiple indicators, everything is condensed into one clean table
2. **Multiple Confirmation**: Combines trend (EMAs), momentum (RSI/MFI/MACD), and volume (OBV) for more reliable signals
3. **Visual Clarity**: Color-coded signals (green for bullish, red for bearish) make it easy to assess market conditions at a glance
4. **Reduces False Signals**: By requiring multiple indicators to align, it filters out weak trades
5. **Time-Saving**: No need to check multiple indicators manually - the "OVERALL" row gives you an instant market assessment
**Best Use Cases:**
- Trend following: Enter when overall signal shows BUY/STRONG BUY in an uptrend
- Reversal spotting: Watch for divergences between price and indicators
- Risk management: Avoid trades when signals are mixed or neutral
- Confirmation tool: Use alongside your existing strategy for extra confidence
This indicator is particularly effective for swing traders and position traders who want a quick, comprehensive view of market conditions before making trading decisions.
Liquidity Grab Detector (Stop Hunt Sniper) v2.2📌 Purpose
This indicator detects Stop Hunts (Liquidity Grabs) — false breakouts above/below recent highs or lows — filtered by trend direction, volatility, and volume conditions.
It is designed for scalpers and intraday traders who want to identify high-probability reversal zones.
🧠 How It Works
1. Key Logic
Detects previous swing high / swing low over the Lookback Bars.
Marks a false breakout when price moves beyond the level and closes back inside.
Requires a volume spike on the breakout to confirm liquidity sweep.
2. Trend Filter (EMA 50)
Bullish signals only if price is above EMA 50.
Bearish signals only if price is below EMA 50.
This removes most counter-trend stop hunts.
3. ADX Filter
Signals appear only when ADX < Max ADX (low-trend conditions).
This avoids false signals in strong trending markets.
📈 How to Use
Green Arrows: Bullish stop hunt (potential long entry).
Red Arrows: Bearish stop hunt (potential short entry).
Works best in range conditions, liquidity zones, or near session highs/lows.
Combine with order flow, volume profile, or price action for extra confirmation.
Recommended Timeframes: 1m–15m for scalping; 30m–1h for intraday.
Markets: Crypto, Forex, Indices.
⚙️ Inputs
Lookback Bars — swing detection
Volume Spike Multiplier
EMA Length (trend filter)
Min Retrace — how much price must return inside range
Max ADX — trend filter sensitivity
⚠️ Disclaimer
This script is for educational purposes only and does not constitute financial advice.
Always test thoroughly before live trading.
Smart Price Divergence (MACD Filter) + EMA📌 Purpose
This indicator detects Price Divergences with MACD filtered by a 200 EMA trend condition.
It helps identify high-probability reversal zones aligned with market trend context.
🧠 How It Works
1. MACD Divergence Logic
Bearish Divergence:
Price makes a higher high.
MACD makes a lower high.
Price is above EMA (indicating possible exhaustion in bullish trend).
Bullish Divergence:
Price makes a lower low.
MACD makes a higher low.
Price is below EMA (indicating possible exhaustion in bearish trend).
2. EMA Trend Filter
EMA(200) is used as a directional filter:
Bearish divergences considered above EMA (extended bullish conditions).
Bullish divergences considered below EMA (extended bearish conditions).
3. Visual & Alerts
EMA(200) plotted on chart in orange.
Red triangles for Bearish Divergence.
Green triangles for Bullish Divergence.
Alerts fire for both divergence types.
📈 How to Use
Look for divergence signals as potential reversal alerts.
Combine with support/resistance or price action for confirmation.
EMA ensures signals occur in extended zones, increasing reliability.
Recommended Timeframes: 1h, 4h, D.
Markets: Forex, Crypto, Stocks.
⚙️ Inputs
MACD Fast / Slow / Signal Length
EMA Length (default 200)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
Smart Deviation Trend Bands PRO + MTF Filter📌 Purpose
This indicator combines multi-level Deviation Bands (±1, ±2, ±3 standard deviations from SMA) with a Higher Timeframe (HTF) Trend Filter.
It helps traders identify potential bounce and breakout setups aligned with the dominant market trend.
🧠 How It Works
1. Deviation Bands
SMA(Length) is calculated as the centerline.
Standard deviations (±1, ±2, ±3) define multiple dynamic support and resistance zones.
Outer bands (±3) often mark overextended zones; inner bands (±1, ±2) show active trading areas.
2. HTF Trend Filter
A higher timeframe SMA (HTF SMA) acts as a trend confirmation tool.
Default filter timeframe: 1 Day.
Trend Up: Price > HTF SMA
Trend Down: Price < HTF SMA
3. Entry Signals
Long Signal: Price crosses above lower deviation band (+1) when HTF trend is UP.
Short Signal: Price crosses below upper deviation band (−1) when HTF trend is DOWN.
4. Visuals & Alerts
Bands plotted in red (upper) and green (lower).
Centerline = SMA in blue.
HTF SMA in orange.
Circles on chart mark entry points; alerts trigger automatically.
📈 How to Use
In trending markets: Trade with the HTF direction, using band touches for entries.
In mean-reversion setups: Outer bands can be used to spot potential overbought/oversold zones.
Combine with volume or price action for confirmation.
Recommended Timeframes: 1h, 4h, D.
Markets: Forex, Crypto, Stocks.
⚙️ Inputs
SMA Length
StdDev Multiplier 1 / 2 / 3
HTF Timeframe (default: D1)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
DK-360dThis script print the 10-20 and 50dma band. I would enhance it further with the urgency area. So publishing the first version with minimal needs of mine.
PrismNorm (Rolling)# PrismNorm (Rolling)
Overview
PrismNorm (Rolling) frames four series — VWMA, TWMA, TrueWMA, and a half-price line — over a fixed lookback window, with all series scaled by a chosen volatility measure. Each bar shows how far price has strayed from its rolling anchor, expressed in StdDev, MAD, ATR-scaled, or fixed-percent units.
How It Works
• Compute rolling Weighted Moving Averages over the last lookback bars:
— VWMA: volume-weighted HLC3
— TWMA: simple average of OHLC midpoint
— TrueWMA: TrueRange-weighted TrueMid average
• Anchor each series to its value lookback bars ago (first bar in window). The half-price series uses either close or an SMA lagged by half the window.
• Calculate a volatility measure over volWindowLen = lookback × normMult bars:
— Std Dev of close
— MAD of close
— ATR averaged and scaled to approximate σ
— A fixed percent of the window’s anchor value
• Band width = volatility (or percent of anchor). Normalized output = (net move) ÷ (band width)
Inputs
Settings / Description
• Lookback Period (bars) / Bars used for rolling WMAs and as the anchor lookback
• Deviation Measure / Volatility method: Std Dev, MAD, ATR (scaled), or Percent
• Normalization Span (×Lookback) / Multiplier (1–10) to expand lookback into volatility window
• Percent Deviation (%) / When Percent mode is on, band width = this % of the anchor WMA (or price)
• Scale MAD to σ / Scale Mad by √(π/2) so it aligns with σ under Normal distribution
• Use MA Anchor for Price (½×) / Off: anchor = close ; On: anchor = SMA(close, lookback) shifted by half the lookback
Display
• Show Normalized VWMA
• Show Normalized TWMA
• Show Normalized TrueWMA
• Show Normalized Price (½×)
Tips & Use Cases
• Percent mode yields fixed-width bands, handy for identifying structural shifts without volatility scaling.
• Toggling the MA anchor smooths the reference point, reducing noise in price normalization.
References:
1. TrueWMA Description
## 1. TrueWMA: Volatility-Weighted Price Averaging
What Is TrueWMA?
TrueWMA weights each bar’s TrueMid (TrueRange midpoint) by its TrueRange, so high-volatility bars carry more influence. It blends price level and volatility into one moving average.
In short, it’s a *TrueRange-weighted TrueMid average*.
Pseudocode
// TWMA Example for Comparison
window_size = 50
OHLC = (Open + High + Low + Close) / 4
TWMA = MA(OHLC, window_size)
// VWMA Example for Comparison
window_size = 50
HLC3 = (High + Low + Close) / 3
VWMA = Sum(HLC3 * Volume, window_size) / Sum(Volume, window_size)
// TrueWMA (Rolling)
window_size = 50
max_val = Maximum(Close , High) // TrueRange High
min_val = Minimum(Close , Low) // TrueRange Low
true_mid = (max_val + min_val) / 2 // TrueMid
TrueWMA = Sum(true_mid * TrueRange, window_size) / Sum(TrueRange, window_size)
Interpretation
For each bar, Rolling TrueWMA:
• Computes a TrueMid (“contextual midpoint”) from the prior close and the current bar’s high/low.
• Weights each TrueMid by that bar’s TrueRange.
• Divides the sum of those weighted midpoints by the total TrueRange over the lookback window.
The result is a single series that dynamically blends price levels with recent volatility.
PrismNorm (Anchored)# PrismNorm (Anchored)
Overview
PrismNorm plots anchored, span-normalized price averages (VWAP, TWAP, TrueWAP) alongside a half-price line, with all series scaled by a blended volatility measure. This frames price swings across anchor periods of varying lengths in units of recent volatility.
How It Works
On each new anchor span (session, week, month, etc.), the script:
• Resets an anchor line to the first bar’s open.
• Computes raw VWAP, TWAP, TrueWAP and a half-price delta (close–anchor)/2 cumulatively over the span.
• Calculates a deviation metric (Std Dev, MAD, ATR-scaled, or Percent of anchor price) for the current span.
• Blends the current span’s deviation with up to N prior spans (for non-Percent modes).
• Divides each net price series by the blended deviation to yield normalized outputs.
Inputs
Settings / Description
• Anchor Period / Span for resetting the anchor line (Week, Month, etc.)
• Deviation Measure / Volatility method for normalization: Std Dev, MAD, ATR (scaled), or Percent
• Normalization Interval / Number of past spans (current+1 … current+10) to include in blended deviation
• Percent Deviation (%) / Band width % when Percent mode is selected (applied to anchor price)
• Scale MAD to σ / Scale MAD by √(π/2) so it aligns with σ under Normal distribution
Display
• Show Normalized VWAP
• Show Normalized TWAP
• Show Normalized TrueWAP
• Show Normalized Price (½×)
Tips & Use Cases
• Use shorter anchor spans (Session, Week) for intraday normalization.
• Use longer spans (Quarter, Year) to compare price action across macro periods.
References:
1. TrueWAP Description
2. SD, MAD, ATR (scaled) Deviation Measure Methodology
## 1. TrueWAP: Volatility-Weighted Price Averaging
What Is TrueWAP?
TrueWAP plugs actual price fluctuations into your average. Instead of only tracking time (TWAP) or volume (VWAP), it weights each bar’s TrueMid (TrueRange midpoint) by its TrueRange—so when the market moves more, that bar counts more.
In short, it’s a *TrueRange-weighted TrueMid average* anchored at your start date.
TrueWAP (Anchored) Overview
• On the first bar, it uses the simple high-low midpoint for price and the bar’s high-low range for weighting.
• From the next bar onward, it computes TrueMid (TrueRange midpoint).
• Each TrueMid is weighted by its TrueRange and cumulatively summed from the anchor point.
Pseudocode
// TWAP Example for Comparison
current_days = BarsSince("start_of_period")
OHLC = (Open + High + Low + Close) / 4
TWAP = MA(OHLC, current_days)
// VWAP Example for Comparison
current_days = BarsSince("start_of_period")
HLC3 = (High + Low + Close) / 3
VWAP = Sum(HLC3 * Volume, current_days) / Sum(Volume, current_days)
// TrueWAP (Anchored)
current_days = BarsSince("start_of_period") // Count of bars since the period began
first_bar = (current_days == 0) // Boolean flag if current bar is 1st of period
hilo_mid = (High + Low) / 2
max_val = max(Close , High)
min_val = min(Close , Low)
true_mid = (max_val + min_val) / 2
// Use hilo_mid and (High - Low) for the first bar; otherwise, use true_mid and True Range
mid_val = IF(first_bar, hilo_mid, true_mid)
range_val = IF(first_bar, (High - Low), TrueRange)
TrueWAP = Sum(mid_val * range_val, current_days) / Sum(range_val, current_days)
Recap: Interpretation
• The first bar uses the simple high-low midpoint and range.
• Subsequent bars use TrueMid and TrueRange based on prior close.
• This ensures the average reflects only the observed volatility and price since the anchor.
A Note on True Range
TrueRange captures the full extent of bar-to-bar volatility as the maximum of:
• High – Low
• |High – Previous Close|
• |Low – Previous Close|
## 2. SD, MAD, ATR (scaled) Deviation Measure Methodology: Segmented Weighted-Average Volatility
### Introduction
Conventional standard deviation calculations aggregate data over an expanding window and rely on a single mean, producing one summary statistic. This can obscure segmented, sequential datasets—such as MTD, QTD, and YTD—where additional granularity and time-sensitive insights matter.
This methodology isolates standard deviation within defined time frames and then proportionally allocates them based on custom lookback criteria. The result is a dynamic, multi-period normalization benchmark that captures both emerging volatility and historical stability.
Note: While this example uses SD, the same fixed-point approach applies to MAD and ATR (scaled).
### 2.1 Standard Deviation (Rolling Window)
pseudocode
// -- STANDARD DEVIATION (ROLLING) Calculation --
window_size = 20
rolling_SD = STDDEV(Close, window_size)
• Ideal for immediate trading insights.
• Reflects pure, short-term price dynamics.
• Captures volatility using the most recent 20 bars.
### 2.2 Blended SD: Current + 3 Past Periods
This method fuses current month data with the last three complete months.
pseudocode
// -- MULTI-PERIOD STANDARD DEVIATION (PROXY) with Three Past Periods --
current_days = BarsSince("start_of_month")
current_SD = STDDEV(Close, current_days)
prev1_days = TradingDaysLastMonth
prev1_SD = STDDEV_LastMonth(Close)
prev2_days = TradingDaysTwoMonthsAgo
prev2_SD = STDDEV_TwoMonthsAgo(Close)
prev3_days = TradingDaysThreeMonthsAgo
prev3_SD = STDDEV_ThreeMonthsAgo(Close)
// Blending with Proportional Weights
Weighted_SD = (current_SD * current_days +
prev1_SD * prev1_days +
prev2_SD * prev2_days +
prev3_SD * prev3_days) /
(current_days + prev1_days + prev2_days + prev3_days)
• Merges evolving volatility with the stability of three prior months.
• Weights each period by its trading days.
• Yields a robust normalization benchmark.
### 2.3 Blended SD: Current + 1 Past Period
This variant tempers emerging volatility by blending the current month with last month only.
pseudocode
// -- MULTI-PERIOD STANDARD DEVIATION (PROXY) with One Past Period --
current_days = BarsSince("start_of_month")
current_SD = STDDEV(Close, current_days)
prev1_days = TradingDaysLastMonth
prev1_SD = STDDEV_LastMonth(Close)
// Proportional Blend
Weighted_SD = (current_SD * current_days +
prev1_SD * prev1_days) /
(current_days + prev1_days)
• Anchors current volatility to last month’s baseline.
• Softens spikes by blending with historical data.
Conclusion
Segmented weighted-average volatility transforms global benchmarking by integrating immediate market dynamics with historical context. This fixed-point approach—applicable to SD, MAD, and ATR (scaled)—delivers time-sensitive analysis.
MBDOM EMACROSS 5_13 with BB_EMA & Multi-Timeframe"MBDOM EMACROSS 5_13 with BB_EMA & Multi-Timeframe"
This Pine Script indicator is designed for multi-timeframe trend analysis using EMA crossovers (5 & 13) along with Bollinger Bands (BB) for additional confirmation.
Key Features:
Multi-Timeframe EMA Analysis
Tracks EMA 5 & 13 crossovers across higher (D, W, M) and lower (60min) timeframes.
Displays a summary table showing bullish (✓) or bearish (✓) signals for each timeframe.
EMA Crossovers (Current Chart)
Plots EMA 5, 9, 13, 21, 50, and 200 for trend identification.
Fills between EMA 5 & 13 (green if bullish, red if bearish).
Generates BUY/SELL signals when EMA 5 crosses above/below EMA 13.
Bollinger Bands (BB)
Plots BB (20-period, 2x multiplier) with upper/lower bands and a moving average basis.
Alerts & Visual Enhancements
Triggers alerts for EMA 5/13 crossovers.
Uses background color changes to highlight bullish/bearish conditions.
Use Case:
Helps traders confirm trends across multiple timeframes.
Provides entry/exit signals based on EMA crossovers.
Combines trend-following (EMA) and volatility (BB) indicators.
This script is useful for swing traders and trend followers who rely on multi-timeframe confluence for decision-making.
EMA Grid + Martingale Indicator (Long-Only)Title:
EMA Grid + Martingale Indicator (Long-Only)
Short Summary:
A 4-EMA trend filter combined with a grid-based entry system and optional martingale sizing to visualize staged long entries and exits in bullish markets.
Full Description:
This indicator combines a 4-EMA trend filter with a grid-based entry system and optional martingale-style position sizing to help traders visualize staged long entries and exits in trending markets.
How It Works
1. Trend Detection: Uses two sets of EMAs (fast/slow pairs) to confirm bullish momentum. A long signal is generated when both EMA groups align in an uptrend.
2. Grid Entries: After the initial long entry, additional grid levels are triggered every time price drops by the specified grid step (in pips).
3. Martingale Sizing (Optional): Each subsequent entry can increase in size based on the defined martingale factor.
4. Weighted-Average Exit: Calculates the weighted average of all grid entries and signals an exit when the price reaches or surpasses this level plus an optional buffer.
Key Features
• 4 EMA Trend Filter with fully customizable lengths.
• Dynamic grid entries with visual labels (L1, L2, etc.).
• Optional martingale position sizing.
• Weighted-average exit with adjustable buffer.
• Customizable parameters for EMAs, grid steps, max entries, and buffer pips.
• Clear chart visualization of EMAs and entry/exit levels.
Use Cases
• For traders using cost-averaging or grid strategies in bullish markets.
• Visualizes multiple entry levels and profit targets.
• Useful for backtesting and strategy planning.
Note: This indicator is for visualization and planning purposes only. It does not execute trades automatically. It does not guarantee profits and is not financial advice.
(MACD) 25 0122 미팅 MACD 볼린저Here is the English translation:
---
"I am currently testing the upload.
The content of the test script involves utilizing Bollinger Bands by linking the Bollinger Band basis line with the MACD's '0' baseline, allowing the MACD to be visualized on the chart."