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.
Moving Averages
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."
OB/OS adaptative v1.1# OB/OS Adaptative v1.1 - Multi-Timeframe Adaptive Overbought/Oversold Indicator
## Overview
The `tradingview_indicator_emas.pine` script is a sophisticated multi-timeframe indicator designed to identify dynamic overbought and oversold levels in financial markets. It combines EMA (Exponential Moving Average) crossovers and Bollinger Bands across monthly, weekly, and daily timeframes to create adaptive support and resistance levels that adjust to changing market conditions.
## Core Functionality
### Multi-Timeframe Analysis
The indicator analyzes three timeframes simultaneously:
- **Monthly (M)**: Long-term trend identification
- **Weekly (W)**: Intermediate-term trend identification
- **Daily (D)**: Short-term volatility measurement
### Technical Indicators Used
- **EMA 9 and EMA 20**: For trend identification and momentum assessment
- **Bollinger Bands (20-period)**: For volatility measurement and extreme level identification
- **Price action**: For confirmation of level validity and signal generation
## Key Features
### Adaptive Level Calculation
The indicator dynamically determines overbought and oversold levels based on market structure and trend bias:
#### Monthly Level Logic
- **Bullish Bias** (when monthly open > EMA20):
- Oversold = lower of EMA9 or EMA20
- Overbought = upper of EMA9 or Bollinger Upper Band
- **Bearish/Neutral Bias** (when monthly open ≤ EMA20):
- Oversold = Bollinger Lower Band
- Overbought = upper of EMA20 or EMA9
#### Weekly Level Logic
- **Bullish Bias** (when weekly open > EMA20):
- Oversold = lower of EMA9 or EMA20
- Overbought = Bollinger Upper Band
- **Bearish/Neutral Bias** (when weekly open ≤ EMA20):
- Oversold = Bollinger Lower Band
- Overbought = upper of EMA20 or EMA9
#### Daily Level Logic
- Simple Bollinger Bands:
- Oversold = Bollinger Lower Band
- Overbought = Bollinger Upper Band
### Final Level Determination
The indicator combines all three timeframes through a weighted averaging process:
1. Calculates initial values as the average of monthly, weekly, and daily levels
2. Ensures mathematical consistency by enforcing overbought_final ≥ oversold_final using min/max functions
3. Calculates a midpoint average level as the center of the range
### Visual Elements
- **Dynamic Lines**: Draws horizontal lines for current and previous period overbought, oversold, and average levels
- **Labels**: Places clear textual labels at the start of each period
- **Color Coding**:
- Red for overbought levels (resistance)
- Green for oversold levels (support)
- Blue for average levels (pivot point)
- **Transparency**: Previous period lines use semi-transparent colors to distinguish between current and historical levels
### Update Mechanism
- **Calculation Day**: User-defined day of the week (default: Monday)
- On the specified calculation day, the indicator:
- Updates all levels based on previous bar's data
- Draws new lines extending forward for a user-defined number of days
- Maintains previous period lines for comparison and trend analysis
- Automatically deletes and recreates lines to ensure clean visualization
### Proximity Detection
- Alerts when price approaches overbought/oversold levels (configurable distance in percentage)
- Helps identify potential reversal zones before actual crossovers occur
- Distance thresholds are user-configurable for both overbought and oversold conditions
### Alert Conditions
The indicator provides four distinct alert types:
1. **Cross below oversold**: Triggered when price crosses below the oversold level
2. **Cross above overbought**: Triggered when price crosses above the overbought level
3. **Near oversold**: Triggered when price approaches the oversold level within the configured distance
4. **Near overbought**: Triggered when price approaches the overbought level within the configured distance
### Debug Mode
When enabled, displays comprehensive debug information including:
- Current values for all levels (oversold, overbought, average)
- Timeframe-specific calculations and raw data points
- System status information (current day, calculation day, etc.)
- Lines existence and timing information
- Organized in multiple labels at different price levels to avoid overlap
## Configuration Parameters
| Parameter | Default Value | Description |
|---------|---------------|-------------|
| Short EMA (9) | 9 | Length for short-term EMA calculation |
| Long EMA (20) | 20 | Length for long-term EMA calculation |
| BB Length | 20 | Period for Bollinger Bands calculation |
| Std Dev | 2.0 | Standard deviation multiplier for Bollinger Bands |
| Distance to overbought (%) | 0.5 | Percentage threshold for "near overbought" alerts |
| Distance to oversold (%) | 0.5 | Percentage threshold for "near oversold" alerts |
| Calculation day | Monday | Day of week when levels are recalculated |
| Lookback days | 7 | Number of days to extend previous period lines backward |
| Forward days | 7 | Number of days to extend current period lines forward |
| Show Debug Labels | false | Toggle for comprehensive debug information display |
## Trading Applications
### Primary Use Cases
1. **Reversal Trading**: Identify potential reversal zones when price approaches overbought/oversold levels
2. **Trend Confirmation**: Use the adaptive nature of levels to confirm trend strength and direction
3. **Position Sizing**: Adjust position size based on distance from key levels
4. **Stop Placement**: Use opposite levels as dynamic stop-loss references
### Strategic Advantages
- **Adaptive Nature**: Levels adjust to changing market volatility and trend structure
- **Multi-Timeframe Confirmation**: Signals are validated across multiple timeframes
- **Visual Clarity**: Clear color-coded lines and labels enhance decision-making
- **Proactive Alerts**: "Near" conditions provide early warnings before crossovers
## Implementation Details
### Data Security
Uses `request.security()` function to fetch data from higher timeframes (monthly, weekly) while maintaining proper bar indexing with ` ` offset for open prices.
### Performance Optimization
- Uses `var` keyword to declare persistent variables that maintain state across bars
- Efficient line and label management with proper deletion before recreation
- Conditional execution of debug code to minimize performance impact
### Error Handling
- Comprehensive NA (not available) checks throughout the code
- Graceful degradation when data is unavailable for higher timeframes
- Mathematical safeguards to prevent invalid level calculations
## Conclusion
The OB/OS Adaptative v1.1 indicator represents a sophisticated approach to identifying market extremes by combining multiple technical analysis concepts. Its adaptive nature makes it particularly useful in trending markets where static levels may be less effective. The multi-timeframe approach provides a comprehensive view of market structure, while the visual elements and alert system enhance its practical utility for active traders.
EMA-VWAP Super Reversal (Final Advanced Version)EMA-VWAP Super Reversal – User Guide
This indicator is designed for high-probability reversal trading setups on futures such as NQ1! and ES1!, following strict confluence conditions.
✅ Signal Types
🟢 / 🔴 Mean Reversion Dots
Appear when all 4 stochastics (15m, 5m, 1m) are extreme (>80 or <20)
AND price is far (>0.05% by default, adjustable) from EMA21 on the 15m.
Indicates potential snapback to EMAs.
🔺 Green / Orange EMA Reversal Triangles
Appear when stochastics are extreme
AND price pulls back into EMAs while the EMAs are correctly postured (bullish or bearish).
Indicates a high-probability reversal.
💎 Purple Diamond Super Reversal
Appears when EMA reversal conditions are met
AND there is divergence on the fast stochastic (Stoch1).
Strongest reversal signal.
✅ Confluence Checks Built In
✔ Multi-timeframe stochastic alignment (15m, 5m, 1m)
✔ EMA posture (bullish or bearish stack)
✔ EMA pullback logic or EMA distance check
✔ VWAP reversion point consideration
✔ Divergence detection for strongest signals
✅ How to Use
Use on a 15-minute chart (optimal).
Look for Super Reversal diamonds first (highest conviction).
Confirm with price action and key levels before entry.
Combine with order flow, liquidity sweeps, or market structure for best results.
⚙ Settings
EMA Distance Threshold (%) → Default 0.05 (for Mean Reversion Dots).
Increase for fewer, stronger signals.
Decrease for more sensitivity.
📌 Best Practices
Focus on reversals during London & NY sessions.
Avoid trading against strong higher timeframe trends without extra confirmation.
Use tight stops and let winners run when the setup is strong.
💡 This tool is built to highlight only the cleanest reversal setups with layered confluence. Use it to filter noise and stay disciplined with your entries.
Multi EMA SMA ramlakshman_BandThis advanced technical indicator overlays 20 customizable moving averages of two types (EMA & SMA) along with Bollinger Bands on your chart, enabling layered trend visualization and precise momentum tracking.
🔍 Features:
EMA Group: Select from 9 MA types (ema, sma, wma, vwma, hma, swma, alma, rma, linreg) and plot 20 different EMAs with fully adjustable lengths.
SMA Group: Same flexibility as EMAs, for 20 SMA lines, each with individual length input.
Bollinger Bands: Classic 20-period bands (configurable length and stddev), shaded for clear volatility recognition.
Toggle visibility for EMAs, SMAs, and BBs independently.
Color-coded lines for immediate visual grouping and clarity.
🎯 Use Case:
Designed for systematic traders, scalpers, trend followers, and algorithmic strategists who rely on MA crossovers, ribbon convergence/divergence, and volatility envelopes to generate signals or validate entries/exits.
🧠 Bonus:
Built on Pine Script v6 for max performance.
Optimized ma() function for dynamic multi-type averaging.
Custom hma() logic included for accurate Hull MA support.
Weekly 8 EMA Horizontal Linethis will automatically track the WEEKLY 8EMA on your chart so you can know where the Weekly 8EMA is on lower timeframes
Dily-weekly CPR @RamlakshmanDaily & Weekly CPR Levels with Multi-MA & Camarilla Bands by @Bull_Bear_Beast
This powerful script is a comprehensive support-resistance and trend structure tool, combining:
🔹 Daily & Weekly CPR Levels
Central Pivot Range (CPR) including TC (Top Central), P (Pivot), BC (Bottom Central).
Classic Pivots: R1 / S1.
Previous Day’s High-Low and Previous Week’s High-Low lines for accurate market context.
🔸 Camarilla Bands (H5–H3, L3–L5)
Powerful reversal & breakout zones:
H3 / L3: Reversal Levels.
H4 / L4: SL Zones.
H5 / L5: Extreme Rejection / Trend Continuation Zones.
Visual zone fill between levels for clarity and confluence.
📈 Multi-Moving Averages (MA Cluster)
Up to 3 customizable EMAs and 1 SMA.
Choose from different types: EMA, SMA, WMA, VWMA, ALMA, HMA, RMA, Linear Regression.
Display Bollinger Bands using SMA with custom deviation.
🔍 Highlights:
✅ Timeframe-Aware: Daily pivots shown on intraday charts, Weekly pivots on higher timeframes.
✅ Stylish Visuals: Colored zone fills between key levels (H5–H3, L3–L5), CPR ranges, and BB bands.
✅ Modular Display Options: Toggle visibility of EMAs, SMAs, BBs, and labels.
✅ Smart Plotting: Avoids clutter by showing pivots only when relevant.
🛠️ Best Used For:
Intraday scalping with CPR + Camarilla reversals.
Swing setups using weekly levels for confluence.
Spotting trend vs. consolidation zones via BBs and MAs.
Identifying fake breakouts around L3/H3 and CPR traps.
⚙️ User Tips:
Use on 5m to 1H charts for day trading.
Combine with price action, volume profile, or RSI divergence.
Watch for confluence between CPR, Camarilla, and previous highs/lows.
✨ Inspired By:
Floor Pivots, Camarilla Math, Smart Money Concepts, and popular institutional tools — wrapped into one flexible layout for the modern trader.
🧠 Created by: @Bull_Bear_Beast
If you like it, consider following or sharing feedback for improvements!
Custom EMA/SMA Dashboard📊 Custom EMA/SMA Dashboard
This indicator provides a customizable dashboard to display multiple moving averages (MAs) on your chart. You can switch between EMA (Exponential Moving Average) and SMA (Simple Moving Average) with a single input, and independently enable, color, and style each line.
✨ Features:
✅ Choose between EMA and SMA for all MAs
✅ Enable or disable each MA individually
🎨 Custom color and line width for:
10-period MA
20-period MA
50-period MA
200-period MA
Moving Average Exponential (Daily Frozen EMA)This script plots an Exponential Moving Average (EMA) based on the daily timeframe, but with a unique twist:
✅ The EMA value is frozen for the entire current daily session, only updating when a new daily candle begins.
🔍 How it works:
The EMA is calculated using the 1-day timeframe, regardless of the chart's current timeframe.
This EMA value remains fixed throughout the day — it doesn't fluctuate intrabar.
It updates only once the daily candle has closed, providing a stable and reliable reference point during the trading day.
The default is the 5 day EMA but can be changed to any EMA timeframe you desire such as 9, 21, 50, 100. 200, etc.
✨ Additional Features:
✅ Optional smoothing with various moving average types (SMA, EMA, WMA, SMMA, VWMA).
✅ Optional Bollinger Bands on top of the smoothed EMA.
✅ Adjustable settings for EMA length, smoothing type, Bollinger Band deviation, and display options.
🛠️ Use Cases:
Ideal for traders who want a non-reactive EMA during intraday trading.
Helps reduce signal noise by anchoring EMA to higher timeframe structure.
Useful for strategy development where EMA should represent confirmed daily bias only.
Hope this helps, happy trading!
Dr. Keith Wade Momentum SignalsThis is a heikin Ashli strategy combined with an 18 moving average crossover. Entry at cross of 18 EMA and exit at change of heikin Ashi
Dubic Dual EMA IndicatorThe Dual EMA Indicator combines two exponential moving averages (EMAs) to identify trend-based buy and sell signals. A buy signal is generated when the price closes above both EMAs suggesting strong bullish momentum. A sell signal appears when the price closes below both EMAs indicating bearish pressure.
PrismWMA (Rolling)# PrismWMA (Rolling)
Overview
PrismWMA computes rolling VWMA, TWMA and TrueWMA over a fixed lookback window, then plots dynamic volatility bands around each. It’s the rolling-window counterpart to PrismWAP’s anchored spans, giving you per-bar, up-to-date average levels and band excursions.
How It Works
Every bar, PrismWMA:
• Calculates VWMA, TWMA and TrueWMA over the last wmaWindowLen bars.
• Computes your chosen volatility measure (Std Dev, MAD, ATR-scaled) or Percent of WMA over volWindowLen bars.
• Draws upper/lower bands as ±mult × volatility (or ±mult % of the WMA in Percent mode).
Inputs
Settings/Default/Description
WMA Lookback (bars)/50/Number of bars for rolling WMA
Volatility Measure/Std Dev/Band width method: Std Dev, MAD, ATR (scaled), or Percent of WMA
Volatility Lookback (bars)/50/Number of bars used to compute rolling volatility
Band Multiplier (or %)/3.0/Multiplier for band width (or percent of WMA in Percent mode)
Scale MAD to σ/true/When MAD is selected, scale by √(π/2) so it aligns with σ
Display
• Show VWMA true
• Show TWMA true
• Show TrueWMA true
• Show VBands false
• Show TBands false
• Show TrueBands true
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
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)
min_val = Minimum(Close , Low)
true_mid = (max_val + min_val) / 2
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.
5min Table: Dark Up/Down - Supertrend, EMA50, VWAP5Min Table showing EMA 50, Supertrend(10,3) VWAP for Indices and Stocks.
PrismWAP (Anchored)# PrismWAP (Anchored)
Overview
PrismWAP plots three anchored weighted-average prices (VWAP, TWAP, TrueWAP) with dynamic volatility bands and a resettable anchor line. It helps you see key value levels since your chosen anchor period and gauge price excursions relative to volatility.
How It Works
On each new span (session, week, month, quarter, etc.), the indicator resets a base price from the first bar’s open. It computes anchored VWAP, TWAP, and TrueWAP cumulatively over the span. Volatility bands are drawn as ±multiplier × a span-length-weighted average of your chosen volatility measure (Std Dev, MAD, ATR-scaled, or Percent of WAP).
Inputs
Settings/Default/Description
Anchor Period/Quarter/Span for resetting WAP and anchor line (Week, Month, etc.)
Volatility Measure/Std Dev/Method for band width: SD, MAD, ATR (scaled), Percent of WAP
Volatility Spans/current+2/Number of spans (current + previous spans) used in volatility
Band Multiplier(or %)/3.0/Multiplier for band width (or Percent of WAP in Percent mode)
Scale MAD to σ/true/When MAD selected, scale by √(π/2) so it aligns with σ
Display
• Show Anchor Line true
• Show VWAP true
• Show TWAP true
• Show TrueWAP true
• Show VWAP Bands false
• Show TWAP Bands false
• Show TrueWAP Bands true
Tips & Use Cases
• Use shorter spans (Session, Week) for sub-daily bar intervals.
• Use longer spans (Quarter, Year) for daily bar intervals.
References:
1. TrueWAP Description
2. SD, MAD, ATR (scaled) weighted average volatility
## 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 TrueRange midpoint by its TrueRange—so when the market moves more, that bar counts more.
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 by averaging the TrueRange high (higher of prior close or current high) with the TrueRange low (lower of prior close or current low).
• 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 that is true if current bar is the first of period
hilo_mid = (High + Low) / 2 // For the first bar, use its simple high/low avg
max_val = max(Close , High) // For subsequent bars, TrueRange high
min_val = min(Close , Low) // For subsequent bars, TrueRange low
true_mid = (max_val + min_val) / 2 // True Range midpoint for subsequent bars
// 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. Segmented Weighted-Average Volatility: A Fixed-Point Multi-Period Approach
### 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 trading days.
### 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 enduring historical context. This fixed-point approach—applicable to SD, MAD (scaled), and ATR (scaled)—delivers time-sensitive analysis.
MAD indicator buy and sellThe MAD (Moving Average Divergence) indicator is used in trading to identify potential buy and sell signals based on the divergence between moving averages.
**Buy Signal:**
- A buy signal is generated when the shorter-term moving average crosses above the longer-term moving average. This often indicates a potential upward momentum in the stock price.
**Sell Signal:**
- A sell signal occurs when the shorter-term moving average crosses below the longer-term moving average. This suggests that the stock may be losing momentum and could be headed for a decline.
Traders typically look for confirmation through additional signals or analysis to increase the reliability of these buy and sell points. Always remember to manage risk properly when making trading decisions!
TrendPilot AI v2 — Smart ATR Indicator with ZonesTrendPilot AI v2 is a smart price-action and ATR-based trading system designed for swing and position traders. It combines trend-following logic with adaptive price zones to help users identify high-probability Buy and Sell opportunities — along with intelligent re-entry points, weak signal detection, and visual structure zones.
🔧 Core Features:
✅ ATR-based Buy/Sell signals with confirmation logic
✅ Dynamic 99 EMA Channel for trend context
✅ Re-entry triangles for stacking or retracing setups
✅ 150 EMA Weak Signal Detection for early trend warnings
✅ 🧭 Price Action Zones (Premium, Equilibrium, Discount)
✅ Visual alerts via triangles, labels, and color-coded logic
✅ Designed for 15m, 1H, and 4H charts — also useful on Daily
🧠 How It Works (Logic Breakdown)
1️⃣ Trend Direction — EMA Channel Logic
A 99 EMA Channel determines the dominant market bias.
If price is above the channel → trend is Bullish → Buy signals are valid
If price is below the channel → trend is Bearish → Sell signals are valid
2️⃣ Buy/Sell Signals — ATR Trailing Logic
The system uses custom ATR trailing logic to detect when price momentum shifts.
When a breakout aligns with trend direction, a Buy or Sell label appears.
These are designed to capture the main trend leg or reversal zone.
3️⃣ Re-Entry Signals — Triangle Visual Cues
During a confirmed trend, if price retraces to the EMA channel, a small triangle is shown:
🔼 Green triangle: Buy re-entry during bullish trend
🔽 Red triangle: Sell re-entry during bearish trend
These are not new signals but continuation cues for advanced traders.
4️⃣ Weak Signal Detection — 150 EMA Logic
A secondary 150 EMA helps detect possible trend exhaustion.
If price dips below 150 EMA during a bullish run, an orange triangle appears (⚠️ caution).
If price rises above 150 EMA during a bearish run, a blue triangle appears.
This signals potential weakening of the active trend.
5️⃣ Price Zones — Premium, Equilibrium, Discount
TrendPilot AI v2 draws 3 smart price zones based on ATR & market structure:
🟥 Premium Zone (Top) → Overbought area, caution for long trades
🟨 Equilibrium Zone (Middle) → Fair value, consolidation possible
🟩 Discount Zone (Bottom) → Oversold, better long entries
These zones help filter signals and avoid entries in risky areas.
Example: Avoid Buy signals inside Premium zone.
🧪 Suggested Use:
✅ Timeframes: 15m / 1H / 4H / 1D
✅ Combine signals with zone analysis for optimal entries
✅ Use re-entry triangles to add or confirm during pullbacks
✅ Use weak signal warnings to tighten stops or manage risk
✅ Works best in trending environments or breakout markets
⚠️ Note for Users:
This script is not repainting. All signals are plotted with stable logic.
Past performance does not guarantee future results — always backtest first.
Script does not contain financial advice — use at your own discretion.
Smart SetupHelp to find out best entry and exit
Opening range breakout setup
Previous high low daily weekly monthly
Pivot point
Moving averages
9 EMA and 30 EMA CrossoverThe buy and sell indicator is designed to function effectively across all time frames. This flexibility allows traders to utilize it for various strategies, whether they are day trading, swing trading, or investing long-term
MPF EMA Leading Indicator - Invite OnlyThis indicator is mainly for education purpose.
It does not recommend any buy sell advise