Advanced Trend Momentum [Alpha Extract]The Advanced Trend Momentum indicator provides traders with deep insights into market dynamics by combining exponential moving average analysis with RSI momentum assessment and dynamic support/resistance detection. This sophisticated multi-dimensional tool helps identify trend changes, momentum divergences, and key structural levels, offering actionable buy and sell signals based on trend strength and momentum convergence.
🔶 CALCULATION
The indicator processes market data through multiple analytical methods:
Dual EMA Analysis: Calculates fast and slow exponential moving averages with dynamic trend direction assessment and ATR-normalized strength measurement.
RSI Momentum Engine: Implements RSI-based momentum analysis with enhanced overbought/oversold detection and momentum velocity calculations.
Pivot-Based Structure: Identifies and tracks dynamic support and resistance levels using pivot point analysis with configurable level management.
Signal Integration: Combines trend direction, momentum characteristics, and structural proximity to generate high-probability trading signals.
Formula:
Fast EMA = EMA(Close, Fast Length)
Slow EMA = EMA(Close, Slow Length)
Trend Direction = Fast EMA > Slow EMA ? 1 : -1
Trend Strength = |Fast EMA - Slow EMA| / ATR(Period) × 100
RSI Momentum = RSI(Close, RSI Length)
Momentum Value = Change(Close, 5) / ATR(10) × 100
Pivot Support/Resistance = Dynamic pivot arrays with configurable lookback periods
Bullish Signal = Trend Change + Momentum Confirmation + Strength > 1%
Bearish Signal = Trend Change + Momentum Confirmation + Strength > 1%
🔶 DETAILS
Visual Features:
Trend EMAs: Fast and slow exponential moving averages with dynamic color coding (bullish/bearish)
Enhanced RSI: RSI oscillator with color-coded zones, gradient fills, and reference bands at overbought/oversold levels
Trend Fill: Dynamic gradient between EMAs indicating trend strength and direction
Support/Resistance Lines: Horizontal levels extending from pivot-based calculations with configurable maximum levels
Momentum Candles: Color-coded candlestick overlay reflecting combined trend and momentum conditions
Divergence Markers: Diamond-shaped signals highlighting bullish and bearish momentum divergences
Analysis Table: Real-time summary of trend direction, strength percentage, RSI value, and momentum reading
Interpretation:
Trend Direction: Bullish when Fast EMA crosses above Slow EMA with strength confirmation
Trend Strength > 1%: Strong trending conditions with institutional participation
RSI > 70: Overbought conditions, potential selling opportunity
RSI < 30: Oversold conditions, potential buying opportunity
Momentum Divergence: Price and momentum moving opposite directions signal potential reversals
Support/Resistance Proximity: Dynamic levels provide optimal entry/exit zones
Combined Signals: Trend changes with momentum confirmation generate high-probability opportunities
🔶 EXAMPLES
Trend Confirmation: Fast EMA crossing above Slow EMA with trend strength exceeding 1% and positive momentum confirms strong bullish conditions.
Example: During institutional accumulation phases, EMA crossovers with momentum confirmation have historically preceded significant upward moves, providing optimal long entry points.
15min
4H
Momentum Divergence Detection: RSI reaching overbought levels while momentum decreases despite rising prices signals potential trend exhaustion.
Example: Bearish divergence signals appearing at resistance levels have marked major market tops, allowing traders to secure profits before corrections.
Support/Resistance Integration: Dynamic pivot-based levels combined with trend and momentum signals create high-probability trading zones.
Example: Bullish trend changes occurring near established support levels offer optimal risk-reward entries with clearly defined stop-loss levels.
Multi-Dimensional Confirmation: The indicator's combination of trend, momentum, and structural analysis provides comprehensive market validation.
Example: When trend direction aligns with momentum characteristics near key structural levels, the confluence creates institutional-grade trading opportunities with enhanced probability of success.
🔶 SETTINGS
Customization Options:
Trend Analysis: Fast EMA Length (default: 12), Slow EMA Length (default: 26), Trend Strength Period (default: 14)
Support & Resistance: Pivot Length for level detection (default: 10), Maximum S/R Levels displayed (default: 3), Toggle S/R visibility
Momentum Settings: RSI Length (default: 14), Oversold Level (default: 30), Overbought Level (default: 70)
Visual Configuration: Color schemes for bullish/bearish/neutral conditions, transparency settings for fills, momentum candle overlay toggle
Display Options: Analysis table visibility, divergence marker size, alert system configuration
The Advanced Trend Momentum indicator provides traders with comprehensive insights into market dynamics through its sophisticated integration of trend analysis, momentum assessment, and structural level detection. By combining multiple analytical dimensions into a unified framework, this tool helps identify high-probability opportunities while filtering out market noise through its multi-confirmation approach, enabling traders to make informed decisions across various market cycles and timeframes.
M-oscillator
ATAI Volume Pressure Analyzer V 1.0 — Pure Up/DownATAI Volume Pressure Analyzer V 1.0 — Pure Up/Down
Overview
Volume is a foundational tool for understanding the supply–demand balance. Classic charts show only total volume and don’t tell us what portion came from buying (Up) versus selling (Down). The ATAI Volume Pressure Analyzer fills that gap. Built on Pine Script v6, it scans a lower timeframe to estimate Up/Down volume for each host‑timeframe candle, and presents “volume pressure” in a compact HUD table that’s comparable across symbols and timeframes.
1) Architecture & Global Settings
Global Period (P, bars)
A single global input P defines the computation window. All measures—host‑TF volume moving averages and the half‑window segment sums—use this length. Default: 55.
Timeframe Handling
The core of the indicator is estimating Up/Down volume using lower‑timeframe data. You can set a custom lower timeframe, or rely on auto‑selection:
◉ Second charts → 1S
◉ Intraday → 1 minute
◉ Daily → 5 minutes
◉ Otherwise → 60 minutes
Lower TFs give more precise estimates but shorter history; higher TFs approximate buy/sell splits but provide longer history. As a rule of thumb, scan thin symbols at 5–15m, and liquid symbols at 1m.
2) Up/Down Volume & Derived Series
The script uses TradingView’s library function tvta.requestUpAndDownVolume(lowerTf) to obtain three values:
◉ Up volume (buyers)
◉ Down volume (sellers)
◉ Delta (Up − Down)
From these we define:
◉ TF_buy = |Up volume|
◉ TF_sell = |Down volume|
◉ TF_tot = TF_buy + TF_sell
◉ TF_delta = TF_buy − TF_sell
A positive TF_delta indicates buyer dominance; a negative value indicates selling pressure. To smooth noise, simple moving averages of TF_buy and TF_sell are computed over P and used as baselines.
3) Key Performance Indicators (KPIs)
Half‑window segmentation
To track momentum shifts, the P‑bar window is split in half:
◉ C→B: the older half
◉ B→A: the newer half (toward the current bar)
For each half, the script sums buy, sell, and delta. Comparing the two halves reveals strengthening/weakening pressure. Example: if AtoB_delta < CtoB_delta, recent buying pressure has faded.
[ 4) HUD (Table) Display /i]
Colors & Appearance
Two main color inputs define the theme: a primary color and a negative color (used when Δ is negative). The panel background uses a translucent version of the primary color; borders use the solid primary color. Text defaults to the primary color and flips to the negative color when a block’s Δ is negative.
Layout
The HUD is a 4×5 table updated on the last bar of each candle:
◉ Row 1 (Meta): indicator name, P length, lower TF, host TF
◉ Row 2 (Host TF): current ↑Buy, ↓Sell, ΔDelta; plus Σ total and SMA(↑/↓)
◉ Row 3 (Segments): C→B and B→A blocks with ↑/↓/Δ
◉ Rows 4–5: reserved for advanced modules (Wings, α/β, OB/OS, Top
5) Advanced Modules
5.1 Wings
“Wings” visualize volume‑driven movement over C→B (left wing) and B→A (right wing) with top/bottom lines and a filled band. Slopes are ATR‑per‑bar normalized for cross‑symbol/TF comparability and converted to angles (degrees). Coloring mirrors HUD sign logic with a near‑zero threshold (default ~3°):
◉ Both lines rising → blue (bullish)
◉ Both falling → red (bearish)
◉ Mixed/near‑zero → gray
Left wing reflects the origin of the recent move; right wing reflects the current state.
5.2 α / β at Point B
We compute the oriented angle between the two wings at the midpoint B:
β is the bottom‑arc angle; α = 360° − β is the top‑arc angle.
◉ Large α (>180°) or small β (<180°) flags meaningful imbalance.
◉ Intuition: large α suggests potential selling pressure; small β implies fragile support. HUD cells highlight these conditions.
5.3 OB/OS Spike
OverBought/OverSold (OB/OS) labels appear when directional volume spikes align with a 7‑oscillator vote (RSI, Stoch, %R, CCI, MFI, DeMarker, StochRSI).
◉ OB label (red): unusually high sell volume + enough OB votes
◉ OS label (teal): unusually high buy volume + enough OS votes
Minimum votes and sync window are user‑configurable; dotted connectors can link labels to the candle wick.
5.4 Top3 Volume Peaks
Within the P window the script ranks the top three BUY peaks (B1–B3) and top three SELL peaks (S1–S3).
◉ B1 and S1 are drawn as horizontal resistance (at B1 High) and support (at S1 Low) zones with adjustable thickness (ticks/percent/ATR).
◉ The HUD dedicates six cells to show ↑/↓/Δ for each rank, and prints the exact High (B1) and Low (S1) inline in their cells.
6) Reading the HUD — A Quick Checklist
◉ Meta: Confirm P and both timeframes (host & lower).
◉ Host TF block: Compare current ↑/↓/Δ against their SMAs.
◉ Segments: Contrast C→B vs B→A deltas to gauge momentum change.
◉ Wings: Right‑wing color/angle = now; left wing = recent origin.
◉ α / β: Look for α > 180° or β < 180° as imbalance cues.
◉ OB/OS: Note labels, color (red/teal), and the vote count.
◉Top3: Keep B1 (resistance) and S1 (support) on your radar.
Use these together to sketch scenarios and invalidation levels; never rely on a single signal in isolation.
[ 7) Example Highlights (What the table conveys) /i]
◉ Row 1 shows the indicator name, the analysis length P (default 55), and both TFs used for computation and display.
◉ B1 / S1 blocks summarize each side’s peak within the window, with Δ indicating buyer/seller dominance at that peak and inline price (B1 High / S1 Low) for actionable levels.
◉ Angle cells for each wing report the top/bottom line angles vs. the horizontal, reflecting the directional posture.
◉ Ranks B2/B3 and S2/S3 extend context beyond the top peak on each side.
◉ α / β cells quantify the orientation gap at B; changes reflect shifting buyer/seller influence on trend strength.
Together these visuals often reveal whether the “wings” resemble a strong, upward‑tilted arm supported by buyer volume—but always corroborate with your broader toolkit
8) Practical Tips & Tuning
◉ Choose P by market structure. For daily charts, 34–89 bars often works well.
◉ Lower TF choice: Thin symbols → 5–15m; liquid symbols → 1m.
◉ Near‑zero angle: In noisy markets, consider 5–7° instead of 3°.
◉ OB/OS votes: Daily charts often work with 3–4 votes; lower TFs may prefer 4–5.
◉ Zone thickness: Tie B1/S1 zone thickness to ATR so it scales with volatility.
◉ Colors: Feel free to theme the primary/negative colors; keep Δ<0 mapped to the negative color for readability.
Combine with price action: Use this indicator alongside structure, trendlines, and other tools for stronger decisions.
Technical Notes
Pine Script v6.
◉ Up/Down split via TradingView/ta library call requestUpAndDownVolume(lowerTf).
◉ HUD‑first design; drawings for Wings/αβ/OBOS/Top3 align with the same sign/threshold logic used in the table.
Disclaimer: This indicator is provided solely for educational and analytical purposes. It does not constitute financial advice, nor is it a recommendation to buy or sell any security. Always conduct your own research and use multiple tools before making trading decisions.
FUMO 200 MagnetWhat it does
FUMO Magnet measures how far price has stretched away from its long-term “magnet” — a blended EMA/SMA moving average (200 by default).
It plots a logarithmic deviation (optionally normalized) as an oscillator around zero.
Above 0** → price is above the magnet (stretched up)
Below 0** → price is below the magnet (stretched down)
Guide levels** highlight potential overbought/oversold zones
---
Why log deviation?
Log returns make extremes comparable across cycles and compress exponential trends — especially useful for BTC and other crypto assets.
Normalization modes further adjust the scale, keeping the oscillator readable on any chart.
---
Inputs
**Base**
* Source (default: Close)
* Base Length (default: 200 EMA/SMA)
* EMA vs SMA weight (%) — 0% = pure SMA, 100% = pure EMA, 50% = blended
* EMA smoothing of deviation — acts as a noise filter
**Normalization**
* None (Log Deviation) — raw log stretch in % terms
* Z-score — deviation in standard deviations (σ)
* Robust Z (MAD) — deviation vs median absolute deviation, resistant to outliers
* Tanh squash — smooth nonlinear squash of extremes for compact scale
* Normalization window (for Z / MAD)
* Tanh scale (lower = stronger squash)
* Clamp after normalization — hard cap at ±X
**Levels**
* Guide levels (Upper / Lower) — visual thresholds (default ±12)
* Zero line toggle
---
### How to read it
* **Trend bias**: sustained time above 0 = uptrend, below 0 = downtrend
* **Stretch / mean reversion**: the farther from 0, the higher the reversion risk
* **Cross-checks**: combine with structure (HH/HL, LH/LL), volume, or momentum (RSI, MACD)
---
### Recommended settings by timeframe
**Long-term (1D / 1W)**
* Normalization: None (Log Deviation)
* Base Length: 200
* EMA vs SMA weight: 50% (adjust 35–65% for faster/slower magnet)
* Deviation smoothing: 20 (10–30 range)
* Guide levels: ±12 to ±20
* Use case: cycle extremes, portfolio rebalancing, trim/add logic
**Swing (4H – 1D)**
* Normalization: Z-score
* Window: 200 (100–250)
* Smoothing: 14–20
* Guide levels: ±2σ to ±3σ
* Use case: stretched conditions across regimes; ±3σ is rare, often mean-reverts
**Intraday / Active swing (1H – 4H)**
* Normalization: Robust Z (MAD)
* Window: 200 (150 for faster response)
* Smoothing: 10–16
* Guide levels: ±3 to ±4 (robust units)
* Use case: handles spikes better than σ, fewer false overbought/oversold signals
**Scalping / Universal readability (15m – 1H)**
* Normalization: Tanh squash
* Tanh scale: 6–10 (start with 8)
* Smoothing: 8–12
* Guide levels: ±8 to ±12
* Use case: compact panel across assets and timeframes; not % or σ, but visually consistent
---
### Optional
* Clamp: enable ±20 (or ±25) for strict bounded range (useful for public charts)
---
### Quick setups
**BTC Daily (“cycle view”)**
* Normalization: None
* Blend: 50%
* Smooth: 20
* Levels: ±12–15
**BTC 4H (“swing”)**
* Normalization: Z-score
* Window: 200
* Smooth: 16
* Levels: ±2.5σ to ±3σ
**Alts 1H (“volatile”)**
* Normalization: Robust Z (MAD)
* Window: 200
* Smooth: 12
* Levels: ±3.5 to ±4.5
**Mixed assets 15m (“compact panel”)**
* Normalization: Tanh squash
* Scale: 8
* Smooth: 10
* Levels: ±8–12
* Clamp: ±20
Multi Stoch + VWAP Heatmap + Histogram + ScalpingThis indicator was developed by referencing various indicators from many contributors. I apologize that I cannot identify all the original authors due to the numerous sources referenced. Thank you to everyone who contributed to the trading community.
Important Notice: Please use this indicator with sufficient caution and proper risk management. I do not assume any responsibility for any losses incurred from using this indicator. Trade at your own risk.
Alternative version:
Acknowledgment & Disclaimer:
This indicator incorporates ideas and concepts from numerous community indicators. I sincerely apologize for not being able to properly credit all the original creators due to the extensive references used. My heartfelt gratitude goes out to all the talented developers in the trading community.
Risk Warning: Please exercise extreme caution when using this indicator. All trading involves substantial risk of loss, and I accept no liability for any financial losses that may result from the use of this indicator. Always implement proper risk management and trade responsibly.
Multi Stoch + VWAP Heatmap + Histogram + Scalping Usage Guide
🔧 Basic Settings
Parameter Settings (Recommended for XAU/USD)
Fast Stoch Length: 5 # Ultra-short term trend
Medium Stoch Length: 14 # Short term trend
Slow Stoch Length: 21 # Medium term trend
%K Smoothing: 2 # High sensitivity setting
%D Smoothing: 2 # High sensitivity setting
Overbought Level: 75 # Sell zone
Oversold Level: 25 # Buy zone
📈 Reading the Chart
1. Histogram (Background Bar Chart)
Green tones: Strong uptrend
Red tones: Strong downtrend
Gray: Trendless/neutral
2. Line Display
Blue lines: Ultra-short term Stochastic (K1/D1)
Orange lines: Short term Stochastic (K2/D2)
Purple lines: Medium term Stochastic (K3/D3)
Yellow line: VWAP (normalized)
3. Horizontal Lines
Upper line (75): Sell zone
Center line (50): Neutral line
Lower line (25): Buy zone
🎯 Signal Types and Meanings
Scalping Signals (● marks)
Green ● (bottom): 📈 Scalp buy entry
RSI(7) < 25 + K1 < 30 combination
VWAP bounce targeting
Red ● (top): 📉 Scalp sell entry
RSI(7) > 75 + K1 > 70 combination
VWAP rejection targeting
Main Trend Signals
▲ (large, green): 💪 Strong buy signal - Multiple conditions aligned
▼ (large, red): 💪 Strong sell signal - Multiple conditions aligned
△ (medium, green): 📈 Normal buy signal
▽ (medium, orange): 📉 Normal sell signal
Warning/Reversal Signals
▼ (pink): ⚠️ Sell warning - Trend reversal caution
△ (teal): ⚠️ Buy warning - Trend reversal caution
Cross Signals (● marks, positioned up/down)
Green ● (bottom): Histogram crosses above VWAP
Red ● (top): Histogram crosses below VWAP
🚀 Practical Usage
Scalping Strategy (1-5 minute charts recommended)
Entry: Enter on green ● or red ● signals
Take Profit: At opposite zone or next ● signal
Stop Loss: Around 10-15 pips (for gold)
Time Session: London-NY overlap optimal
Swing Trading Strategy (15min-1hour charts)
Entry: Strong ▲▼ signals
Take Profit: Opposite warning signals (▼△)
Stop Loss: VWAP reverse break or 30-50 pips
Day Trading Strategy (5-15 minute charts)
Trend Confirmation: Histogram color
Entry: △▽ signals
Take Profit: Opposite zone reached
Stop Loss: 20-30 pips
⚡ XAU/USD Specific Usage
Session-Based Strategy
Tokyo Session (9-15 JST): Wait and see, small scalps
London Session (16-24 JST): Main trading
NY Session (22-6 JST): Most active, all signals valid
Major News Events
Pre-announcement: Reduce positions
Post-announcement: Trend following with ● signals
🔍 Filter Functions
ATR Filter
Small price movements filtered as noise
Signals only on significant price moves
Time Filter
Strong signals only during high volatility sessions
Weaker signals during low volatility periods
Consecutive Signal Prevention
Duplicate signals within 2 bars filtered out
Prevents noise trading
⚙️ Settings Customization
For Aggressive Trading
Signal Cooldown: 1 # More frequent signals
ATR Length: 5 # More sensitive filter
For Conservative Trading
Signal Cooldown: 5 # Relaxed signals
ATR Length: 20 # Stricter filter
Overbought: 80 # More extreme levels
Oversold: 20
📱 Recommended Alert Settings
Strong Buy/Sell Signal: Priority ★★★
Scalping Buy/Sell Signal: Priority ★★☆
Reverse Warning: Priority ★★★ (for position management)
⚠️ Important Notes
Scalping requires quick decision-making
Multiple timeframe confirmation recommended
Exercise caution during major news events
Risk management is top priority
This indicator is a versatile multi-functional tool suitable for short to medium-term trading strategies!
🎓 Trading Examples
Scalping Example
Wait for green ● at oversold level (below 30)
Enter long position immediately
Target: 50 level or red ● signal
Stop: Below recent swing low
Day Trading Example
Histogram turns green (bullish trend)
Wait for △ buy signal near support
Target: Overbought level (75)
Exit: Warning signal ▼ appears
Risk Management Rules
Never risk more than 2% per trade
Use proper position sizing
Set stops before entry
Take partial profits at key levels
This comprehensive guide will help you maximize the potential of this advanced multi-timeframe indicator!
ST-Stochastic DashboardST-Stochastic Dashboard: User Manual & Functionality
1. Introduction
The ST-Stochastic Dashboard is a comprehensive tool designed for traders who utilize the Stochastic Oscillator. It combines two key features into a single indicator:
A standard, fully customizable Stochastic Oscillator plotted directly on your chart.
A powerful Multi-Timeframe (MTF) Dashboard that shows the status of the Stochastic %K value across three different timeframes of your choice.
This allows you to analyze momentum on your current timeframe while simultaneously monitoring for confluence or divergence on higher or lower timeframes, all without leaving your chart.
Disclaimer: In accordance with TradingView's House Rules, this document describes the technical functionality of the indicator. It is not financial advice. The indicator provides data based on user-defined parameters; all trading decisions are the sole responsibility of the user. Past performance is not indicative of future results.
2. How It Works (Functionality)
The indicator is divided into two main components:
A. The Main Stochastic Indicator (Chart Pane)
This is the visual representation of the Stochastic Oscillator for the chart's current timeframe.
%K Line (Blue): This is the main line of the oscillator. It shows the current closing price in relation to the high-low range over a user-defined period. A high value means the price is closing near the top of its recent range; a low value means it's closing near the bottom.
%D Line (Black): This is the signal line, which is a moving average of the %K line. It is used to smooth out the %K line and generate trading signals.
Overbought Zone (Red Area): By default, this zone is above the 75 level. When the Stochastic lines are in this area, it indicates that the asset may be "overbought," meaning the price is trading near the peak of its recent price range.
Oversold Zone (Blue Area): By default, this zone is below the 25 level. When the Stochastic lines are in this area, it indicates that the asset may be "oversold," meaning the price is trading near the bottom of its recent price range.
Crossover Signals:
Buy Signal (Blue Up Triangle): A blue triangle appears below the candles when the %K line crosses above the Oversold line (e.g., from 24 to 26). This suggests a potential shift from bearish to bullish momentum.
Sell Signal (Red Down Triangle): A red triangle appears above the candles when the %K line crosses below the Overbought line (e.g., from 76 to 74). This suggests a potential shift from bullish to bearish momentum.
B. The Multi-Timeframe Dashboard (Table on Chart)
This is the informational table that appears on your chart. Its purpose is to give you a quick, at-a-glance summary of the Stochastic's condition on other timeframes.
Function: The script uses TradingView's request.security() function to pull the %K value from three other timeframes that you specify in the settings.
Efficiency: The table is designed to update only on the last (most recent) bar (barstate.islast) to ensure the script runs efficiently and does not slow down your chart.
Columns:
Timeframe: Displays the timeframe you have selected (e.g., '5', '15', '60').
Stoch %K: Shows the current numerical value of the %K line for that specific timeframe, rounded to two decimal places.
Status: Interprets the %K value and displays a clear status:
OVERBOUGHT (Red Background): The %K value is above the "Upper Line" setting.
OVERSOLD (Blue Background): The %K value is below the "Lower Line" setting.
NEUTRAL (Black/Dark Background): The %K value is between the Overbought and Oversold levels.
3. Settings / Parameters in Detail
You can access these settings by clicking the "Settings" (cogwheel) icon on the indicator name.
Stochastic Settings
This group controls the behavior and appearance of the main Stochastic indicator plotted in the pane.
Stochastic Period (length)
Description: This is the lookback period used to calculate the Stochastic Oscillator. It defines the number of past bars to consider for the high-low range.
Default: 9
%K Smoothing (smoothK)
Description: This is the moving average period used to smooth the raw Stochastic value, creating the %K line. A higher value results in a smoother, less sensitive line.
Default: 3
%D Smoothing (smoothD)
Description: This is the moving average period applied to the %K line to create the %D (signal) line. A higher value creates a smoother signal line that lags further behind the %K line.
Default: 6
Lower Line (Oversold) (ul)
Description: This sets the threshold for the oversold condition. When the %K line is below this value, the dashboard will show "OVERSOLD". It is also the level the %K line must cross above to trigger a Buy Signal triangle.
Default: 25
Upper Line (Overbought) (ll)
Description: This sets the threshold for the overbought condition. When the %K line is above this value, the dashboard will show "OVERBOUGHT". It is also the level the %K line must cross below to trigger a Sell Signal triangle.
Default: 75
Dashboard Settings
This group controls the data and appearance of the multi-timeframe table.
Timeframe 1 (tf1)
Description: The first timeframe to be displayed in the dashboard.
Default: 5 (5 minutes)
Timeframe 2 (tf2)
Description: The second timeframe to be displayed in the dashboard.
Default: 15 (15 minutes)
Timeframe 3 (tf3)
Description: The third timeframe to be displayed in the dashboard.
Default: 60 (1 hour)
Dashboard Position (table_pos)
Description: Allows you to select where the dashboard table will appear on your chart.
Options: top_right, top_left, bottom_right, bottom_left
Default: bottom_right
4. How to Use & Interpret
Configuration: Adjust the Stochastic Settings to match your trading strategy. The default values (9, 3, 6) are common, but feel free to experiment. Set the Dashboard Settings to the timeframes that are most relevant to your analysis (e.g., your entry timeframe, a medium-term timeframe, and a long-term trend timeframe).
Analysis with the Dashboard: The primary strength of this tool is confluence. Look for situations where multiple timeframes align. For example:
If the dashboard shows OVERSOLD on the 15-minute, 60-minute, and your current 5-minute chart, a subsequent Buy Signal on your 5-minute chart may carry more weight.
Conversely, if your 5-minute chart shows OVERSOLD but the 60-minute chart is strongly OVERBOUGHT, it could indicate that you are looking at a minor pullback in a larger downtrend.
Interpreting States:
Overbought is not an automatic "sell" signal. It simply means momentum has been strong to the upside, and the price is near its recent peak. It could signal a potential reversal, but the price can also remain overbought for extended periods in a strong uptrend.
Oversold is not an automatic "buy" signal. It means momentum has been strong to the downside. While it can signal a potential bounce, prices can remain oversold for a long time in a strong downtrend.
Use the signals and dashboard states as a source of information to complement your overall trading strategy, which should include other forms of analysis such as price action, support/resistance levels, or other indicators.
Constance Brown Composite Index EnhancedWhat This Indicator Does
Implements Constance Brown's copyrighted Composite Index formula (1996) from her Master's thesis - a breakthrough oscillator that solves the critical problem where RSI fails to show divergences in long-horizon trends, providing early warning signals for major market reversals.
The Problem It Solves
Traditional RSI frequently fails to display divergence signals in Global Equity Indexes and long-term charts, leaving asset managers without warning of major price reversals. Brown's research showed RSI failed to provide divergence signals 42 times across major markets - failures that would have been "extremely costly for asset managers."
Key Components
Composite Line: RSI Momentum (9-period) + Smoothed RSI Average - the core breakthrough formula
Fast/Slow Moving Averages: Trend direction confirmation (13/33 periods default)
Bollinger Bands: Volatility envelope around the composite signal
Enhanced Divergence Detection: Significantly improved trend reversal timing vs standard RSI
Research-Proven Performance
Based on Brown's extensive study across 6 major markets (1919-2015):
42 divergence signals triggered where RSI showed none
33 signals passed with meaningful reversals (78% success rate)
Only 5 failures - exceptional performance in monthly/2-month timeframes
Tested on: German DAX, French CAC 40, Shanghai Composite, Dow Jones, US/Japanese Government Bonds
New Customization Features
Moving Average Types: Choose SMA or EMA for fast/slow lines
Optional Fills: Toggle composite and Bollinger band fills on/off
All Periods Adjustable: RSI length, momentum, smoothing periods
Visual Styling: Customize colors and line widths in Style tab
Default Settings (Original Formula)
RSI Length: 14
RSI Momentum: 9 periods
RSI MA Length: 3
SMA Length: 3
Fast SMA: 13, Slow SMA: 33
Bollinger STD: 2.0
Applications
Long-term investing: Monthly/2-month charts for major trend changes
Elliott Wave analysis: Maximum displacement at 3rd-of-3rd waves, divergence at 5th waves
Multi-timeframe: Pairs well with MACD, works across all timeframes
Global markets: Proven effective on equities, bonds, currencies, commodities
Perfect for serious traders and asset managers seeking the proven mathematical edge that traditional RSI cannot provide.
Guitar Hero [theUltimator5]The Guitar Hero indicator transforms traditional oscillator signals into a visually engaging, game-like display reminiscent of the popular Guitar Hero video game. Instead of standard line plots, this indicator presents oscillator values as colored segments or blocks, making it easier to quickly identify market conditions at a glance.
Choose from 8 different technical oscillators:
RSI (Relative Strength Index)
Stochastic %K
Stochastic %D
Williams %R
CCI (Commodity Channel Index)
MFI (Money Flow Index)
TSI (True Strength Index)
Ultimate Oscillator
Visual Display Modes
1) Boxes Mode : Creates distinct rectangular boxes for each bar, providing a clean, segmented appearance. (default)
This visual display is limited by the amount of box plots that TradingView allows on each indictor, so it will only plot a limited history. If you want to view a similar visual display that has minor breaks between boxes, then use the fill mode.
2) Fill Mode : Uses filled areas between plot boundaries.
Use this mode when you want to view the plots further back in history without the strict drawing limitations.
Five-Level Color-Coded System
The indicator normalizes all oscillator values to a 0-100 scale and categorizes them into five distinct levels:
Level 1 (Red): Very Oversold (0-19)
Level 2 (Orange): Oversold (20-29)
Level 3 (Yellow): Neutral (30-70)
Level 4 (Aqua): Overbought (71-80)
Level 5 (Lime): Very Overbought (81-100)
Customization Options
Signal Parameters
Signal Length: Primary period for oscillator calculation (default: 14)
Signal Length 2: Secondary period for Stochastic %D and TSI (default: 3)
Signal Length 3: Tertiary period for TSI calculation (default: 25)
Display Controls
Show Horizontal Reference Lines: Toggle grid lines for better level identification
Show Information Table: Display current signal type, value, and normalized value
Table Position: Choose from 9 different screen positions for the info table
Display Mode: Switch between Boxes and Fills visualization
Max Bars to Display: Control how many historical bars to show (50-450 range)
Normalization Process
The indicator automatically normalizes different oscillator ranges to a consistent 0-100 scale:
Williams %R: Converts from -100/0 range to 0-100
CCI: Maps typical -300/+300 range to 0-100
TSI: Transforms -100/+100 range to 0-100
Other oscillators: Already use 0-100 scale (RSI, Stochastic, MFI, Ultimate Oscillator)
This was designed as an educational tool
The gamified approach makes learning about oscillators more engaging for new traders.
Trusty RSI v2The 'Trusty RSI' indicator is based off a simple RSI but has additional trust power. For those who have trust issues in their trading, the flashy background colors and the 'Trusty' signals help you trade with infinite confidence! This indicator might revolutionize your trading and will help you become generationally wealthy! Please have fun with it!
On a more serious note, The Trusty RSI is a streamlined RSI-based oscillator designed to highlight only meaningful extremes. The pane is colored red when RSI > 80 and green when RSI < 30, while “Trusty Sell/Buy” labels appear only after three consecutive bars in those zones to reduce noise. It includes 80/55/30 guide levels with pane fill and offers optional smoothing of the RSI line via SMA or EMA (user-selectable length). Suitable for any symbol and timeframe; thresholds and lengths are configurable to fit different risk tolerances.
FluidFlow OscillatorFluidFlow Oscillator: Study Material for Traders
Overview
The FluidFlow Oscillator is a custom technical indicator designed to measure price momentum and market flow dynamics by simulating fluid motion concepts such as velocity, viscosity, and turbulence. It helps traders identify potential buy and sell signals along with trend strength, momentum direction, and volatility conditions.
This study explains the underlying calculation concepts, signal logic, visual cues, and how to interpret the professional dashboard table that summarizes key indicator readings.
________________________________________
How the FluidFlow Oscillator Works
Core Mechanisms
1. Price Flow Velocity
o Measures the rate of change of price over a specified flow length (default 40 bars).
o Calculated as a percentage change of closing price: roc=close−closelen_flowcloselen_flow×100\text{roc} = \frac{\text{close} - \text{close}_{len\_flow}}{\text{close}_{len\_flow}} \times 100roc=closelen_flowclose−closelen_flow×100
o Smoothed by an EMA (Exponential Moving Average) to reduce noise, generating a "flow velocity" value.
2. Viscosity Factor
o Analogous to fluid viscosity, it adjusts the flow velocity based on recent price volatility.
o Volatility is computed as the standard deviation of close prices over the flow length.
o The viscosity acts as a damping factor to slow down the flow velocity in highly volatile conditions.
o This results in a "flow with viscosity" value, that smooths out the velocity considering market turbulence.
3. Turbulence Burst
o Captures sudden changes or bursts in the flow by measuring changes between successive viscosity-adjusted flows.
o The turbulence value is a smoothed absolute change in flow.
o A burst boost factor is added to the oscillator to incorporate this rapid change component, amplifying signals during sudden shifts.
4. Oscillator Calculation
o The raw oscillator value is the sum of flow with viscosity plus burst boost, scaled by 10.
o Clamped between -100 and +100 to limit extremes.
o Finally, smoothed again by EMA for cleaner visualization.
________________________________________
Signal Logic
The oscillator works with complementary components to produce actionable signals:
• Signal Line: An EMA-smoothed version of the oscillator for generating crossover-based signals.
• Momentum: The rate of change of the oscillator itself, smoothed by EMA.
• Trend: Uses fast (21-period EMA) and slow (50-period EMA) moving averages of price to identify market trend direction (uptrend, downtrend, or sideways).
Signal Conditions
• Bullish Signal (Buy): Oscillator crosses above the oversold threshold with positive momentum.
• Bearish Signal (Sell): Oscillator crosses below the overbought threshold with negative momentum.
Statuses
The oscillator provides descriptive market states based on level and momentum:
• Overbought
• Oversold
• Buy Signal
• Sell Signal
• Bullish / Bearish (momentum-driven)
• Neutral (no clear trend)
________________________________________
Color System and Visualization
The oscillator uses a sophisticated HSV color model adapting hues according to:
• Oscillator value magnitude and sign (positive or negative)
• Acceleration of oscillator changes
• Smooth color gradients to facilitate intuitive understanding of trend strength and momentum shifts
Background colors highlight overbought (red tint) and oversold (green tint) zones with transparency.
________________________________________
How to Understand the Professional Dashboard Table
The FluidFlow Oscillator offers an integrated table at the bottom center of the chart. This dashboard summarizes critical indicator readings in 8 columns across 3 rows:
Column Description
SIGNAL Current signal status (e.g., Buy, Sell, Overbought) with color coding
OSCILLATOR Current oscillator value (-100 to +100) with color reflecting intensity and direction
MOMENTUM Momentum bias indicating strength/direction of oscillator changes (Strong Up, Up, Sideways, Down, Strong Down)
TREND Current trend status based on EMAs (Strong Uptrend, Uptrend, Sideways, Downtrend, Strong Downtrend)
VOLATILITY Volatility percentage relative to average, indicating market activity level
FLOW Flow velocity value describing price momentum magnitude and direction
TURBULENCE Turbulence level indicating sudden bursts or spikes in price movement
PROGRESS Oscillator's position mapped as a percentage (0% to 100%) showing proximity to extreme levels
Rows Explained
• Row 1 (Header): Labels for each metric.
• Row 2 (Values): Current numerical or descriptive values color-coded along a professional scheme:
o Green or lime tones indicate positive or bullish conditions.
o Red or orange tones indicate caution, sell signals, or bearish conditions.
o Blue tones indicate neutral or stable conditions.
• Row 3 (Status Indicators): Emoji-like icons and bars provide a quick visual gauge of each metric's intensity or signal strength:
o For example, "🟢🟢🟢" suggests very strong bullish momentum, while "🔴🔴🔴" suggests strong bearish momentum.
o Progress bar visually demonstrates oscillator movement toward oversold or overbought extremes.
________________________________________
Practical Interpretation Tips
• A Buy signal with green colors and strong momentum usually precedes upward price moves.
• An Overbought status with red background and red table colors warns of potential price corrections or reversals.
• Watch the Turbulence to gauge market instability; spikes may precede price shocks or volatility bursts.
• Confirm signals with the Trend and Momentum columns to avoid false entries.
• Use the Progress bar to anticipate oscillations approaching key threshold levels for timing trades.
________________________________________
Alerts
The oscillator supports alerts for:
• Buy and sell signals based on oscillator crossovers.
• Overbought and oversold levels reached.
These help traders automate awareness of important market conditions.
________________________________________
Disclaimer
The FluidFlow Oscillator and its signals are for educational and informational purposes only. They do not guarantee profits and should not be considered as financial advice. Always conduct your own research and use proper risk management when trading. Past performance is not indicative of future results.
________________________________________
This detailed explanation should help you understand the workings of the FluidFlow Oscillator, its components, signal logic, and how to analyze its professional dashboard for informed trading decisions.
Trendlines Oscillator [LuxAlgo]The Trendlines Oscillator helps traders identify trends and momentum based on the normalized distances between the current price and the most recently detected bullish and bearish trend lines.
The indicator features bullish and bearish momentum, a signal line with crossings, and multiple smoothing options.
🔶 USAGE
The indicator displays three lines: two for momentum and one for the signal. When one of the momentum lines (bullish or bearish) crosses the signal line, the tool displays a dot to indicate which momentum is gaining strength.
As a general rule, when the green bullish momentum line is above the red bearish momentum line, it indicates buyer strength. This means that the actual prices are farther from the support trend lines than the resistance trend lines. The opposite is true for seller strength.
To calculate bullish momentum, the tool first identifies bullish trend lines acting as support below the price. Then, it measures the delta between the price and those trend lines and normalizes the reading into the displayed momentum values.
The same process is used for bearish momentum, but with bearish trendlines acting as resistance above the price.
🔹 Length & Memory
Modifying the Length and Memory values will cause the tool to display different momentum values.
Traders can adjust the length to detect larger trendlines and adjust the memory to indicate how many trendlines the tool should consider.
As the chart above shows, smaller values make the tool more responsive, while larger values are useful for detecting larger trends.
🔹 Smoothing
By default, the data is not smoothed, and the signal uses a triangular moving average with a length of 10. Traders can smooth both the data and the signal line.
Traders can choose from up to ten different methods, or none. Some examples are shown on the chart above.
🔶 DETAILS
The steps for the calculations are as follows:
1. Gather the pivots, highs, and lows.
ph = fixnan(ta.pivothigh(lengthInput, lengthInput))
pl = fixnan(ta.pivotlow(lengthInput, lengthInput))
2. Calculate the slope and y-intercept for each trendline between contiguous lower highs (resistance) or higher lows (support).
if ph < ph
slope = (ph - ph )/(n-lengthInput - phx1)
res.unshift(l.new(ph - slope * phx1, slope))
if pl > pl
slope = (pl - pl )/(n-lengthInput - plx1)
sup.unshift(l.new(pl - slope * plx1, slope))
3. Calculate the value of each trendline on the current bar, then calculate the difference with the current price (delta). To calculate the relative sum of deltas, only consider trendlines below the price for support or above the price for resistance.
method get_point(l id, x)=>
id.slope * x + id.intercept
for element in sup
point = element.get_point(n)
if sourceInput > point
sup_sum += sourceInput - point
sup_den += math.abs(sourceInput - point)
for element in res
point = element.get_point(n)
if sourceInput < point
res_sum += point - sourceInput
res_den += math.abs(point - sourceInput)
4. Normalize the value from 0 to 100 by taking the sum of the relative values of the deltas divided by the sum of the absolute values of the deltas.
float supportLine = sup_sum / sup_den * 100
float resistanceLine = res_sum / res_den * 100
5. Smooth both values, then calculate the signal line as the difference between them.
float smoothSupport = smooth(supportLine,dataSmoothingInput,dataSmoothingLengthInput)
float smoothResistance = smooth(resistanceLine,dataSmoothingInput,dataSmoothingLengthInput)
float signal = math.abs(smoothSupport - smoothResistance)
float signalLine = smooth(signal,smoothingInput,smoothingLengthInput)
6. Calculate the crossing signals against the signal line, using only the first signal from each series of bullish or bearish crossings.
bullSignal = smoothSupport > signalLine and smoothSupport < signalLine
bearSignal = smoothResistance > signalLine and smoothResistance < signalLine
lastSignal := bullSignal and lastSignal == BEAR ? BULL : bearSignal and lastSignal == BULL ? BEAR : lastSignal
firstBull = ta.change(lastSignal) > 0
firstBear = ta.change(lastSignal) < 0
🔶 SETTINGS
Length: The size of the market structure used for trendline detection.
Memory: The number of trendlines used in calculations.
Source: The source for the calculations is closing prices by default.
🔹 Smoothing
Data Smoothing: Choose the smoothing method and length
Signal Smoothing: Choose the smoothing method and length
RSI Dynamic Bands█ OVERVIEW
The "RSI Dynamic Bands" indicator is a variant of the Relative Strength Index (RSI) oscillator that brings its signals directly onto the price chart. It displays dynamic bands around the price, adjusted based on RSI levels, enabling easy identification of potential overbought or oversold conditions. The indicator also integrates a multi-timeframe RSI table, facilitating the analysis of trend strength across different timeframes.
█ CONCEPTS
The "RSI Dynamic Bands" indicator is designed to simplify the interpretation of price levels in the context of support and resistance zones, which can be correlated with other technical indicators and RSI values. Since the price itself does not display RSI values, a table showing RSI for four selected timeframes has been added, allowing traders to quickly assess trend strength across different time intervals. The most effective approach is to combine the indicator with other technical analysis tools, such as Fibonacci levels or pivot points, to confirm signals when the price approaches the bands and RSI values indicate a potential reversal.
Band Calculation
The bands are calculated based on the current closing price and RSI values, incorporating dynamic scaling to better adapt to market conditions. The formulas for the bands are as follows:
• Upper Band: close + (rsiUpper - rsi) * scaleFactor, where rsiUpper is the upper RSI level (default: 70), and scaleFactor accounts for market volatility.
• Lower Band: close + (rsiLower - rsi) * scaleFactor, where rsiLower is the lower RSI level (default: 30).
• Midline: The arithmetic average of the upper and lower bands: (upperBand + lowerBand) / 2.
Why Scaling? Without scaling, the bands would be chaotic and jagged, making them difficult to interpret. Scaling smooths the bands, making them wider during periods of high volatility and narrower during consolidation, better reflecting potential support and resistance levels.
Indicator Features
• Dynamic Price Bands: The bands adapt to market conditions, facilitating the identification of key price levels.
• Multi-Timeframe RSI Table: Displays RSI values for four selected timeframes (default: 15m, 1h, 4h, Daily), enabling comparison of trend strength across different perspectives.
• Style Customization: Users can adjust band colors, line thickness, and toggle the visibility of bands, fills, and the table.
How to Set Up the Indicator
1 — Add the "RSI Dynamic Bands" indicator to your TradingView chart.
2 — Configure parameters in the settings, such as RSI length, upper/lower levels, and scaling multiplier, to match your trading style.
3 — Enable or disable the display of bands, fills, or the RSI table based on your needs.
4 — Adjust band and table colors in the input section and line thickness in the "Style" section to better align the indicator with your chart.
█ OTHER SECTIONS
FEATURES
• RSI Length: The period for calculating RSI (default: 14).
• RSI Levels: Thresholds for overbought (default: 70) and oversold (default: 30).
• Scaling Multiplier: Adjusts bands based on market volatility (default: 0.15).
• Table Timeframes: Select four timeframes for the RSI table (default: 15m, 1h, 4h, Daily).
• Style Options: Customize band colors, fills, table, and line thickness.
HOW TO USE
Add the indicator to your chart, configure the parameters, and observe price interactions with the bands to identify potential entry and exit points. The RSI table allows you to compare RSI values across different timeframes, aiding in trading decisions. The most effective approach is to combine the indicator with other technical analysis tools, such as Fibonacci levels or pivot points, to confirm signals when the price approaches the bands and RSI values indicate a potential reversal.
Trading Strategies:
• Scalping: Use lower timeframes (e.g., 5m, 15m) in the RSI table to quickly identify short-term lows and highs. Wait for the price to approach the lower band in the RSI oversold zone, with RSI on lower timeframes starting to rise, and other tools, such as Fibonacci levels (e.g., 38.2%) or pivot points, confirming support.
• Medium-Term Trading: Focus on 1h and 4h timeframes. Look for confirmation of a low on a lower timeframe (e.g., 1h), where RSI indicates oversold conditions or starts rising, then check if RSI on a higher timeframe (e.g., 4h) confirms the trend. Confirmation from other tools, such as a Fibonacci level (e.g., 50%) or pivot point near the bands, strengthens the signal.
• Long-Term Trading: Use Daily and higher timeframes (e.g., Weekly). Wait for all relevant timeframes to confirm a low (e.g., RSI near oversold and price at the lower band), with lower timeframes (e.g., 4h) showing rising RSI. Other tools, such as Fibonacci levels (e.g., 61.8%) or pivot points near the bands, can further confirm a trend reversal signal.
VWAP For Loop [BackQuant]VWAP For Loop
What this tool does—in one sentence
A volume-weighted trend gauge that anchors VWAP to a calendar period (day/week/month/quarter/year) and then scores the persistence of that VWAP trend with a simple for-loop “breadth” count; the result is a clean, threshold-driven oscillator plus an optional VWAP overlay and alerts.
Plain-English overview
Instead of judging raw price alone, this indicator focuses on anchored VWAP —the market’s average price paid during your chosen institutional period. It then asks a simple question across a configurable set of lookback steps: “Is the current anchored VWAP higher than it was i bars ago—or lower?” Each “yes” adds +1, each “no” adds −1. Summing those answers creates a score that reflects how consistently the volume-weighted trend has been rising or falling. Extreme positive scores imply persistent, broad strength; deeply negative scores imply persistent weakness. Crossing predefined thresholds produces objective long/short events and color-coded context.
Under the hood
• Anchoring — VWAP using hlc3 × volume resets exactly when the selected period rolls:
Day → session change, Week → new week, Month → new month, Quarter/Year → calendar quarter/year.
• For-loop scoring — For lag steps i = , compare today’s VWAP to VWAP .
– If VWAP > VWAP , add +1.
– Else, add −1.
The final score ∈ , where N = (end − start + 1). With defaults (1→45), N = 45.
• Signal logic (stateful)
– Long when score > upper (e.g., > 40 with N = 45 → VWAP higher than ~89% of checked lags).
– Short on crossunder of lower (e.g., dropping below −10).
– A compact state variable ( out ) holds the current regime: +1 (long), −1 (short), otherwise unchanged. This “stickiness” avoids constant flipping between bars without sufficient evidence.
Why VWAP + a breadth score?
• VWAP aggregates both price and volume—where participants actually traded.
• The breadth-style count rewards consistency of the anchored trend, not one-off spikes.
• Thresholds give you binary structure when you need it (alerts, automation), without complex math.
What you’ll see on the chart
• Sub-pane oscillator — The for-loop score line, colored by regime (long/short/neutral).
• Main-pane VWAP (optional) — Even though the indicator runs off-chart, the anchored VWAP can be overlaid on price (toggle visibility and whether it inherits trend colors).
• Threshold guides — Horizontal lines for the long/short bands (toggle).
• Cosmetics — Optional candle painting and background shading by regime; adjustable line width and colors.
Input map (quick reference)
• VWAP Anchor Period — Day, Week, Month, Quarter, Year.
• Calculation Start/End — The for-loop lag window . With 1→45, you evaluate 45 comparisons.
• Long/Short Thresholds — Default upper=40, lower=−10 (asymmetric by design; see below).
• UI/Style — Show thresholds, paint candles, background color, line width, VWAP visibility and coloring, custom long/short colors.
Interpreting the score
• Near +N — Current anchored VWAP is above most historical VWAP checkpoints in the window → entrenched strength.
• Near −N — Current anchored VWAP is below most checkpoints → entrenched weakness.
• Between — Mixed, choppy, or transitioning regimes; use thresholds to avoid reacting to noise.
Why the asymmetric default thresholds?
• Long = score > upper (40) — Demands unusually broad upside persistence before declaring “long regime.”
• Short = crossunder lower (−10) — Triggers only on downward momentum events (a fresh breach), not merely being below −10. This combination tends to:
– Capture sustained uptrends only when they’re very strong.
– Flag downside turns as they occur, rather than waiting for an extreme negative breadth.
Tuning guide
Choose an anchor that matches your horizon
– Intraday scalps : Day anchor on intraday charts.
– Swing/position : Month or Quarter anchor on 1h/4h/D charts to capture institutional cycles.
Pick the for-loop window
– Larger N (bigger end) = stronger evidence requirement, smoother oscillator.
– Smaller N = faster, more reactive score.
Set achievable thresholds
– Ensure upper ≤ N and lower ≥ −N ; if N=30, an upper of 40 can never trigger.
– Symmetric setups (e.g., +20/−20) are fine if you want balanced behavior.
Match visuals to intent
– Enabling VWAP coloring lets you see regime directly on price.
– Background shading is useful for discretionary reading; turn it off for cleaner automation displays.
Playbook examples
• Trend confirmation with disciplined entries — On Month anchor, N=45, upper=38–42: when the long regime engages, use pullbacks toward anchored VWAP on the main pane for entries, with stops just beyond VWAP or a recent swing.
• Downside transition detection — Keep lower around −8…−12 and watch for crossunders; combine with price losing anchored VWAP to validate risk-off.
• Intraday bias filter — Day anchor on a 5–15m chart, N=20–30, upper ~ 16–20, lower ~ −6…−10. Only take longs while score is positive and above a midline you define (e.g., 0), and shorts only after a genuine crossunder.
Behavior around resets (important)
Anchored VWAP is hard-reset each period. Immediately after a reset, the series can be young and comparisons to pre-reset values may span two periods. If you prefer within-period evaluation only, choose end small enough not to bridge typical period length on your timeframe, or accept that the breadth test intentionally spans regimes.
Alerts included
• VWAP FL Long — Fires when the long condition is true (score > upper and not in short).
• VWAP FL Short — Fires on crossunder of the lower threshold (event-driven).
Messages include {{ticker}} and {{interval}} placeholders for routing.
Strengths
• Simple, transparent math — Easy to reason about and validate.
• Volume-aware by construction — Decisions reference VWAP, not just price.
• Robust to single-bar noise — Needs many lags to agree before flipping state (by design, via thresholds and the stateful output).
Limitations & cautions
• Threshold feasibility — If N < upper or |lower| > N, signals will never trigger; always cross-check N.
• Path dependence — The state variable persists until a new event; if you want frequent re-evaluation, lower thresholds or reduce N.
• Regime changes — Calendar resets can produce early ambiguity; expect a few bars for the breadth to mature.
• VWAP sensitivity to volume spikes — Large prints can tilt VWAP abruptly; that behavior is intentional in VWAP-based logic.
Suggested starting profiles
• Intraday trend bias : Anchor=Day, N=25 (1→25), upper=18–20, lower=−8, paint candles ON.
• Swing bias : Anchor=Month, N=45 (1→45), upper=38–42, lower=−10, VWAP coloring ON, background OFF.
• Balanced reactivity : Anchor=Week, N=30 (1→30), upper=20–22, lower=−10…−12, symmetric if desired.
Implementation notes
• The indicator runs in a separate pane (oscillator), but VWAP itself is drawn on price using forced overlay so you can see interactions (touches, reclaim/loss).
• HLC3 is used for VWAP price; that’s a common choice to dampen wick noise while still reflecting intrabar range.
• For-loop cap is kept modest (≤50) for performance and clarity.
How to use this responsibly
Treat the oscillator as a bias and persistence meter . Combine it with your entry framework (structure breaks, liquidity zones, higher-timeframe context) and risk controls. The design emphasizes clarity over complexity—its edge is in how strictly it demands agreement before declaring a regime, not in predicting specific turns.
Summary
VWAP For Loop distills the question “How broadly is the anchored, volume-weighted trend advancing or retreating?” into a single, thresholded score you can read at a glance, alert on, and color through your chart. With careful anchoring and thresholds sized to your window length, it becomes a pragmatic bias filter for both systematic and discretionary workflows.
samc's - Keltner OscillatorThe KELTNER CHANNEL is a widely used technical indicator developed in the 60's by Chester W. Keltner who described it in his 1960 book How To Make Money in Commodities.
so i took the logic, simplified the code and made into an oscillator.
to add a flavor of modern times you can choose among 10 different colorways themes in the settings. (so traders can adjust it for dark or light charts)
Although the initial idea was developed for stocks and commodities, I've carefully back tested this as an oscillator across FX MAJORS , MINORS and high liquidity stocks for the use case of scalping and Medium term trade ideas.
now, this indicator works successfully over all time frames, custom time frames and all assets.
This script builds on the same approach as my earlier session tool — keeping things clean, visual, and easy to read.
I intend to publish more of my work as i develop them from Beta ideas into stable scripts, and i welcome feedback.
Six Meridian Divine Swords [theUltimator5]The Six Meridian Divine Sword is a legendary martial arts technique in the classic wuxia novel “Demi-Gods and Semi-Devils” (天龙八部) by Jin Yong (金庸). The technique uses powerful internal energy (qi) to shoot invisible sword-like energy beams from the six meridians of the hand. Each of the six fingers/meridians corresponds to a “sword,” giving six different sword energies.
The Six Meridian Divine Swords indicator is a compact “signal dashboard” that fuses six classic indicators (fingers)—MACD, KDJ, RSI, LWR (Williams %R), BBI, and MTM—into one pane. Each row is a traffic-light dot (green/bullish, red/bearish, gray/neutral). When all six align, the script draws a confirmation line (“All Bullish” or “All Bearish”). It’s designed for quick consensus reads across trend, momentum, and overbought/oversold conditions.
How to Read the Dashboard
The pane has 6 horizontal rows (explained in depth later):
MACD
KDJ
RSI
LWR (Larry Williams %R)
BBI (Bull & Bear Index)
MTM (Momentum)
Each tick in the row is a dot, with sentiment identified by a color.
Green = bullish condition met
Red = bearish condition met
Gray = inside a neutral band (filtering chop), shown when Use Neutral (Gray) Colors is ON
There are two lines that track the dots on the top or bottom of the pane.
All Bullish Signal Line: appears only if all 6 are strongly bullish (default color = white)
All Bearish Signal Line: appears only if all 6 are strongly bearish (default color = fuchsia)
The Six Meridians (Indicators) — What They Mean:
1) MACD — Trend & Momentum
What it is: A trend-following momentum indicator based on the relationship between two moving averages (typically 12-EMA and 26-EMA)
Logic used: Classic MACD line (EMA12−EMA26) vs its 9-EMA signal.
Bullish: MACD > Signal and |MACD−Signal| > Neutral Threshold
Bearish: MACD < Signal and |diff| > threshold
Neutral: |diff| ≤ threshold
Why: Small crosses can whipsaw. The neutral band ignores tiny separations to reduce noise.
Inputs: Fast/Slow/Signal lengths, Neutral Threshold.
2) KDJ — Stochastic with J-line boost
What it is: A variation of the stochastic oscillator popular in Chinese trading systems
Logic used: K = SMA(Stochastic, smooth), D = SMA(K, smooth), J = 3K − 2D.
Bullish: K > D and |K−D| > 2
Bearish: K < D and |K−D| > 2
Neutral: |K−D| ≤ 2
Why: K–D separation filters tiny wiggles; J offers an “extreme” early-warning context in the value label.
Inputs: Length, Smoothing.
3) RSI — Momentum balance (0–100)
What it is: A momentum oscillator measuring speed and magnitude of price changes (0–100)
Logic used: RSI(N).
Bullish: RSI > 50 + Neutral Zone
Bearish: RSI < 50 − Neutral Zone
Neutral: Between those bands
Why: Centerline/adaptive bands (around 50) give a directional bias without relying on fixed 70/30.
Inputs: Length, Neutral Zone (± around 50).
4) LWR (Williams %R) — Overbought/Oversold
What it is: An oscillator similar to stochastic, measuring how close the close is to the high-low range over N periods
Logic used: %R over N bars (0 to −100).
Bullish: %R > −50 + Neutral Zone
Bearish: %R < −50 − Neutral Zone
Neutral: Between those bands
Why: Uses a centered band around −50 instead of only −20/−80, making it act like a directional filter.
Inputs: Length, Neutral Zone (± around −50).
5) BBI (Bull & Bear Index) — Smoothed trend bias
What it is: A composite moving average, essentially the average of several different moving averages (often 3, 6, 12, 24 periods)
Logic used: Average of 4 SMAs (3/6/12/24 by default):
BBI = (MA3 + MA6 + MA12 + MA24) / 4
Bullish: Close > BBI and |Close−BBI| > 0.2% of BBI
Bearish: Close < BBI and |diff| > threshold
Neutral: |diff| ≤ threshold
Why: Multiple MAs blended together reduce single-MA whipsaw. A dynamic 0.2% band ignores tiny drift.
Inputs: 4 lengths (default 3/6/12/24). Threshold is auto-scaled at 0.2% of BBI.
6) MTM (Momentum) — Rate of change in price
What it is: A simple measure of rate of change
Logic used: MTM = Close − Close
Bullish: MTM > 0.5% of Close
Bearish: MTM < −0.5% of Close
Neutral: |MTM| ≤ threshold
Why: A percent-based gate adapts across prices (e.g., $5 vs $500) and mutes insignificant moves.
Inputs: Length. Threshold auto-scaled to 0.5% of current Close.
Display & Inputs You Can Tweak
🎨 Use Neutral (Gray) Colors
ON (default): 3-color mode with clear “no-trade”/“weak” states.
OFF: classic binary (green/red) without neutral filtering.
TASC 2025.09 The Continuation Index
█ OVERVIEW
This script implements the "Continuation Index" as described by John F. Ehlers in the September 2025 edition of TASC's Trader's Tips . The Continuation Index uses Laguerre filters (featured in the July 2025 edition) to provide an early indication of trend direction, continuation, and exhaustion.
█ CONCEPTS
The idea for the Continuation Index was formed from an observation about Laguerre filters. In his article, Ehlers notes that when price is in trend, it tends to stay to one side of the filter. When considering smoothing, the UltimateSmoother was an obvious choice to reduce lag. With that in mind, The Continuation Index normalizes the difference between UltimateSmoother and the Laguerre filter to produce a two-state oscillator.
To minimize lag, the UltimateSmoother length in this indicator is fixed to half the length of the Laguerre filter.
█ USAGE
The Continuation Index consists of two primary states.
+1 suggests that the trader should position on the long side.
-1 suggests that the user should position on the short side.
Other readings can imply other opportunities, such as:
High Value Fluctuation could be used as a "buy the dip" opportunity.
Low Value Fluctuation could be used as a "sell the pop" opportunity.
█ INPUTS
By understanding the inputs and adjusting them as needed, each trader can benefit more from this indicator:
Gamma : Controls the Laguerre filter's response. This can be set anywhere between 0 and 1. If set to 0, the filter’s value will be the same as the UltimateSmoother.
Order : Controls the lag of the Laguerre filter, which is important when considering the timing of the system for spotting reversals. This can be set from 1 to 10, with lower values typically producing faster timing.
Length : Affects the smoothing of the display. Ehlers recommends starting with this value set to the intended amount of time you plan to hold a position. Consider your chart timeframe when setting this input. For example, on a daily chart, if you intend to hold a position for one month, set a value of 20.
Machine Learning BBPct [BackQuant]Machine Learning BBPct
What this is (in one line)
A Bollinger Band %B oscillator enhanced with a simplified K-Nearest Neighbors (KNN) pattern matcher. The model compares today’s context (volatility, momentum, volume, and position inside the bands) to similar situations in recent history and blends that historical consensus back into the raw %B to reduce noise and improve context awareness. It is informational and diagnostic—designed to describe market state, not to sell a trading system.
Background: %B in plain terms
Bollinger %B measures where price sits inside its dynamic envelope: 0 at the lower band, 1 at the upper band, ~ 0.5 near the basis (the moving average). Readings toward 1 indicate pressure near the envelope’s upper edge (often strength or stretch), while readings toward 0 indicate pressure near the lower edge (often weakness or stretch). Because bands adapt to volatility, %B is naturally comparable across regimes.
Why add (simplified) KNN?
Classic %B is reactive and can be whippy in fast regimes. The simplified KNN layer builds a “nearest-neighbor memory” of recent market states and asks: “When the market looked like this before, where did %B tend to be next bar?” It then blends that estimate with the current %B. Key ideas:
• Feature vector . Each bar is summarized by up to five normalized features:
– %B itself (normalized)
– Band width (volatility proxy)
– Price momentum (ROC)
– Volume momentum (ROC of volume)
– Price position within the bands
• Distance metric . Euclidean distance ranks the most similar recent bars.
• Prediction . Average the neighbors’ prior %B (lagged to avoid lookahead), inverse-weighted by distance.
• Blend . Linearly combine raw %B and KNN-predicted %B with a configurable weight; optional filtering then adapts to confidence.
This remains “simplified” KNN: no training/validation split, no KD-trees, no scaling beyond windowed min-max, and no probabilistic calibration.
How the script is organized (by input groups)
1) BBPct Settings
• Price Source – Which price to evaluate (%B is computed from this).
• Calculation Period – Lookback for SMA basis and standard deviation.
• Multiplier – Standard deviation width (e.g., 2.0).
• Apply Smoothing / Type / Length – Optional smoothing of the %B stream before ML (EMA, RMA, DEMA, TEMA, LINREG, HMA, etc.). Turning this off gives you the raw %B.
2) Thresholds
• Overbought/Oversold – Default 0.8 / 0.2 (inside ).
• Extreme OB/OS – Stricter zones (e.g., 0.95 / 0.05) to flag stretch conditions.
3) KNN Machine Learning
• Enable KNN – Switch between pure %B and hybrid.
• K (neighbors) – How many historical analogs to blend (default 8).
• Historical Period – Size of the search window for neighbors.
• ML Weight – Blend between raw %B and KNN estimate.
• Number of Features – Use 2–5 features; higher counts add context but raise the risk of overfitting in short windows.
4) Filtering
• Method – None, Adaptive, Kalman-style (first-order),
or Hull smoothing.
• Strength – How aggressively to smooth. “Adaptive” uses model confidence to modulate its alpha: higher confidence → stronger reliance on the ML estimate.
5) Performance Tracking
• Win-rate Period – Simple running score of past signal outcomes based on target/stop/time-out logic (informational, not a robust backtest).
• Early Entry Lookback – Horizon for forecasting a potential threshold cross.
• Profit Target / Stop Loss – Used only by the internal win-rate heuristic.
6) Self-Optimization
• Enable Self-Optimization – Lightweight, rolling comparison of a few canned settings (K = 8/14/21 via simple rules on %B extremes).
• Optimization Window & Stability Threshold – Governs how quickly preferred K changes and how sensitive the overfitting alarm is.
• Adaptive Thresholds – Adjust the OB/OS lines with volatility regime (ATR ratio), widening in calm markets and tightening in turbulent ones (bounded 0.7–0.9 and 0.1–0.3).
7) UI Settings
• Show Table / Zones / ML Prediction / Early Signals – Toggle informational overlays.
• Signal Line Width, Candle Painting, Colors – Visual preferences.
Step-by-step logic
A) Compute %B
Basis = SMA(source, len); dev = stdev(source, len) × multiplier; Upper/Lower = Basis ± dev.
%B = (price − Lower) / (Upper − Lower). Optional smoothing yields standardBB .
B) Build the feature vector
All features are min-max normalized over the KNN window so distances are in comparable units. Features include normalized %B, normalized band width, normalized price ROC, normalized volume ROC, and normalized position within bands. You can limit to the first N features (2–5).
C) Find nearest neighbors
For each bar inside the lookback window, compute the Euclidean distance between current features and that bar’s features. Sort by distance, keep the top K .
D) Predict and blend
Use inverse-distance weights (with a strong cap for near-zero distances) to average neighbors’ prior %B (lagged by one bar). This becomes the KNN estimate. Blend it with raw %B via the ML weight. A variance of neighbor %B around the prediction becomes an uncertainty proxy ; combined with a stability score (how long parameters remain unchanged), it forms mlConfidence ∈ . The Adaptive filter optionally transforms that confidence into a smoothing coefficient.
E) Adaptive thresholds
Volatility regime (ATR(14) divided by its 50-bar SMA) nudges OB/OS thresholds wider or narrower within fixed bounds. The aim: comparable extremeness across regimes.
F) Early entry heuristic
A tiny two-step slope/acceleration probe extrapolates finalBB forward a few bars. If it is on track to cross OB/OS soon (and slope/acceleration agree), it flags an EARLY_BUY/SELL candidate with an internal confidence score. This is explicitly a heuristic—use as an attention cue, not a signal by itself.
G) Informational win-rate
The script keeps a rolling array of trade outcomes derived from signal transitions + rudimentary exits (target/stop/time). The percentage shown is a rough diagnostic , not a validated backtest.
Outputs and visual language
• ML Bollinger %B (finalBB) – The main line after KNN blending and optional filtering.
• Gradient fill – Greenish tones above 0.5, reddish below, with intensity following distance from the midline.
• Adaptive zones – Overbought/oversold and extreme bands; shaded backgrounds appear at extremes.
• ML Prediction (dots) – The KNN estimate plotted as faint circles; becomes bright white when confidence > 0.7.
• Early arrows – Optional small triangles for approaching OB/OS.
• Candle painting – Light green above the midline, light red below (optional).
• Info panel – Current value, signal classification, ML confidence, optimized K, stability, volatility regime, adaptive thresholds, overfitting flag, early-entry status, and total signals processed.
Signal classification (informational)
The indicator does not fire trade commands; it labels state:
• STRONG_BUY / STRONG_SELL – finalBB beyond extreme OS/OB thresholds.
• BUY / SELL – finalBB beyond adaptive OS/OB.
• EARLY_BUY / EARLY_SELL – forecast suggests a near-term cross with decent internal confidence.
• NEUTRAL – between adaptive bands.
Alerts (what you can automate)
• Entering adaptive OB/OS and extreme OB/OS.
• Midline cross (0.5).
• Overfitting detected (frequent parameter flipping).
• Early signals when early confidence > 0.7.
These are purely descriptive triggers around the indicator’s state.
Practical interpretation
• Mean-reversion context – In range markets, adaptive OS/OB with ML smoothing can reduce whipsaws relative to raw %B.
• Trend context – In persistent trends, the KNN blend can keep finalBB nearer the mid/upper region during healthy pullbacks if history supports similar contexts.
• Regime awareness – Watch the volatility regime and adaptive thresholds. If thresholds compress (high vol), “OB/OS” comes sooner; if thresholds widen (calm), it takes more stretch to flag.
• Confidence as a weight – High mlConfidence implies neighbors agree; you may rely more on the ML curve. Low confidence argues for de-emphasizing ML and leaning on raw %B or other tools.
• Stability score – Rising stability indicates consistent parameter selection and fewer flips; dropping stability hints at a shifting backdrop.
Methodological notes
• Normalization uses rolling min-max over the KNN window. This is simple and scale-agnostic but sensitive to outliers; the distance metric will reflect that.
• Distance is unweighted Euclidean. If you raise featureCount, you increase dimensionality; consider keeping K larger and lookback ample to avoid sparse-neighbor artifacts.
• Lag handling intentionally uses neighbors’ previous %B for prediction to avoid lookahead bias.
• Self-optimization is deliberately modest: it only compares a few canned K/threshold choices using simple “did an extreme anticipate movement?” scoring, then enforces a stability regime and an overfitting guard. It is not a grid search or GA.
• Kalman option is a first-order recursive filter (fixed gain), not a full state-space estimator.
• Hull option derives a dynamic length from 1/strength; it is a convenience smoothing alternative.
Limitations and cautions
• Non-stationarity – Nearest neighbors from the recent window may not represent the future under structural breaks (policy shifts, liquidity shocks).
• Curse of dimensionality – Adding features without sufficient lookback can make genuine neighbors rare.
• Overfitting risk – The script includes a crude overfitting detector (frequent parameter flips) and will fall back to defaults when triggered, but this is only a guardrail.
• Win-rate display – The internal score is illustrative; it does not constitute a tradable backtest.
• Latency vs. smoothness – Smoothing and ML blending reduce noise but add lag; tune to your timeframe and objectives.
Tuning guide
• Short-term scalping – Lower len (10–14), slightly lower multiplier (1.8–2.0), small K (5–8), featureCount 3–4, Adaptive filter ON, moderate strength.
• Swing trading – len (20–30), multiplier ~2.0, K (8–14), featureCount 4–5, Adaptive thresholds ON, filter modest.
• Strong trends – Consider higher adaptive_upper/lower bounds (or let volatility regime do it), keep ML weight moderate so raw %B still reflects surges.
• Chop – Higher ML weight and stronger Adaptive filtering; accept lag in exchange for fewer false extremes.
How to use it responsibly
Treat this as a state descriptor and context filter. Pair it with your execution signals (structure breaks, volume footprints, higher-timeframe bias) and risk management. If mlConfidence is low or stability is falling, lean less on the ML line and more on raw %B or external confirmation.
Summary
Machine Learning BBPct augments a familiar oscillator with a transparent, simplified KNN memory of recent conditions. By blending neighbors’ behavior into %B and adapting thresholds to volatility regime—while exposing confidence, stability, and a plain early-entry heuristic—it provides an informational, probability-minded view of stretch and reversion that you can interpret alongside your own process.
MTF Oscillator Stack [BigBeluga]🔵 OVERVIEW
The MTF Oscillator Stack brings powerful multi-timeframe momentum analysis directly into your price chart. You can select one oscillator— RSI , MFI , or Stochastic RSI —and display it across up to 4 different timeframes. Each panel is neatly stacked horizontally above price , offering quick insight into cross-timeframe conditions like trend direction, exhaustion zones, and momentum shifts.
🔵 CONCEPTS
Single Oscillator Mode: Select one oscillator type (RSI, MFI, or Stoch RSI) to analyze across all selected timeframes.
Top-Chart Horizontal Panels: Oscillator plots are aligned horizontally at the top of the chart for seamless top-down reading.
Signal Comparison Arrows: Arrows (🢁 / 🢃) indicate oscillator position relative to its signal line.
Overbought/Oversold Zones: Transparent 30–70 fill zones highlight key reversal areas.
Dynamic Display Logic: Only enabled panels are shown; spacing adjusts based on active timeframes.
Timeframe Tagging: Each oscillator panel is labeled with its corresponding timeframe (e.g., 1H, 2H, 4H).
🔵 FEATURES
Choose one oscillator (RSI, MFI, or Stoch RSI) and apply it across up to 4 timeframes.
Each oscillator panel includes: price-synced plot, signal line, and zone shading.
Scale alignment allows users to place charts at the bottom or top.
Clear arrow signals show whether oscillator is bullish or bearish.
Individual length and signal settings per timeframe.
Toggle for alignment mode: evenly spaced or floating layout.
All panels use a consistent layout for faster decision-making.
🔵 HOW TO USE
Select your preferred oscillator and activate 2–4 key timeframes (e.g., 1H, 4H, D1, W1).
Use signal crossovers as a bullish (🢁) or bearish (🢃) trend cue.
Look for aligned extremes (e.g., all timeframes overbought) to spot momentum exhaustion.
Ideal for momentum confluence strategies and top-down confirmation.
Use horizontal layout to stay focused on price while assessing broader structure.
🔵 CONCLUSION
MTF Oscillator Stack simplifies complex multi-timeframe momentum analysis into one clean, actionable visual. Whether you're tracking RSI, MFI, or Stoch RSI, this tool helps you stay aligned with the broader trend—without ever leaving your main chart.
CNS - Multi-Timeframe Bollinger Band OscillatorMy hope is to optimize the settings for this indicator and reintroduce it as a "strategy" with suggested position entry and exit points shown in the price pane.
I’ve been having good results setting the “Bollinger Band MA Length” in the Input tab to between 5 and 10. You can use the standard 20 period, but your results will not be as granular.
This indicator has proven very good at finding local tops and bottoms by combining data from multiple timeframes. Use BB timeframes that are lower than the timeframe you are viewing in your price pane.
The default settings work best on the weekly timeframe, but can be adjusted for most timeframes including intraday.
Be cognizant that the indicator, like other oscillators, does occasionally produce divergences at tops and bottoms.
Any feedback is appreciated.
Overview
This indicator is an oscillator that measures the normalized position of the price relative to Bollinger Bands across multiple timeframes. It takes the price's position within the Bollinger Bands (calculated on different timeframes) and averages those positions to create a single value that oscillates between 0 and 1. This value is then plotted as the oscillator, with reference lines and colored regions to help interpret the price's relative strength or weakness.
How It Works
Bollinger Band Calculation:
The indicator uses a custom function f_getBBPosition() to calculate the position of the price within Bollinger Bands for a given timeframe.
Price Position Normalization:
For each timeframe, the function normalizes the price's position between the upper and lower Bollinger Bands.
It calculates three positions based on the high, low, and close prices of the requested timeframe:
pos_high = (High - Lower Band) / (Upper Band - Lower Band)
pos_low = (Low - Lower Band) / (Upper Band - Lower Band)
pos_close = (Close - Lower Band) / (Upper Band - Lower Band)
If the upper band is not greater than the lower band or if the data is invalid (e.g., na), it defaults to 0.5 (the midline).
The average of these three positions (avg_pos) represents the normalized position for that timeframe, ranging from 0 (at the lower band) to 1 (at the upper band).
Multi-Timeframe Averaging:
The indicator fetches Bollinger Band data from four customizable timeframes (default: 30min, 60min, 240min, daily) using request.security() with lookahead=barmerge.lookahead_on to get the latest available data.
It calculates the normalized position (pos1, pos2, pos3, pos4) for each timeframe using f_getBBPosition().
These four positions are then averaged to produce the final avg_position:avg_position = (pos1 + pos2 + pos3 + pos4) / 4
This average is the oscillator value, which is plotted and typically oscillates between 0 and 1.
Moving Averages:
Two optional moving averages (MA1 and MA2) of the avg_position can be enabled, calculated using simple moving averages (ta.sma) with customizable lengths (default: 5 and 10).
These can be potentially used for MA crossover strategies.
What Is Being Averaged?
The oscillator (avg_position) is the average of the normalized price positions within the Bollinger Bands across the four selected timeframes. Specifically:It averages the avg_pos values (pos1, pos2, pos3, pos4) calculated for each timeframe.
Each avg_pos is itself an average of the normalized positions of the high, low, and close prices relative to the Bollinger Bands for that timeframe.
This multi-timeframe averaging smooths out short-term fluctuations and provides a broader perspective on the price's position within the volatility bands.
Interpretation
0.0 The price is at or below the lower Bollinger Band across all timeframes (indicating potential oversold conditions).
0.15: A customizable level (green band) which can be used for exiting short positions or entering long positions.
0.5: The midline, where the price is at the average of the Bollinger Bands (neutral zone).
0.85: A customizable level (orange band) which can be used for exiting long positions or entering short positions.
1.0: The price is at or above the upper Bollinger Band across all timeframes (indicating potential overbought conditions).
The colored regions and moving averages (if enabled) help identify trends or crossovers for trading signals.
Example
If the 30min timeframe shows the close at the upper band (position = 1.0), the 60min at the midline (position = 0.5), the 240min at the lower band (position = 0.0), and the daily at the upper band (position = 1.0), the avg_position would be:(1.0 + 0.5 + 0.0 + 1.0) / 4 = 0.625
This value (0.625) would plot in the orange region (between 0.85 and 0.5), suggesting the price is relatively strong but not at an extreme.
Notes
The use of lookahead=barmerge.lookahead_on ensures the indicator uses the latest available data, making it more real-time, though its effectiveness depends on the chart timeframe and TradingView's data feed.
The indicator’s sensitivity can be adjusted by changing bb_length ("Bollinger Band MA Length" in the Input tab), bb_mult ("Bollinger Band Standard Deviation," also in the Input tab), or the selected timeframes.
Multi-Timeframe Bollinger BandsMy hope is to optimize the settings for this indicator and reintroduce it as a "strategy" with suggested position entry and exit points shown in the price pane.
I’ve been having good results setting the “Bollinger Band MA Length” in the Input tab to between 5 and 10. You can use the standard 20 period, but your results will not be as granular.
This indicator has proven very good at finding local tops and bottoms by combining data from multiple timeframes. Use timeframes that are lower than the timeframe you are viewing in your price pane. Be cognizant that the indicator, like other oscillators, does occasionally produce divergences at tops and bottoms.
Any feedback is appreciated.
Overview
This indicator is an oscillator that measures the normalized position of the price relative to Bollinger Bands across multiple timeframes. It takes the price's position within the Bollinger Bands (calculated on different timeframes) and averages those positions to create a single value that oscillates between 0 and 1. This value is then plotted as the oscillator, with reference lines and colored regions to help interpret the price's relative strength or weakness.
How It Works
Bollinger Band Calculation:
The indicator uses a custom function f_getBBPosition() to calculate the position of the price within Bollinger Bands for a given timeframe.
Price Position Normalization:
For each timeframe, the function normalizes the price's position between the upper and lower Bollinger Bands.
It calculates three positions based on the high, low, and close prices of the requested timeframe:
pos_high = (High - Lower Band) / (Upper Band - Lower Band)
pos_low = (Low - Lower Band) / (Upper Band - Lower Band)
pos_close = (Close - Lower Band) / (Upper Band - Lower Band)
If the upper band is not greater than the lower band or if the data is invalid (e.g., na), it defaults to 0.5 (the midline).
The average of these three positions (avg_pos) represents the normalized position for that timeframe, ranging from 0 (at the lower band) to 1 (at the upper band).
Multi-Timeframe Averaging:
The indicator fetches Bollinger Band data from four customizable timeframes (default: 30min, 60min, 240min, daily) using request.security() with lookahead=barmerge.lookahead_on to get the latest available data.
It calculates the normalized position (pos1, pos2, pos3, pos4) for each timeframe using f_getBBPosition().
These four positions are then averaged to produce the final avg_position:avg_position = (pos1 + pos2 + pos3 + pos4) / 4
This average is the oscillator value, which is plotted and typically oscillates between 0 and 1.
Moving Averages:
Two optional moving averages (MA1 and MA2) of the avg_position can be enabled, calculated using simple moving averages (ta.sma) with customizable lengths (default: 5 and 10).
These can be potentially used for MA crossover strategies.
What Is Being Averaged?
The oscillator (avg_position) is the average of the normalized price positions within the Bollinger Bands across the four selected timeframes. Specifically:It averages the avg_pos values (pos1, pos2, pos3, pos4) calculated for each timeframe.
Each avg_pos is itself an average of the normalized positions of the high, low, and close prices relative to the Bollinger Bands for that timeframe.
This multi-timeframe averaging smooths out short-term fluctuations and provides a broader perspective on the price's position within the volatility bands.
Interpretation
0.0 The price is at or below the lower Bollinger Band across all timeframes (indicating potential oversold conditions).
0.15: A customizable level (green band) which can be used for exiting short positions or entering long positions.
0.5: The midline, where the price is at the average of the Bollinger Bands (neutral zone).
0.85: A customizable level (orange band) which can be used for exiting long positions or entering short positions.
1.0: The price is at or above the upper Bollinger Band across all timeframes (indicating potential overbought conditions).
The colored regions and moving averages (if enabled) help identify trends or crossovers for trading signals.
Example
If the 30min timeframe shows the close at the upper band (position = 1.0), the 60min at the midline (position = 0.5), the 240min at the lower band (position = 0.0), and the daily at the upper band (position = 1.0), the avg_position would be:(1.0 + 0.5 + 0.0 + 1.0) / 4 = 0.625
This value (0.625) would plot in the orange region (between 0.85 and 0.5), suggesting the price is relatively strong but not at an extreme.
Notes
The use of lookahead=barmerge.lookahead_on ensures the indicator uses the latest available data, making it more real-time, though its effectiveness depends on the chart timeframe and TradingView's data feed.
The indicator’s sensitivity can be adjusted by changing bb_length ("Bollinger Band MA Length" in the Input tab), bb_mult ("Bollinger Band Standard Deviation," also in the Input tab), or the selected timeframes.
Multi-Timeframe Bollinger Band PositionBeta version.
My hope is to optimize the settings for this indicator and reintroduce it as a "strategy" with suggested position entry and exit points shown in the price pane.
Any feedback is appreciated.
Overview
This indicator is an oscillator that measures the normalized position of the price relative to Bollinger Bands across multiple timeframes. It takes the price's position within the Bollinger Bands (calculated on different timeframes) and averages those positions to create a single value that oscillates between 0 and 1. This value is then plotted as the oscillator, with reference lines and colored regions to help interpret the price's relative strength or weakness.
How It Works
Bollinger Band Calculation:
The indicator uses a custom function f_getBBPosition() to calculate the position of the price within Bollinger Bands for a given timeframe.
Price Position Normalization:
For each timeframe, the function normalizes the price's position between the upper and lower Bollinger Bands.
It calculates three positions based on the high, low, and close prices of the requested timeframe:
pos_high = (High - Lower Band) / (Upper Band - Lower Band)
pos_low = (Low - Lower Band) / (Upper Band - Lower Band)
pos_close = (Close - Lower Band) / (Upper Band - Lower Band)
If the upper band is not greater than the lower band or if the data is invalid (e.g., na), it defaults to 0.5 (the midline).
The average of these three positions (avg_pos) represents the normalized position for that timeframe, ranging from 0 (at the lower band) to 1 (at the upper band).
Multi-Timeframe Averaging:
The indicator fetches Bollinger Band data from four customizable timeframes (default: 30min, 60min, 240min, daily) using request.security() with lookahead=barmerge.lookahead_on to get the latest available data.
It calculates the normalized position (pos1, pos2, pos3, pos4) for each timeframe using f_getBBPosition().
These four positions are then averaged to produce the final avg_position:avg_position = (pos1 + pos2 + pos3 + pos4) / 4
This average is the oscillator value, which is plotted and typically oscillates between 0 and 1.
Moving Averages:
Two optional moving averages (MA1 and MA2) of the avg_position can be enabled, calculated using simple moving averages (ta.sma) with customizable lengths (default: 5 and 10).
These can be potentially used for MA crossover strategies.
What Is Being Averaged?
The oscillator (avg_position) is the average of the normalized price positions within the Bollinger Bands across the four selected timeframes. Specifically:It averages the avg_pos values (pos1, pos2, pos3, pos4) calculated for each timeframe.
Each avg_pos is itself an average of the normalized positions of the high, low, and close prices relative to the Bollinger Bands for that timeframe.
This multi-timeframe averaging smooths out short-term fluctuations and provides a broader perspective on the price's position within the volatility bands.
Interpretation:
0.0 The price is at or below the lower Bollinger Band across all timeframes (indicating potential oversold conditions).
0.15: A customizable level (green band) which can be used for exiting short positions or entering long positions.
0.5: The midline, where the price is at the average of the Bollinger Bands (neutral zone).
0.85: A customizable level (orange band) which can be used for exiting long positions or entering short positions.
1.0: The price is at or above the upper Bollinger Band across all timeframes (indicating potential overbought conditions).
The colored regions and moving averages (if enabled) help identify trends or crossovers for trading signals.
Example:
If the 30min timeframe shows the close at the upper band (position = 1.0), the 60min at the midline (position = 0.5), the 240min at the lower band (position = 0.0), and the daily at the upper band (position = 1.0), the avg_position would be:(1.0 + 0.5 + 0.0 + 1.0) / 4 = 0.625
This value (0.625) would plot in the orange region (between 0.85 and 0.5), suggesting the price is relatively strong but not at an extreme.
Notes:
The use of lookahead=barmerge.lookahead_on ensures the indicator uses the latest available data, making it more real-time, though its effectiveness depends on the chart timeframe and TradingView's data feed.
The indicator’s sensitivity can be adjusted by changing bb_length ("Bollinger Band MA Length" in the Input tab), bb_mult ("Bollinger Band Standard Deviation," also in the Input tab), or the selected timeframes.
Screener based on Profitunity strategy for multiple timeframes
Screener based on Profitunity strategy by Bill Williams for multiple timeframes (max 5, including chart timeframe) and customizable symbol list. The screener analyzes the Alligator and Awesome Oscillator indicators, Divergent bars and high volume bars.
The maximum allowed number of requests (symbols and timeframes) is limited to 40 requests, for example, for 10 symbols by 4 requests of different timeframes. Therefore, the indicator automatically limits the number of displayed symbols depending on the number of timeframes for each symbol, if there are more symbols than are displayed in the screener table, then the ordinal numbers are displayed to the left of the symbols, in this case you can display the next group of symbols by increasing the value by 1 in the "Show tickers from" field, if the "Group" field is enabled, or specify the symbol number by 1 more than the last symbol in the screener table. 👀 When timeframe filtering is applied, the screener table displays only the columns of those timeframes for which the filtering value is selected, which allows displaying more symbols.
For each timeframe, in the "TIMEFRAMES > Prev" field, you can enable the display of data for the previous bar relative to the last (current) one, if the market is open for the requested symbol. In the "TIMEFRAMES > Y" field, you can enable filtering depending on the location of the last five bars relative to the Alligator indicator lines, which are designated by special symbols in the screener table:
⬆️ — if the Alligator is open upwards (Lips > Teeth > Jaw) and none of the bars is closed below the Lips line;
↗️ — if one of the bars, except for the penultimate one, is closed below Lips, or two bars, except for the last one, are closed below Lips, or the Alligator is open upwards only below four bars, but none of the bars is closed below Lips;
⬇️ — if the Alligator is open downwards (Lips < Teeth < Jaw), but none of the bars is closed above Lips;
↘️ — if one of the bars, except the penultimate one, is closed above the Lips, or two bars, except the last one, are closed above the Lips, or the Alligator is open down only above four bars, but none of the bars are closed above the Lips;
➡️ — in other cases, including when the Alligator lines intersect and one of the bars is closed behind the Lips line or two bars intersect one of the Alligator lines.
In the "TIMEFRAMES > Show bar change value for TF" field, you can add a column to the right of the selected timeframe column with the percentage change between the closing price of the last bar (current) and the closing price of the previous bar ((close – previous close) / previous close * 100). Depending on the percentage value, the background color of the screener table cell will change: dark red if <= -3%; red if <= -2%, light red if <= -0.5%; dark green if >= 3%; green if >= 2%; light green if >= 0.5%.
For each timeframe, the screener table displays the symbol of the latest (current) bar, depending on the closing price relative to the bar's midpoint ((high + low) / 2) and its location relative to the Alligator indicator lines: ⎾ — the bar's closing price is above its midpoint; ⎿ — the bar's closing price is below its midpoint; ├ — the bar's closing price is equal to its midpoint; 🟢 — Bullish Divergent bar, i.e. the bar's closing price is above its midpoint, the bar's high is below all Alligator lines, the bar's low is below the previous bar's low; 🔴 — Bearish Divergent bar, i.e. the bar's closing price is below its midpoint, the bar's low is above all Alligator lines, the bar's high is above the previous bar's high. When filtering is enabled in the "TIMEFRAMES > Filtering by Divergent bar" field, the data in the screener table cells will be displayed only for those timeframes that have a Divergent bar. A high bar volume signal is also displayed — 📶/📶² if the bar volume is greater than 40%/70% of the average volume value calculated using a simple moving average (SMA) in the 140 bar interval from the last bar.
In the indicator settings in the "SYMBOL LIST" field, each ticker (for example: OANDA:SPX500USD) must be on a separate line. If the market is closed, then the data for requested symbols will be limited to the time of the last (current) bar on the chart, for example, if the current symbol was traded yesterday, and the requested symbol is traded today, when requesting data for an hourly timeframe, the last bar will be for yesterday, if the timeframe of the current chart is not higher than 1 day. Therefore, by default, a warning will be displayed on the chart instead of the screener table that if the market is open, you must wait for the screener to load (after the first price change on the current chart), or if the highest timeframe in the screener is 1 day, you will be prompted to change the timeframe on the current chart to 1 week, if the screener requests data for the timeframe of 1 week, you will be prompted to change the timeframe on the current chart to 1 month, or switch to another symbol on the current chart for which the market is open (for example: BINANCE:BTCUSDT), or disable the warning in the field "SYMBOL LIST > Do not display screener if market is close".
The number of the last columns with the color of the AO indicator that will be displayed in the screener table for each timeframe is specified in the indicator settings in the "AWESOME OSCILLATOR > Number of columns" field.
For each timeframe, the direction of the trend between the price of the highest and lowest bars in the specified range of bars from the last bar is displayed — ↑ if the trend is up (the highest bar is to the right of the lowest), or ↓ if the trend is down (the lowest bar is to the right of the highest). If there is a divergence on the AO indicator in the specified interval, the symbol ∇ is also displayed. The average volume value is also calculated in the specified interval using a simple moving average (SMA). The number of bars is set in the indicator settings in the "INTERVAL FOR HIGHEST AND LOWEST BARS > Bars count" field.
In the indicator settings in the "STYLE" field you can change the position of the screener table relative to the chart window, the background color, the color and size of the text.
***
Скринер на основе стратегии Profitunity Билла Вильямса для нескольких таймфреймов (максимум 5, включая таймфрейм графика) и настраиваемого списка символов. Скринер анализирует индикаторы Alligator и Awesome Oscillator, Дивергентные бары и бары с высоким объемом.
Максимально допустимое количество запросов (символы и таймфреймы) ограничено 40 запросами, например, для 10 символов по 4 запроса разных таймфреймов. Поэтому в индикаторе автоматически ограничивается количество отображаемых символов в зависимости от количества таймфреймов для каждого символа, если символов больше чем отображено в таблице скринера, то слева от символов отображаются порядковые номера, в таком случае можно отобразить следующую группу символов, увеличив значение на 1 в настройках индикатора поле "Show tickers from", если включено поле "Group", или указать номер символа на 1 больше, чем последний символ в таблице скринера. 👀 Когда применяется фильтрация по таймфрейму, в таблице скринера отображаются только столбцы тех таймфреймов, для которых выбрано значение фильтрации, что позволяет отображать большее количество символов.
Для каждого таймфрейма в настройках индикатора в поле "TIMEFRAMES > Prev" можно включить отображение данных для предыдущего бара относительно последнего (текущего), если для запрашиваемого символа рынок открыт. В поле "TIMEFRAMES > Y" можно включить фильтрацию, в зависимости от расположения последних пяти баров относительно линий индикатора Alligator, которые обозначаются специальными символами в таблице скринера:
⬆️ — если Alligator открыт вверх (Lips > Teeth > Jaw) и ни один из баров не закрыт ниже линии Lips;
↗️ — если один из баров, кроме предпоследнего, закрыт ниже Lips, или два бара, кроме последнего, закрыты ниже Lips, или Alligator открыт вверх только ниже четырех баров, но ни один из баров не закрыт ниже Lips;
⬇️ — если Alligator открыт вниз (Lips < Teeth < Jaw), но ни один из баров не закрыт выше Lips;
↘️ — если один из баров, кроме предпоследнего, закрыт выше Lips, или два бара, кроме последнего, закрыты выше Lips, или Alligator открыт вниз только выше четырех баров, но ни один из баров не закрыт выше Lips;
➡️ — в остальных случаях, в то числе когда линии Alligator пересекаются и один из баров закрыт за линией Lips или два бара пересекают одну из линий Alligator.
В поле "TIMEFRAMES > Show bar change value for TF" можно добавить справа от выбранного столбца таймфрейма столбец с процентным изменением между ценой закрытия последнего бара (текущего) и ценой закрытия предыдущего бара ((close – previous close) / previous close * 100). В зависимости от величины процента будет меняться цвет фона ячейки таблицы скринера: темно-красный, если <= -3%; красный, если <= -2%, светло-красный, если <= -0.5%; темно-зеленый, если >= 3%; зеленый, если >= 2%; светло-зеленый, если >= 0.5%.
Для каждого таймфрейма в таблице скринера отображается символ последнего (текущего) бара, в зависимости от цены закрытия относительно середины бара ((high + low) / 2) и расположения относительно линий индикатора Alligator: ⎾ — цена закрытия бара выше его середины; ⎿ — цена закрытия бара ниже его середины; ├ — цена закрытия бара равна его середине; 🟢 — Бычий Дивергентный бар, т.е. цена закрытия бара выше его середины, максимум бара ниже всех линий Alligator, минимум бара ниже минимума предыдущего бара; 🔴 — Медвежий Дивергентный бар, т.е. цена закрытия бара ниже его середины, минимум бара выше всех линий Alligator, максимум бара выше максимума предыдущего бара. При включении фильтрации в поле "TIMEFRAMES > Filtering by Divergent bar" данные в ячейках таблицы скринера будут отображаться только для тех таймфреймов, где есть Дивергентный бар. Также отображается сигнал высокого объема бара — 📶/📶², если объем бара больше чем на 40%/70% среднего значения объема, рассчитанного с помощью простой скользящей средней (SMA) в интервале 140 баров от последнего бара.
В настройках индикатора в поле "SYMBOL LIST" каждый тикер (например: OANDA:SPX500USD) должен быть на отдельной строке. Если рынок закрыт, то данные для запрашиваемых символов будут ограничены временем последнего (текущего) бара на графике, например, если текущий символ торговался последний день вчера, а запрашиваемый символ торгуется сегодня, при запросе данных для часового таймфрейма, последний бар будет за вчерашний день, если таймфрейм текущего графика не выше 1 дня. Поэтому по умолчанию на графике будет отображаться предупреждение вместо таблицы скринера о том, что если рынок открыт, то необходимо дождаться загрузки скринера (после первого изменения цены на текущем графике), или если в скринере самый высокий таймфрейм 1 день, то будет предложено изменить на текущем графике таймфрейм на 1 неделю, если в скринере запрашиваются данные для таймфрейма 1 неделя, то будет предложено изменить на текущем графике таймфрейм на 1 месяц, или же переключиться на другой символ на текущем графике, для которого рынок открыт (например: BINANCE:BTCUSDT), или отключить предупреждение в поле "SYMBOL LIST > Do not display screener if market is close".
Количество последних столбцов с цветом индикатора AO, которые будут отображены в таблице скринера для каждого таймфрейма, указывается в настройках индикатора в поле "AWESOME OSCILLATOR > Number of columns".
Для каждого таймфрейма отображается направление тренда между ценой самого высокого и самого низкого баров в указанном интервале баров от последнего бара — ↑, если тренд направлен вверх (самый высокий бар справа от самого низкого), или ↓, если тренд направлен вниз (самый низкий бар справа от самого высокого). Если есть дивергенция на индикаторе AO в указанном интервале, то также отображается символ — ∇. В указанном интервале также рассчитывается среднее значение объема с помощью простой скользящей средней (SMA). Количество баров устанавливается в настройках индикатора в поле "INTERVAL FOR HIGHEST AND LOWEST BARS > Bars count".
В настройках индикатора в поле "STYLE" можно изменить положение таблицы скринера относительно окна графика, цвет фона, цвет и размер текста.
Capiba Custom RSI with Divergences v2
🇬🇧 English
Summary
This indicator is an enhanced and customizable version of the classic RSI, designed to provide clearer and more powerful trading signals. It combines an alternative, more price-sensitive RSI calculation with an automatic divergence detection, which is one of the most effective tools for predicting trend reversals and finding high-probability entry and exit points.
Built upon the compilation of knowledge and open-source codes from the community, this script has been refined to be an all-in-one tool for traders who base their strategies on momentum and trend exhaustion.
Key Features and How to Use
Ultimate RSI and Signal Line (Momentum)
What it is: The main indicator (white line) is an RSI variation that reacts more dynamically to changes in price volatility. It is accompanied by a signal line (orange, by default), which is a moving average of the RSI itself, serving to smooth the indicator and generate crossover signals.
How to use for Entries/Exits:
Buy Signal (Short-Term): Crossover of the RSI line (white) above the signal line (orange).
Sell Signal (Short-Term): Crossover of the RSI line (white) below the signal line (orange). These are momentum signals, ideal for confirming a trend or for scalping.
Automatic Divergence Detection (Reversal Signals) This is the most powerful feature of the indicator. A divergence occurs when the price moves in one direction and the momentum indicator moves in the opposite direction, signaling a likely exhaustion of the current trend.
Bullish Divergence (Green Line):
What it is: The price makes a lower low, but the RSI makes a higher low.
Meaning: Selling pressure is decreasing. It is a strong signal of a potential market bottom and an excellent entry opportunity for a long position.
Bearish Divergence (Red Line):
What it is: The price makes a higher high, but the RSI makes a lower high.
Meaning: Buying pressure is losing strength. It is a strong signal of a potential market top and an excellent exit opportunity for a long position or an entry for a short position.
Customizable Overbought & Oversold Levels
The horizontal lines (default 80 and 20) and the colored areas show when the asset is overextended to the upside (overbought) or downside (oversold), helping to contextualize the divergence and crossover signals.
Recommended Strategy
For maximum effectiveness, combine the signals:
High-Probability Entry (Buy): Look for a Bullish Divergence (green line) forming in the oversold zone. Confirm the entry when the RSI line crosses above its signal line.
High-Probability Exit (Sell): Look for a Bearish Divergence (red line) forming in the overbought zone. Confirm the exit or new short entry when the RSI line crosses below its signal line.
Acknowledgements
This indicator was developed by compiling and customizing excellent open-source ideas and codes shared by the TradingView community. Special thanks to everyone who contributes to the advancement of technical analysis.
BUY-SIGNAL Pro - 10 Indicators - Strategy Godinho 2Best 10 indicators
Strong buy YELLOW
Buy GREEN
Hold PINK
Sell RED