Volatility Channel Oscillator█ OVERVIEW
"Volatility Channel Oscillator" is a technical indicator that analyzes price volatility relative to dynamic price channels, displaying an oscillator, its moving average, and signals based on crossovers and divergences. The indicator offers customizable overbought and oversold levels, gradient visualization, and divergence detection, supported by alerts for key signals.
█ CONCEPTS
The VCO indicator creates dynamic price channels based on a moving average of the price (calculated as the arithmetic mean of the high and low prices: (high + low) / 2) and market volatility (measured as the average candle range and body size). These channels are not displayed on the chart but are used to calculate the oscillator value, which reflects the position of the closing price relative to the channel width, scaled to a range from -100 to +100, with the zero line as the central point. A moving average of the oscillator (SMA) smooths its values, enabling signals based on crossovers with the zero line or overbought/oversold levels. The indicator also detects divergences between price and the oscillator, which may indicate potential trend reversals. VCO is useful for identifying market momentum, reversal points, and trend confirmation, especially when combined with other technical analysis tools.
█ FEATURES
- Volatility Channels: Calculates invisible chart boundaries based on a simple moving average (SMA) of the price (high + low) / 2 and volatility (average candle range and body). The length parameter (default 30) sets the SMA length, and scale (default 200%) adjusts the channel width.
- Oscillator: Determines the oscillator value in the range of -100 to +100, indicating the closing price's position relative to the volatility channel. Displayed with dynamic coloring (green for positive values, red for negative).
- Oscillator Moving Average: A simple moving average (SMA) of the oscillator values, smoothing its movements. The signalLength parameter (default 20) defines the SMA length. Displayed in yellow with an optional gradient.
- Overbought/Oversold Levels: Configurable thresholds for the oscillator (overbought, default 50; oversold, default -50) and its moving average (maOverbought, default 30; maOversold, default -30), shown as horizontal lines with optional gradients. Band colors change dynamically (red for overbought, green for oversold, gray for neutral) based on the moving average's position relative to maOverbought/maOversold, reinforcing other signals.
- Divergences: Detects bullish (price forms a lower low, oscillator a higher low) and bearish (price forms a higher high, oscillator a lower high) divergences using pivots (pivotLength, default 2). Divergences are displayed with a delay equal to the pivot length; larger lengths increase reliability but delay signals. Use as additional confirmation.
Signals:
- Overbought/Oversold Crossovers: Green triangles (buy) when the oscillator crosses above the oversold level, red triangles (sell) when it crosses below the overbought level.
- Zero Line Crossovers: Buy/sell signals when the oscillator crosses the zero line upward (buy) or downward (sell).
- Moving Average Crossovers: Buy/sell signals when the oscillator's moving average crosses the zero line or the maOverbought/maOversold levels. Dynamic band color changes (red/green) at these crossovers reinforce other signals.
- Visualization: Gradient lines for the oscillator, its moving average, overbought/oversold levels, and zero line, with adjustable transparency. Gradient fill between the oscillator and zero line.
Divergence Labels: "Bull" (bullish) and "Bear" (bearish) labels with customizable color and transparency.
- Alerts: Built-in alerts for divergences, overbought/oversold crossovers, and zero line crossovers by the oscillator and its moving average.
█ HOW TO USE
Add to Chart: Apply the indicator via Pine Editor or the Indicators menu on TradingView.
Configure Settings:
- Channel and Oscillator Settings: Adjust the channel SMA length (length, default 30) and channel scaling (scale, default 200%). Increase scale for high-volatility markets.
- Threshold Levels: Set oscillator overbought (overbought, default 50) and oversold (oversold, default -50) levels, and moving average thresholds (maOverbought, default 30; maOversold, default -30).
- Divergence Settings: Enable/disable divergence detection (calculateDivergence) and set pivot length (pivotLength, default 2). Larger values increase reliability but delay signals.
- Signal Settings: Choose signal types (signalType): overbought/oversold, zero line, moving average, or all.
- Styling: Customize colors for the oscillator, moving average, horizontal levels, and divergence labels. Adjust gradient and fill transparency.
Interpreting Signals:
- Buy Signals: Green triangles below the bar when the oscillator or its moving average crosses above the oversold level or zero line.
- Sell Signals: Red triangles above the bar when the oscillator or its moving average crosses below the overbought level or zero line.
- Moving Average Signals: Green/red triangles when the moving average crosses maOverbought/maOversold levels, indicating potential reversals or trend continuation. Dynamic band color changes (red for overbought, green for oversold) at these crossovers reinforce other signals.
- Divergences: "Bull" (bullish) and "Bear" (bearish) labels indicate potential trend reversals with a delay based on pivot length. Use as confirmation.
- Overbought/Oversold Levels: Monitor price reactions in these zones as potential reversal points. Dynamic band color changes based on the moving average reinforce signals.
Signal Confirmation: Use VCO with other tools, such as pivot levels (for key turning points) or Fibonacci levels (for support/resistance zones).
█ APPLICATIONS
- Trend Trading: Zero line crossovers by the oscillator or its moving average identify momentum in uptrends or downtrends.
- Range Trading: Overbought/oversold levels help identify entry/exit points in sideways markets.
- Divergences: Use bullish/bearish divergences as additional confirmation of reversals, especially near key price levels.
- Trend Identification: To analyze trends over a longer perspective, increase the moving average length (signalLength) for more stable signals.
█ NOTES
- Test the indicator across different timeframes and markets to optimize parameters, such as length and scale, for your trading style.
- In strong trends, overbought/oversold levels may persist, requiring additional signal verification.
- Divergences are more reliable on higher timeframes (H4, D1), where market noise is reduced, but their delay requires caution.
- In low-liquidity markets, signals may be less effective, so use on high-liquidity assets is recommended.
Pengayun
Momentum-Based Fair Value Gaps [BackQuant]Momentum-Based Fair Value Gaps
A precision tool that detects Fair Value Gaps and color-codes each zone by momentum, so you can quickly tell which imbalances matter, which are likely to fill, and which may power continuation.
What is a Fair Value Gap
A Fair Value Gap is a 3-candle price imbalance that forms when the middle candle expands fast enough that it leaves a void between candle 1 and candle 3.
Bullish FVG : low > high . This marks a bullish imbalance left beneath price.
Bearish FVG : high < low . This marks a bearish imbalance left above price.
These zones often act as magnets for mean reversion or as fuel for trend continuation when price respects the gap boundary and runs.
Why add momentum
Not all gaps are equal. This script measures momentum with RSI on your chosen source and paints each FVG with a momentum heatmap. Strong-momentum gaps are more likely to hold or propel continuation. Weak-momentum gaps are more likely to fill.
Core Features
Auto FVG Detection with size filters in percent of price.
Momentum Heatmap per gap using RSI with smoothing. Multiple palettes: Gradient, Discrete, Simple, and scientific schemes like Viridis, Plasma, Inferno, Magma, Cividis, Turbo, Jet, plus Red-Green and Blue-White-Red.
Bull and Bear Modes with independent toggles.
Extend Until Filled : keep drawing live to the right until price fully fills the gap.
Auto Remove Filled for a clean chart.
Optional Labels showing the smoothed RSI value stored at the gap’s birth.
RSI-based Filters : only accept bullish gaps when RSI is oversold and bearish gaps when RSI is overbought.
Performance Controls : cap how many FVGs to keep on chart.
Alerts : new bullish or bearish FVG, filled FVG, and extreme RSI FVGs.
How it works
Source for Momentum : choose Returns, Close, or Volume.
Returns computes percent change over a short lookback to focus on impulse quality.
RSI and Smoothing : RSI length and a small SMA smooth the signal to stabilize the color coding.
Gap Scan : each bar checks for a 3-candle bullish or bearish imbalance that also clears your minimum size filter in percent of price.
Heatmap Color : the gap is painted at creation with a color from your palette based on the smoothed RSI value, preserving the momentum signature that formed it.
Lifecycle : if Extend Unfilled is on, the zone projects forward until price fully trades through the far edge. If Auto Remove is on, a filled gap is deleted immediately.
How to use it
Scan for structure : turn on both bullish and bearish FVGs. Start with a moderate Min FVG Size percent to reduce noise. You will see stacked clusters in trends and scattered singletons in chop.
Read the colors : brighter or stronger palette values imply stronger momentum at gap formation. Weakly colored gaps are lower conviction.
Decide bias : bullish FVGs below price suggest demand footprints. Bearish FVGs above price suggest supply footprints. Use the heatmap and RSI value to rank importance.
Choose your playbook :
Mean reversion : target partial or full fills of opposing FVGs that were created on weak momentum or that sit against higher timeframe context.
Trend continuation : look for price to respect the near edge of a strong-momentum FVG, then break away in the direction of the original impulse.
Manage risk : in continuation ideas, invalidation often sits beyond the opposite edge of the active FVG. In reversion ideas, invalidation sits beyond the gap that should attract price.
Two trade playbooks
Continuation - Buy the hold of a bullish FVG
Context uptrend.
A bullish FVG prints with strong RSI color.
Price revisits the top of the gap, holds, and rotates up. Enter on hold or first higher low inside or just above the gap.
Invalidation: below the gap bottom. Targets: prior swing, measured move, or next LV area.
Reversion - Fade a weak bearish FVG toward fill
Context range or fading trend.
A bearish FVG prints with weak RSI color near a completed move.
Price fails to accelerate lower and rotates back into the gap.
Enter toward mid-gap with confirmation.
Invalidation: above gap top. Target: opposite edge for a full fill, or the gap midline for partials.
Key settings
Max FVG Display : memory cap to keep charts fast. Try 30 to 60 on intraday.
Min FVG Size % : sets a quality floor. Start near 0.20 to 0.50 on liquid markets.
RSI Length and Smooth : 14 and 3 are balanced. Increase length for higher timeframe stability.
RSI Source :
Returns : most sensitive to true momentum bursts
Close : traditional.
Volume : uses raw volume impulses to judge footprint strength.
Filter by RSI Extremes : tighten rules so only the most stretched gaps print as signals.
Heatmap Style and Palette : pick a palette with good contrast for your background. Gradient for continuous feel, Discrete for quick zoning, Simple for binary, Palette for scientific schemes.
Extend Unfilled - Auto Remove : choose live projection and cleanup behavior to match your workflow.
Reading the chart
Bullish zones sit beneath price. Respect and hold of the upper boundary suggests demand. Strong green or warm palette tones indicate impulse quality.
Bearish zones sit above price. Respect and hold of the lower boundary suggests supply. Strong red or cool palette tones indicate impulse quality.
Stacking : multiple same-direction gaps stacked in a trend create ladders. Ladders often act as stepping stones for continuation.
Overlapping : opposing gaps overlapping in a small region usually mark a battle zone. Expect chop until one side is absorbed.
Workflow tips
Map higher timeframe trend first. Use lower timeframe FVGs for entries aligned with the higher timeframe bias.
Increase Min FVG Size percent and RSI length for noisy symbols.
Use labels when learning to correlate the RSI numbers with your palette colors.
Combine with VWAP or moving averages for confluence at FVG edges.
If you see repeated fills and refills of the same zone, treat that area as fair value and avoid chasing.
Alerts included
New Bullish FVG
New Bearish FVG
Bullish FVG Filled
Bearish FVG Filled
Extreme Oversold FVG - bullish
Extreme Overbought FVG - bearish
Practical defaults
RSI Length 14, Smooth 3, Source Returns.
Min FVG Size 0.25 percent on liquid majors.
Heatmap Style Gradient, Palette Viridis or Turbo for contrast.
Extend Unfilled on, Auto Remove on for a clean live map.
Notes
This tool does not predict the future. It maps imbalances and momentum so you can frame trades with clearer context, cleaner invalidation, and better ranking of which gaps matter. Use it with risk control and in combination with your broader process.
RSI + Stochastic Combo (fixed) by howhaber# RSI + Stochastic Indicator
**Summary**
This indicator combines RSI and Stochastic to generate BUY and SELL signals in oversold or overbought market conditions. It merges both indicators for higher accuracy, reducing false signals. Includes visual signals on the chart, alerts, and an info label for quick analysis.
---
## 📈 How the Indicator Works
### RSI Component
- Calculates standard RSI based on the specified period (`rsiLen`).
- Indicates oversold (< 30) or overbought (> 70) conditions.
### Stochastic Component
- Manually calculated to avoid compatibility issues.
- Measures the current price position relative to the price range (highs/lows) over the selected period.
- Smoothed using two SMA filters (%K and %D).
### Signal Logic
**BUY Signal**:
- %K crosses above %D (`ta.crossover(k, d)`).
- %K < 20 (oversold market).
- RSI < specified threshold (default < 40).
**SELL Signal**:
- %K crosses below %D (`ta.crossunder(k, d)`).
- %K > 80 (overbought market).
- RSI > specified threshold (default > 60).
---
## 📍 What's Displayed on the Chart
- 🟢 **Green arrow** below the bar → BUY signal.
- 🔴 **Red arrow** above the bar → SELL signal.
- **In a separate window**:
- RSI line (blue).
- Stochastic %K (orange).
- Stochastic %D (purple).
- Reference levels: 30/70 (RSI), 20/80 (Stochastic).
---
## 🔔 Alerts
- **RSI+Stoch BUY**: Notification on BUY signal.
- **RSI+Stoch SELL**: Notification on SELL signal.
Receive alerts via email, Telegram, or directly on the platform.
---
## 🧩 Additional Feature
- Info label on the last bar, displaying:
- Current RSI value.
- %K and %D values.
- Facilitates quick visual checks of the indicator's current state.
---
## 💡 Interpretation
- **Oversold market** (confirmed by RSI and Stochastic): Likely upward reversal.
- **Overbought market** (confirmed by RSI and Stochastic): Likely downward reversal.
- Combining both reduces false signals and improves accuracy in choppy markets.
---
## ⚠️ Important Note
This indicator is not financial advice. It is designed for technical analysis and educational purposes. Combine it with other tools like trend analysis, volume, and price patterns for better results.
MACD-V with RSI Gradient## Overview
MACD-V is a volatility-adjusted momentum indicator that normalizes MACD using ATR. This version adds a dynamic RSI-based background gradient to highlight momentum zones visually.
## Features
- **MACD-V Line**: EMA-based momentum normalized by ATR
- **Signal Line**: EMA of MACD-V
- **Histogram**: Color-coded based on slope and polarity
- **RSI Gradient Background**: Shading from bright green (RSI > 75) to bright red (RSI < 30), with intermediate tones for momentum context
## Use Case
Designed for 30-minute oil futures charts, this indicator helps identify:
- Trend strength and reversals
- Momentum zones using RSI shading
- Pullback opportunities and exhaustion zones
## Inputs
- Fast EMA (default: 12)
- Slow EMA (default: 26)
- Signal EMA (default: 9)
- ATR Length (default: 26)
## Notes
- RSI shading is purely visual—no alerts are wired in yet
- Histogram renders behind MACD-V and Signal lines for clarity
- Colors are tuned for dark charts
## Credits
The MACD-v is an indicator created in 2015 by Alex Spiroglou
and presented to the public in 2022
as a paper called: "𝗠𝗔𝗖𝗗-𝘃: 𝗩𝗼𝗹𝗮𝘁𝗶𝗹𝗶𝘁𝘆 𝗡𝗼𝗿𝗺𝗮𝗹𝗶𝘀𝗲𝗱 𝗠𝗼𝗺𝗲𝗻𝘁𝘂𝗺"
It received the following Awards:
1. “𝐅𝐨𝐮𝐧𝐝𝐞𝐫𝐬 𝐀𝐰𝐚𝐫𝐝” (2022),
for advances in Active Investment Management
from the National Association of Active Investment Managers (NAAIM)
2. “𝐂𝐡𝐚𝐫𝐥𝐞𝐬 𝐇. 𝐃𝐨𝐰 𝐀𝐰𝐚𝐫𝐝” (2022)
for outstanding research in Technical Analysis,
from the Chartered Market Technicians Association (CMTA)
The RSI Gradient was my idea, but quite frankly, if I go looking around I suppose I'll find that others had the same idea.
This is the first time I've ever published any code, so if I stepped on anyone's toes. I'm sorry.
RSI// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © xdecow
//@version=5
indicator("RSI", overlay=true)
g_panel = 'Panel Options'
i_orientation = input.string('Vertical', 'Orientation', options = , group = g_panel)
i_position = input.string('Bottom Right', 'Position', options = , group = g_panel)
i_border_width = input.int(1, 'Border Width', minval = 0, maxval = 10, group = g_panel, inline = 'border')
i_color_border = input.color(#000000, '', group = g_panel, inline = 'border')
i_showHeaders = input.bool(true, 'Show Headers', group = g_panel)
i_color_header_bg = input.color(#5d606b, 'Headers Background', group = g_panel, inline = 'header')
i_color_header_text = input.color(color.white, 'Text', group = g_panel, inline = 'header')
i_color_tf_bg = input.color(#2a2e39, 'Timeframe Background', group = g_panel, inline = 'tf')
i_color_tf_text = input.color(color.white, 'Text', group = g_panel, inline = 'tf')
i_debug = input.bool(false, 'Display colors palette (debug)', group = g_panel)
// rsi bg colors
g_rsi = 'RSI Colors'
i_threshold_ob = input.int(70, 'Overbought Threshold', minval=51, maxval=100, group = g_rsi)
i_color_ob = input.color(#128416, 'Overbought Background', inline = 'ob', group = g_rsi)
i_tcolor_ob = input.color(color.white, 'Text', inline = 'ob', group = g_rsi)
i_threshold_uptrend = input.int(60, 'Uptrend Threshold', minval=51, maxval=100, group = g_rsi)
i_color_uptrend = input.color(#2d472e, 'Uptrend Background', inline = 'up', group = g_rsi)
i_tcolor_uptrend = input.color(color.white, 'Text', inline = 'up', group = g_rsi)
i_color_mid = input.color(#131722, 'No Trend Background', group = g_rsi, inline = 'mid')
i_tcolor_mid = input.color(#b2b5be, 'Text', group = g_rsi, inline = 'mid')
i_threshold_downtrend = input.int(40, 'Downtrend Threshold', group = g_rsi, minval=0, maxval=49)
i_color_downtrend = input.color(#5b2e2e, 'Downtrend Background', group = g_rsi, inline = 'down')
i_tcolor_downtrend = input.color(color.white, 'Text', group = g_rsi, inline = 'down')
i_threshold_os = input.int(30, 'Oversold Threshold', minval=0, maxval=49, group = g_rsi)
i_color_os = input.color(#db3240, 'Oversold Background', group = g_rsi, inline = 'os')
i_tcolor_os = input.color(color.white, 'Text', group = g_rsi, inline = 'os')
g_rsi1 = 'RSI #1'
i_rsi1_enabled = input.bool(true, title = 'Enabled', group = g_rsi1)
i_rsi1_tf = input.timeframe('5', 'Timeframe', group = g_rsi1)
i_rsi1_len = input.int(14, 'Length', minval = 1, group = g_rsi1)
i_rsi1_src = input.source(close, 'Source', group = g_rsi1) * 10000
v_rsi1 = i_rsi1_enabled ? request.security(syminfo.tickerid, i_rsi1_tf, ta.rsi(i_rsi1_src, i_rsi1_len)) : na
g_rsi2 = 'RSI #2'
i_rsi2_enabled = input.bool(true, title = 'Enabled', group = g_rsi2)
i_rsi2_tf = input.timeframe('15', 'Timeframe', group = g_rsi2)
i_rsi2_len = input.int(14, 'Length', minval = 1, group = g_rsi2)
i_rsi2_src = input.source(close, 'Source', group = g_rsi2) * 10000
v_rsi2 = i_rsi2_enabled ? request.security(syminfo.tickerid, i_rsi2_tf, ta.rsi(i_rsi2_src, i_rsi2_len)) : na
g_rsi3 = 'RSI #3'
i_rsi3_enabled = input.bool(true, title = 'Enabled', group = g_rsi3)
i_rsi3_tf = input.timeframe('60', 'Timeframe', group = g_rsi3)
i_rsi3_len = input.int(14, 'Length', minval = 1, group = g_rsi3)
i_rsi3_src = input.source(close, 'Source', group = g_rsi3) * 10000
v_rsi3 = i_rsi3_enabled ? request.security(syminfo.tickerid, i_rsi3_tf, ta.rsi(i_rsi3_src, i_rsi3_len)) : na
g_rsi4 = 'RSI #4'
i_rsi4_enabled = input.bool(true, title = 'Enabled', group = g_rsi4)
i_rsi4_tf = input.timeframe('240', 'Timeframe', group = g_rsi4)
i_rsi4_len = input.int(14, 'Length', minval = 1, group = g_rsi4)
i_rsi4_src = input.source(close, 'Source', group = g_rsi4) * 10000
v_rsi4 = i_rsi4_enabled ? request.security(syminfo.tickerid, i_rsi4_tf, ta.rsi(i_rsi4_src, i_rsi4_len)) : na
g_rsi5 = 'RSI #5'
i_rsi5_enabled = input.bool(true, title = 'Enabled', group = g_rsi5)
i_rsi5_tf = input.timeframe('D', 'Timeframe', group = g_rsi5)
i_rsi5_len = input.int(14, 'Length', minval = 1, group = g_rsi5)
i_rsi5_src = input.source(close, 'Source', group = g_rsi5) * 10000
v_rsi5 = i_rsi5_enabled ? request.security(syminfo.tickerid, i_rsi5_tf, ta.rsi(i_rsi5_src, i_rsi5_len)) : na
g_rsi6 = 'RSI #6'
i_rsi6_enabled = input.bool(true, title = 'Enabled', group = g_rsi6)
i_rsi6_tf = input.timeframe('W', 'Timeframe', group = g_rsi6)
i_rsi6_len = input.int(14, 'Length', minval = 1, group = g_rsi6)
i_rsi6_src = input.source(close, 'Source', group = g_rsi6) * 10000
v_rsi6 = i_rsi6_enabled ? request.security(syminfo.tickerid, i_rsi6_tf, ta.rsi(i_rsi6_src, i_rsi6_len)) : na
g_rsi7 = 'RSI #7'
i_rsi7_enabled = input.bool(false, title = 'Enabled', group = g_rsi7)
i_rsi7_tf = input.timeframe('W', 'Timeframe', group = g_rsi7)
i_rsi7_len = input.int(14, 'Length', minval = 1, group = g_rsi7)
i_rsi7_src = input.source(close, 'Source', group = g_rsi7) * 10000
v_rsi7 = i_rsi7_enabled ? request.security(syminfo.tickerid, i_rsi7_tf, ta.rsi(i_rsi7_src, i_rsi7_len)) : na
g_rsi8 = 'RSI #8'
i_rsi8_enabled = input.bool(false, title = 'Enabled', group = g_rsi8)
i_rsi8_tf = input.timeframe('W', 'Timeframe', group = g_rsi8)
i_rsi8_len = input.int(14, 'Length', minval = 1, group = g_rsi8)
i_rsi8_src = input.source(close, 'Source', group = g_rsi8) * 10000
v_rsi8 = i_rsi8_enabled ? request.security(syminfo.tickerid, i_rsi8_tf, ta.rsi(i_rsi8_src, i_rsi8_len)) : na
g_rsi9 = 'RSI #9'
i_rsi9_enabled = input.bool(false, title = 'Enabled', group = g_rsi9)
i_rsi9_tf = input.timeframe('W', 'Timeframe', group = g_rsi9)
i_rsi9_len = input.int(14, 'Length', minval = 1, group = g_rsi9)
i_rsi9_src = input.source(close, 'Source', group = g_rsi9) * 10000
v_rsi9 = i_rsi9_enabled ? request.security(syminfo.tickerid, i_rsi9_tf, ta.rsi(i_rsi9_src, i_rsi9_len)) : na
g_rsi10 = 'RSI #10'
i_rsi10_enabled = input.bool(false, title = 'Enabled', group = g_rsi10)
i_rsi10_tf = input.timeframe('W', 'Timeframe', group = g_rsi10)
i_rsi10_len = input.int(14, 'Length', minval = 1, group = g_rsi10)
i_rsi10_src = input.source(close, 'Source', group = g_rsi10) * 10000
v_rsi10 = i_rsi10_enabled ? request.security(syminfo.tickerid, i_rsi10_tf, ta.rsi(i_rsi10_src, i_rsi10_len)) : na
f_StrPositionToConst(_p) =>
switch _p
'Top Left' => position.top_left
'Top Right' => position.top_right
'Top Center' => position.top_center
'Middle Left' => position.middle_left
'Middle Right' => position.middle_right
'Middle Center' => position.middle_center
'Bottom Left' => position.bottom_left
'Bottom Right' => position.bottom_right
'Bottom Center' => position.bottom_center
=> position.bottom_right
f_timeframeToHuman(_tf) =>
seconds = timeframe.in_seconds(_tf)
if seconds < 60
_tf
else if seconds < 3600
str.tostring(seconds / 60) + 'm'
else if seconds < 86400
str.tostring(seconds / 60 / 60) + 'h'
else
switch _tf
"1D" => "D"
"1W" => "W"
"1M" => "M"
=> str.tostring(_tf)
type TPanel
table src = na
bool vertical_orientation = true
int row = 0
int col = 0
method incCol(TPanel _panel) =>
if _panel.vertical_orientation
_panel.col += 1
else
_panel.row += 1
method incRow(TPanel _panel) =>
if not _panel.vertical_orientation
_panel.col += 1
_panel.row := 0
else
_panel.row += 1
_panel.col := 0
method add(TPanel _panel, string _v1, color _bg1, color _ctext1, string _v2, color _bg2, color _ctext2) =>
table.cell(_panel.src, _panel.col, _panel.row, _v1, text_color = _ctext1, bgcolor = _bg1)
_panel.incCol()
table.cell(_panel.src, _panel.col, _panel.row, _v2, text_color = _ctext2, bgcolor = _bg2)
_panel.incRow()
f_bg(_rsi) =>
c_line = na(_rsi) ? i_color_mid :
_rsi >= i_threshold_ob ? i_color_ob :
_rsi >= i_threshold_uptrend ? i_color_uptrend :
_rsi <= i_threshold_os ? i_color_os :
_rsi <= i_threshold_downtrend ? i_color_downtrend :
i_color_mid
f_rsi_text_color(_rsi) =>
c_line = na(_rsi) ? i_tcolor_mid :
_rsi >= i_threshold_ob ? i_tcolor_ob :
_rsi >= i_threshold_uptrend ? i_tcolor_uptrend :
_rsi <= i_threshold_os ? i_tcolor_os :
_rsi <= i_threshold_downtrend ? i_tcolor_downtrend :
i_tcolor_mid
f_formatRsi(_rsi) => na(_rsi) ? 'N/A' : str.tostring(_rsi, '0.00')
if barstate.islast
v_panel = TPanel.new(vertical_orientation = i_orientation == 'Vertical')
v_max_rows = 20
v_panel.src := table.new(f_StrPositionToConst(i_position), v_max_rows, v_max_rows, border_width = i_border_width, border_color = i_color_border)
if i_showHeaders
v_panel.add('TF', i_color_header_bg, i_color_header_text, 'RSI', i_color_header_bg, i_color_header_text)
if i_rsi1_enabled
v_panel.add(f_timeframeToHuman(i_rsi1_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi1), f_bg(v_rsi1), f_rsi_text_color(v_rsi1))
if i_rsi2_enabled
v_panel.add(f_timeframeToHuman(i_rsi2_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi2), f_bg(v_rsi2), f_rsi_text_color(v_rsi2))
if i_rsi3_enabled
v_panel.add(f_timeframeToHuman(i_rsi3_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi3), f_bg(v_rsi3), f_rsi_text_color(v_rsi3))
if i_rsi4_enabled
v_panel.add(f_timeframeToHuman(i_rsi4_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi4), f_bg(v_rsi4), f_rsi_text_color(v_rsi4))
if i_rsi5_enabled
v_panel.add(f_timeframeToHuman(i_rsi5_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi5), f_bg(v_rsi5), f_rsi_text_color(v_rsi5))
if i_rsi6_enabled
v_panel.add(f_timeframeToHuman(i_rsi6_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi6), f_bg(v_rsi6), f_rsi_text_color(v_rsi6))
if i_rsi7_enabled
v_panel.add(f_timeframeToHuman(i_rsi7_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi7), f_bg(v_rsi7), f_rsi_text_color(v_rsi7))
if i_rsi8_enabled
v_panel.add(f_timeframeToHuman(i_rsi8_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi8), f_bg(v_rsi8), f_rsi_text_color(v_rsi8))
if i_rsi9_enabled
v_panel.add(f_timeframeToHuman(i_rsi9_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi9), f_bg(v_rsi9), f_rsi_text_color(v_rsi9))
if i_rsi10_enabled
v_panel.add(f_timeframeToHuman(i_rsi10_tf), i_color_tf_bg, i_color_tf_text, f_formatRsi(v_rsi10), f_bg(v_rsi10), f_rsi_text_color(v_rsi10))
if i_debug
t = table.new(position.middle_center, 21, 20, border_width = i_border_width, border_color = i_color_border)
v_panel2 = TPanel.new(t, vertical_orientation = i_orientation == 'Vertical')
v_panel2.add('Debug', i_color_header_bg, i_color_header_text, 'Colors', i_color_header_bg, i_color_header_text)
demo = map.new()
map.put(demo, 'Overbought', i_threshold_ob)
map.put(demo, 'Uptrend', i_threshold_uptrend)
map.put(demo, 'No Trend', 50)
map.put(demo, 'Downtrend', i_threshold_downtrend)
map.put(demo, 'Oversold', i_threshold_os)
demoKeys = map.keys(demo)
for key in demoKeys
tf = key
rsi = map.get(demo, key)
v_panel2.add(tf, i_color_tf_bg, i_color_tf_text, f_formatRsi(rsi), f_bg(rsi), f_rsi_text_color(rsi))
CMF, RSI, CCI, MACD, OBV, Fisher, Stoch RSI, ADX (+DI/-DI)Eight normalized indicators are used in conjunction with the CMF, CCI, MACD, and Stoch RSI indicators. You can track buy and sell decisions by tracking swings. The zero line is for reversal tracking at -20, +20, +50, and +80. You can use any of the nine indicators individually or in combination.
Adaptive Vol Gauge [ParadoxAlgo]This is an overlay tool that measures and shows market ups and downs (volatility) based on daily high and low prices. It adjusts automatically to recent price changes and highlights calm or wild market periods. It colors the chart background and bars in shades of blue to cyan, with optional small labels for changes in market mood. Use it for info only—combine with your own analysis and risk controls. It's not a buy/sell signal or promise of results.Key FeaturesSmart Volatility Measure: Tracks price swings with a flexible time window that reacts to market speed.
Market Mood Detection: Spots high-energy (wild) or low-energy (calm) phases to help see shifts.
Visual Style: Uses smooth color fades on the background and bars—cyan for calm, deep blue for wild—to blend nicely on your chart.
Custom Options: Change settings like time periods, sensitivity, colors, and labels.
Chart Fit: Sits right on your main price chart without extra lines, keeping things clean.
How It WorksThe tool figures out volatility like this:Adjustment Factor:Looks at recent price ranges compared to longer ones.
Tweaks the time window (between 10-50 bars) based on how fast prices are moving.
Volatility Calc:Adds up logs of high/low ranges over the adjusted window.
Takes the square root for the final value.
Can scale it to yearly terms for easy comparison across chart timeframes.
Mood Check:Compares current volatility to its recent average and spread.
Flags "high" if above your set level, "low" if below.
Neutral in between.
This setup makes it quicker in busy markets and steadier in quiet ones.Settings You Can ChangeAdjust in the tool's menu:Base Time Window (default: 20): Starting point for calculations. Bigger numbers smooth things out but might miss quick changes.
Adjustment Strength (default: 0.5): How much it reacts to price speed. Low = steady; high = quick changes.
Yearly Scaling (default: on): Makes values comparable across short or long charts. Turn off for raw numbers.
Mood Sensitivity (default: 1.0): How strict for calling high/low moods. Low = more shifts; high = only big ones.
Show Labels (default: on): Adds tiny "High Vol" or "Low Vol" tags when moods change. They point up or down from bars.
Background Fade (default: 80): How see-through the color fill is (0 = invisible, 100 = solid).
Bar Fade (default: 50): How much color blends into your candles or bars (0 = none, 100 = full).
How to Read and Use ItColor Shifts:Background and bars fade based on mood strength:Cyan shades mean calm markets (good for steady, back-and-forth trades).
Deep blue shades mean wild markets (watch for big moves or turns).
Smooth changes show volatility building or easing.
Labels:"High Vol" (deep blue, from below bar): Start of wild phase.
"Low Vol" (cyan, from above bar): Start of calm phase.
Only shows at changes to avoid clutter. Use for timing strategy tweaks.
Trading Ideas:Mood-Based Plays: In wild phases (deep blue), try chase-momentum or breakout trades since swings are bigger. In calm phases (cyan), stick to bounce-back or range trades.
Risk Tips: Cut trade sizes in wild times to handle bigger losses. Use calm times for longer holds with close stops.
Chart Time Tips: Turn on yearly scaling for matching short and long views. Test settings on past data—loosen for quick trades (more alerts), tighten for longer ones (fewer, stronger).
Mix with Others: Add trend lines or averages—buy in calm up-moves, sell in wild down-moves. Check with volume or key levels too.
Special Cases: In big news events, it reacts faster. On slow assets, it might overstate swings—ease the adjustment strength.
Limits and TipsIt looks back at past data, so it trails real-time action and can't predict ahead.
Results differ by stock or timeframe—test on history first.
Colors and tags are just visuals; set your own alerts if needed.
Follows TradingView rules: No win promises, for learning only. Open for sharing; share thoughts in forums.
With this, you can spot market energy and tweak your trades smarter. Start on practice charts.
Diwali Lights Pro — 7-Diyas Signal Matrix [KedArc Quant]🎯 Overview
“Diwali Lights Pro — 7-Diyas Signal Matrix” is a precision-built trend-sentiment indicator that blends the glow of seven technical “diyas” — each representing a different momentum or strength dimension — into one intuitive signal matrix. It was designed to celebrate light, discipline, and clarity in trading — helping traders filter noise, identify strong trend shifts, and take trades with conviction. Each diya is powered by a proven indicator component: RSI, Stochastic, EMA trend strength, and momentum slopes.Together, they light up your chart with buy/sell signals only when technical confluence aligns — like the diyas of Diwali shining in harmony.
💡 Core Concept
The indicator computes a composite score (–9 to +9) by evaluating seven key parameters:
| # | Diya | Logic | Interpretation |
| 1 | RSI | Overbought / Oversold | Short-term momentum exhaustion |
| 2 | Stochastic | Direction & zones | Confirmation of RSI |
| 3 | Price vs EMA20 | Position of price | Near-term trend bias |
| 4 | EMA20 Slope | Short-term momentum | Strength confirmation |
| 5 | EMA50 Slope | Mid-term trend | Trend stability |
| 6 | EMA100 Slope | Medium-term sentiment | Institutional bias |
| 7 | EMA200 Slope | Long-term sentiment | Market direction baseline |
The total of these 7 diyas creates a signal matrix that dynamically adapts to trend conditions.
⚙️ Inputs & Configuration
| RSI Length | 14 | Standard RSI window |
| Stochastic Length | 14 | Measures momentum oscillation |
| EMA Periods | 20, 50, 100, 200 | Multi-layer trend structure |
| Overbought / Oversold Zones | 70 / 30 | Configurable thresholds |
| Show Buy/Sell Labels | ✅ | Toggle signal markers |
| Show Banner | ✅ | Festive Diwali header with fireworks |
| Twinkle Interval | 10 bars | Animation timing |
| Fireworks Count | 18 | Visual celebration intensity |
| Background Opacity | 100% | Style preference |
🧭 Entry & Exit Logic
# ✅ Buy Signal (🪔)
A Buy triggers when:
* The total diya score crosses above zero,
* And at least four of seven components turn bullish.
This indicates that short-term oscillators, price action, and moving averages are all turning in unison — a strong entry zone after a pullback.
# 🔥 Sell Signal (🔥)
A Sell triggers when:
* The total diya score crosses below zero,
* And multiple slopes or price conditions flip bearish.
This flags weakening momentum and possible trend exhaustion.
# 💬 Suggested Usage
* Works beautifully on 5-min to 1-hour charts.
* Best when used with trend confirmation tools (volume, price structure).
* Avoid entering trades when signals flip rapidly within narrow ranges (sideways zones).
🧪 Mathematical Formulae
1. RSI Bucket (p₁):
p₁ =
2 if RSI < Very Oversold
1 if RSI < Oversold
0 if neutral
-1 if RSI > Overbought
-2 if RSI > Very Overbought
2. Stochastic Bucket (p₂): Similar to RSI bucketing.
3. Price vs EMA20 (p₃):
p₃ = sign(close - EMA20)
4–7. Slope Sign (EMA20, 50, 100, 200):
p₄₋₇ = sign(EMA - EMA )
Total Score = Σ(p₁…p₇)
→ Crossover(total_score, 0) → Buy Signal
→ Crossunder(total_score, 0) → Sell Signal
📊 Why It’s Not Just a Mash-Up
Diwali Lights Pro uses:
* A unified scoring engine with weighted logic rather than conflicting triggers.
* Each component (diya) contributes equally, creating a normalized sentiment index.
* Smart signal filtering prevents repetitive false flips by enforcing trend alignment across multiple time frames.
* A dynamic, responsive structure optimized for clarity and minimal repainting.
🎆 Unique Add-Ons
* Top-Right Diwali Banner: Festive “Happy Diwali” with animated fireworks 🎇 and diyas 🪔.
* Signal Filtering: Reduces noise in volatile ranges.
* EMA Cloud Context: Visual clarity of multi-layer trend zones.
* Optional Light Mode: Change fireworks opacity for a subtle or bright effect.
📘 FAQ
Q1: Does this repaint?
No — it uses confirmed values (RSI, Stochastic, EMA slopes). Signals appear only after the bar closes.
Q2: Which timeframes work best?
Between 5m and 1h, depending on your strategy.
Use higher EMAs for swing setups.
Q3: Can I use it with alerts?
Yes, both Buy and Sell triggers come with built-in `alertcondition()` for instant notifications.
Q4: Can it be combined with other indicators?
Absolutely — it pairs well with volume profiles, volatility bands, or order-flow systems.
🪔 Glossary
| Diya | Candle or light — here, each diya = one technical indicator |
| EMA | Exponential Moving Average — measures smoothed trend bias |
| RSI | Relative Strength Index — momentum overbought/oversold oscillator |
| Stochastic | Momentum oscillator measuring closing levels relative to highs/lows |
| Slope Sign | Direction of EMA movement — rising or falling |
| Signal Matrix | The combined system of all seven diyas generating a unified score |
🧭 Final Note
> *Diwali Lights Pro* is not just a trading tool — it’s a visual celebration of confluence and discipline.
> When the diyas align, trends shine. Use it to trade in harmony with light, not against it. 🌟
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Logit RSI [AdaptiveRSI]The traditional 0–100 RSI scale makes statistical overlays, such as Bollinger Bands or even moving averages, technically invalid. This script solves this issue by placing RSI on an unbounded, continuous scale, enabling these tools to work as intended.
The Logit function takes bounded data, such as RSI values ranging from 0 to 100, and maps them onto an unbounded scale ranging from negative infinity (−∞) to positive infinity (+∞).
An RSI reading of 50 becomes 0 on the Logit scale, indicating a balanced market. Readings above 50 map to positive Logit values (price above Wilder’s EMA / RSI above 50), while readings below 50 map to negative values (price below Wilder’s EMA / RSI below 50).
For the detailed formula, which calculates RSI as a scaled distance from Wilder’s EMA, check the RSI
: alternative derivation script.
The main issue with the 0–100 RSI scale is that different lookback periods produce very different distributions of RSI values. The histograms below illustrate how often RSIs of various lengths spend time within each 5-point range.
On RSI(2), the tallest bars appear at the edges (0–5 and 95–100), meaning short-term RSI spends most of its time at the extremes. For longer lookbacks, the bars cluster around the center and rarely reach 70 or 30.
This behavior makes it difficult to generalize the two most common RSI techniques:
Fixed 70/30 thresholds: These overbought and oversold levels only make sense for short- or mid-range lookbacks (around the low teens). For very short periods, RSI spends most of its time above or below these levels, while for long-term lookbacks, RSI rarely reaches them.
Bollinger Bands (±2 standard deviations): When applied directly to RSI, the bands often extend beyond the 0–100 limits (especially for short-term lookbacks) making them mathematically invalid. While the issue is less visible on longer settings, it remains conceptually incorrect.
To address this, we apply the Logit Transform :
Logit RSI = LN(RSI / (100 − RSI))
The transformed data fits a smooth bell-shaped curve, allowing statistical tools like Bollinger Bands to function properly for the first time.
Why Logit RSI Matters:
Makes RSI statistically consistent across all lookback periods.
Greatly improves the visual clarity of short-term RSIs
Allows proper use of volatility tools (like Bollinger Bands) on RSI.
Replaces arbitrary 70/30 levels with data-driven thresholds.
Simplifies RSI interpretation for both short- and long-term analysis.
INPUTS:
RSI Length — set the RSI lookback period used in calculations.
RSI Type — choose between Regular RSI or Logit RSI .
Plot Bollinger Bands — ON/OFF toggle to overlay statistical envelopes around RSI or Logit RSI.
SMA and Standard Deviation Length — defines the lookback period for both the SMA (Bollinger Bands midline) and Standard Deviation calculations.
Standard Deviation Multiplier — controls the width of the Bollinger Bands (e.g., 2.0 for ±2σ).
While simple, the Logit transformation represents an unexplored yet powerful mathematically grounded improvement to the classic RSI.
It offers traders a structured, intuitive, and statistically consistent way to use RSI across all timeframes.
I welcome your feedback, suggestions, and code improvements—especially regarding performance and efficiency. Your insights are greatly appreciated.
MACD-V with RSI Gradient## Overview
MACD-V is a volatility-adjusted momentum indicator that normalizes MACD using ATR. This version adds a dynamic RSI-based background gradient to highlight momentum zones visually.
## Features
- **MACD-V Line**: EMA-based momentum normalized by ATR
- **Signal Line**: EMA of MACD-V
- **Histogram**: Color-coded based on slope and polarity
- **RSI Gradient Background**: Shading from bright green (RSI > 75) to bright red (RSI < 30), with intermediate tones for momentum context
## Use Case
Designed for 30-minute oil futures charts, this indicator helps identify:
- Trend strength and reversals
- Momentum zones using RSI shading
- Pullback opportunities and exhaustion zones
## Inputs
- Fast EMA (default: 12)
- Slow EMA (default: 26)
- Signal EMA (default: 9)
- ATR Length (default: 26)
## Notes
- RSI shading is purely visual—no alerts are wired in yet
- Histogram renders behind MACD-V and Signal lines for clarity
- Colors are tuned for dark charts
## Credits
Developed by Mark (SylvaRocks), optimized for tactical clarity and scalping precision.
Divergences + Alerts (ANY Indicator)📊 Divergences + Alerts (ANY Indicator)
This versatile indicator detects four types of divergences between price action and an oscillator:
Buyer Exhaustion
Buyer Absorption
Seller Exhaustion
Seller Absorption
Each divergence type is automatically identified and visually marked on the chart with colored lines. The indicator also includes built-in alert conditions for all four divergence types, allowing traders to receive real-time notifications when potential reversal signals occur.
By default, the oscillator is a candle-style visualization of the Money Flow Index (MFI), enhanced with volatility filtering via a VWMA-based ATR. However, users can replace the default MFI oscillator with any external source using the “Plug External Source” input, enabling full customization and compatibility with other indicators.
Key features:
🔍 Detects both exhaustion and absorption divergences
🔔 Alerts for each divergence type
🕯️ Candle-style oscillator visualization
🔌 Optional input for external indicator sources
⚙️ ATR-based filtering for precision
Ideal for traders seeking to spot early signs of trend reversals or momentum shifts with customizable flexibility.
Arbitrage Deviation Histogram-AAZ"Chart around MA-200"
This script plots a line chart around the 200-period moving average.
Moving Average Convergence-Divergence (MACD)This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
Jul 1
Release Notes
This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
BH Ergodic (TSI-style) [v5]The BG Ergodic script is a custom momentum and trend-confirmation tool that builds on the classic True Strength Index (TSI) and Ergodic Oscillator concepts. It smooths price momentum over multiple exponential averages to identify underlying trend direction, exhaustion, and potential reversals with reduced noise.
Unlike a standard TSI, the BG Ergodic combines:
Dual-smoothing filters for both momentum and signal lines, giving a cleaner response in choppy markets.
Dynamic color transitions that highlight bullish and bearish phases based on crossovers and slope changes.
Optional histogram plotting to visualize the spread between the Ergodic line and its signal line for early trend-shift detection.
This indicator works best on swing or trend-following timeframes (e.g., 1H–1D) and can be used to:
Confirm trend direction before entries,
Filter false breakouts, or
Spot momentum divergence near key support/resistance zones.
Sri-Minicharts 4 in one (CCI/Williams%/RTI/ADX)Sri – Mini Charts 4 in 1 (CCI / Williams %R / RTI / ADX) 📊
This all-in-one mini-chart indicator provides compact, visual representations of four key technical indicators in a single panel, allowing traders to quickly assess momentum, trend strength, and overbought/oversold conditions without cluttering the main chart.
Included Mini-Charts:
Williams %R Mini-Chart – Shows short-term momentum with a smoothed EMA overlay and reference zero line for quick visual signals.
ADX Mini-Chart – Displays trend strength with +DI / -DI lines, threshold levels, and optional color coding.
Relative Trend Index (RTI) Mini-Chart – Highlights dynamic trend direction and strength, with optional EMA smoothing and mini-chart display.
CCI Mini-Chart – Compact CCI plot with long EMA overlay, showing overbought/oversold levels and zero line for rapid trend recognition.
Key Features:
Fully customizable timeframes for each mini-chart.
Adjustable bars, offsets, and vertical placement for optimal layout on any chart.
Color-coded lines for positive/negative values, EMA trends, and threshold markers.
Sensitivity settings for each indicator to fine-tune scale and responsiveness.
Lightweight and non-intrusive, designed for traders who want fast multi-indicator insights in a single panel.
Recommended Use:
Identify momentum shifts, trend strength, and overbought/oversold conditions quickly.
Use in combination with main chart analysis for multi-timeframe and multi-indicator decision-making.
Ideal for swing traders, day traders, and technical analysts seeking compact, actionable visualization.
Adaptive MACD PROAdaptive MACD PRO is a next-generation momentum system built for traders who demand precision, adaptability, and clarity.
It merges two independent layers into one unified engine:
Adaptive MACD Core - detects structural momentum changes through dynamic normalization.
Phase Momentum Core - confirms acceleration and directional strength using phase-based movement detection.
How it Works Visually
When applied to any chart, the user instantly sees a clear, information-rich setup:
MACD & Signal Lines: dynamically colored lines that reflect real-time momentum direction (green/uptrend, red/downtrend).
Histogram Bars: adaptive columns showing the strength and acceleration of the trend.
Deeper colors = stronger movement.
Fading tones = loss of momentum.
Buy & Sell Dots:
Green dots appear when the system identifies a momentum reversal from oversold conditions.
Red dots appear when momentum peaks and reverses downward.
These dots are plotted at fixed levels for clean visual structure — ideal for quick scanning.
AutoCalib Cross Dots (Cyan & Fuchsia):
These appear exactly when the live MACD_z line crosses its adaptive calibration boundary.
Cyan indicates an adaptive bullish trigger.
Fuchsia indicates an adaptive bearish trigger.
Their transparency adjusts automatically based on the intensity of the cross — stronger crosses = brighter dots.
HUD Panel (optional):
Displays live calibration levels, current MACD_z value, and overall system state.
The HUD can be positioned at the top, bottom, or relative to the MACD curve, depending on user preference.
User Customization
Adaptive MACD PRO includes a full control layer that allows the user to tune the indicator to any market or timeframe:
Timeframe Override → analyze MACD on a higher or lower timeframe than the chart.
Auto Calibration → toggle between SAFE or AGGRESSIVE mode, adjust smoothness and window length.
Volatility Gate → control how the system reacts to quiet vs. explosive markets.
Bar Coloring → color bars based on MACD, Phase Momentum, or both (Merged Mode).
HUD Position & Anchor → move the on-chart display for better visibility.
All parameters can be adjusted in real-time, giving full control without affecting the closed adaptive engine underneath.
Practical Use
The indicator adapts to all assets and timeframes - from crypto scalping to equities and forex swing trading.
Users can focus on cross dots and histogram dynamics to identify clean momentum transitions, or combine it with existing systems for confirmation.
Adaptive MACD PRO is designed not just to show direction, but to evolve with the market’s rhythm - automatically learning volatility, tempo, and acceleration patterns over time.
Disclosure
This indicator is published as closed-source to protect its proprietary adaptive-fusion algorithm.
All operational behavior is fully described here in compliance with TradingView’s publication policies.
© 2025 Geokat83 | Proprietary Adaptive System
Sri - ADX Custom Time FrameTitle: Sri - ADX Custom Time Frame
Short Title: Sri-ADX
Overlay: No
Description:
The Sri - ADX Custom TF indicator allows traders to visualize the Average Directional Index (ADX) along with DI+ and DI- lines on a custom timeframe of their choice. This tool is ideal for trend strength analysis and directional movement assessment across multiple timeframes.
Key Features:
Custom Timeframe: Select any timeframe (e.g., 1, 3, 5, 15, 30, 60 minutes, 4H, Daily, Weekly, Monthly) for ADX calculation.
ADX & DI Calculation: Provides standard ADX with optional extra smoothing for DI and ADX for improved signal clarity.
Sensitivity Control: Adjustable ADX Sensitivity to fine-tune responsiveness to market movements.
Dynamic Threshold: Base threshold line dynamically scales with ADX sensitivity for better trend visualization.
Color Customization: Toggle DI+ and DI- colors with adjustable transparency (color reduction) to match your chart style.
Trend Insight: DI+ above DI- indicates bullish dominance; DI- above DI+ indicates bearish dominance.
Inputs Overview:
Custom Timeframe (tf) – Choose the timeframe to analyze.
ADX Length (len) – Period for ADX calculation.
Base Threshold (th) – Reference level for trend strength.
ADX Sensitivity (adxSensitivity) – Multiplier for ADX responsiveness.
Extra Smoothing (smoothDI, smoothADX) – Optional smoothing for DI and ADX to reduce noise.
Color Settings (enableColor, colorReduction, diPlusSel, diMinusSel) – Customize colors and transparency of DI+ and DI- plots.
Usage:
Identify trend strength and direction in your chosen timeframe.
Use DI+ and DI- crossover as potential signals for trend changes.
Combine with other technical tools for multi-timeframe trend analysis and trade confirmation.
Advanced Multi-Timeframe Momentum Matrix📊 Advanced Multi-Timeframe Momentum Matrix (AMTMM)
🎯 What Makes This Indicator Original
AMTMM is a sophisticated momentum analysis system that combines four distinct timeframes into a single weighted composite score using institutional-grade quantitative methods. Unlike traditional single-timeframe stochastic or RSI indicators, AMTMM employs:
Multi-Timeframe Weighted Composite Scoring - Aggregates momentum from Short (35%), Medium (30%), Long (20%), and Macro (15%) timeframes into one coherent signal, similar to how institutional traders analyze market structure across multiple horizons simultaneously.
Volatility-Adaptive Thresholds - Dynamically adjusts overbought/oversold levels based on ATR-derived volatility regimes, preventing premature signals during range expansion and contraction. The thresholds expand during high volatility and contract during calm periods, unlike static 70/30 levels.
Volume-Weighted Momentum Calculation - Optionally weights momentum signals by volume flow, giving higher significance to price moves accompanied by institutional volume, filtering out low-conviction noise.
Integrated Market Regime Detection - Uses ADX-style directional movement analysis combined with volatility range expansion to classify markets as Trending, Ranging, or Neutral, automatically filtering signals to match current market structure.
Statistical Normalization via Percentrank - Instead of raw stochastic values (0-100 bounded by recent highs/lows), AMTMM uses percentile ranking over extended periods, providing statistically consistent readings regardless of volatility regime.
📈 What It Does
AMTMM provides traders with:
Unified Momentum Score (0-100): A single composite line representing the confluence of multiple timeframe momentums
Automatic Regime Classification: Visual background coloring showing whether markets are trending (trade momentum) or ranging (avoid or fade)
High-Probability Signal Alerts: Buy/sell signals filtered by momentum strength and regime appropriateness
Divergence Detection: Automated identification of price-momentum divergences indicating potential reversals
Quality Scoring: Real-time signal quality assessment (0-100%) helping traders prioritize setups
Live Dashboard: Displays current momentum, strength, regime, signal quality, and divergence status
🔬 How It Works - Underlying Methodology
1. Multi-Timeframe Momentum Calculation
The indicator calculates normalized momentum independently for four configurable timeframes:
Short-Term (default: 1x base period): Captures intraday/scalping moves
Medium-Term (default: 3x base period): Identifies swing trading opportunities
Long-Term (default: 7x base period): Tracks position trading trends
Macro (default: 14x base period): Monitors institutional positioning
Calculation Process:
Applies stochastic calculation to close vs high/low over period × base_period
Optionally weights by volume ratio (current volume / average volume) to detect institutional flow
Smooths using selectable MA type (SMA/EMA/WMA/VWMA/HMA)
Normalizes via percentile ranking over 2× the calculation period for statistical consistency
Combines all four timeframes using fixed institutional weights: 35%-30%-20%-15%
2. Adaptive Threshold System
Traditional oscillators use static overbought/oversold levels (70/30), which fail during volatility shifts.
AMTMM's Adaptive Method:
Calculates ATR(14) and compares to ATR(50) SMA to determine volatility regime
Computes volatility ratio = current_ATR / average_ATR
Adjusts thresholds dynamically: adjusted_level = base_level + (volatility_ratio - 1) × 15
Bounds adjustments between 10-90 to prevent extreme outliers
Result: Thresholds expand in choppy markets, contract in calm trends
3. Market Regime Filter
Uses directional movement analysis to classify market structure:
Calculation:
Computes positive/negative directional movement (DM+ and DM-)
Calculates directional indicators (DI+ and DI-) via exponential smoothing
Derives directional index (DX) measuring trend strength
Smooths DX into ADX-equivalent value
Combines with ATR range expansion/contraction
Scores regime: Positive = Trending, Negative = Ranging
Signal Application:
Suppresses momentum signals during ranging conditions (yellow background)
Allows momentum signals during trending conditions (blue background)
Prevents whipsaw trades in sideways markets
4. Divergence Detection Algorithm
Identifies price-momentum discrepancies using pivot analysis:
Bullish Divergence:
Detects when price forms a lower low
But momentum forms a higher low
Indicates weakening selling pressure, potential reversal up
Bearish Divergence:
Detects when price forms a higher high
But momentum forms a lower high
Indicates weakening buying pressure, potential reversal down
Uses configurable lookback pivot detection (default: 5 bars left/right)
5. Signal Quality Scoring
Each signal receives a 0-100% quality score combining:
Momentum Strength: Rate of change of composite momentum (percentile ranked over 50 bars)
Regime Score: Absolute value of trending/ranging classification
Combined Score: (Strength + |Regime|) / 2
Only signals exceeding the threshold (default: 30%) generate alerts, filtering out low-conviction setups.
🎓 How To Use It
Understanding the Display
Main Composite Line:
0-20 (Deep Red/Blue): Extreme oversold - potential reversal zone
20-35 (Light Red/Blue): Oversold - watch for bounce
35-50 (Neutral): Below equilibrium, bearish bias
50-65 (Neutral): Above equilibrium, bullish bias
65-80 (Light Green/Orange): Overbought - watch for pullback
80-100 (Bright Green/Red): Extreme overbought - potential reversal zone
Background Colors:
Blue Tint: Trending market - trade breakouts, follow momentum, let winners run
Yellow Tint: Ranging market - reduce size, avoid momentum trades, or fade extremes
No Tint: Neutral/transitional - normal cautious trading
Signal Markers:
Triangle Up (Green): Strong buy signal - momentum crossing up through oversold with high strength
Triangle Down (Red): Strong sell signal - momentum crossing down through overbought with high strength
Diamond (Lime/Maroon): Extreme signals - divergence + extreme level combination
"D" Labels (Aqua/Pink): Divergence detected - watch for confirmation
Faint Background Lines (when enabled):
Blue: Short-term momentum component
Orange: Medium-term momentum component
Purple: Long-term momentum component
Shows which timeframes are driving the composite move
Dashboard Metrics (Top-Right):
Momentum: Current composite score (aim >60 for bullish, <40 for bearish)
Strength: How fast momentum is changing (>50% = strong conviction)
Regime: Current market structure classification
Signal Quality: Current setup quality (>60% = high probability)
Divergence: Active divergence status
Trading Strategies
Momentum Trading (Trending Markets - Blue Background):
Wait for composite to cross above oversold level (green triangle)
Confirm signal quality >40% in dashboard
Enter long on confirmation bar
Hold while composite remains >50 and trending
Exit on red triangle or momentum crossing below 50
Mean Reversion (Ranging Markets - Yellow Background):
Wait for composite to reach extreme levels (<20 or >80)
Look for divergence "D" marker
Enter counter-trend on reversal confirmation
Target opposite extreme or midline (50)
Use tight stops due to ranging conditions
Divergence Trading (Any Regime):
Spot "D" divergence label at momentum extreme
Wait for momentum to cross back through 50 level
Confirm with diamond signal if possible
Enter in direction of momentum shift
Target adaptive overbought/oversold level
Best Practices:
Higher signal quality = higher win rate, prioritize >60% setups
Align trades with long-term component direction for best results
Reduce position size or avoid trading during yellow (ranging) backgrounds
Combine with price action, support/resistance for optimal entries
Use momentum strength to gauge conviction - stronger = hold longer
⚙️ Configuration Guide
Quick Setup by Trading Style:
Day Trading:
Base Period: 8-10
Smoothing: 2-3
MA Type: HMA (fastest) or EMA
Short-Term Multiplier: 1x
Signal Threshold: 25-30
Enable: Volume Weighting, Adaptive Mode, MTF
Swing Trading (Recommended Defaults):
Base Period: 10
Smoothing: 3
MA Type: EMA
All timeframe multipliers: 1x/3x/7x/14x
Signal Threshold: 30
Enable: All features
Position Trading:
Base Period: 15-20
Smoothing: 5-7
MA Type: SMA or WMA
Focus on Long/Macro multipliers: 10x/20x
Signal Threshold: 35-40
Enable: Adaptive Mode, Regime Filter
Crypto/High Volatility:
Base Period: 8
Smoothing: 4-5
MA Type: HMA
Signal Threshold: 25
Enable: Volume Weighting, Adaptive Mode strongly recommended
Key Settings Explained:
MA Type Selection:
EMA: Best all-around, responsive to recent price (recommended default)
HMA: Fastest response, minimal lag, ideal for active trading
VWMA: Best for liquid assets, respects institutional volume flows
SMA/WMA: Slower but smoother, reduces false signals
Volume Weighting:
Enable for liquid assets (major stocks, forex pairs, BTC/ETH)
Disable for illiquid assets (small-cap altcoins, exotic pairs, penny stocks)
Helps identify institutional accumulation/distribution
Adaptive Mode:
Keeps indicator relevant across all volatility regimes
Prevents premature signals during volatility spikes
Recommended to keep enabled unless you need static levels for backtesting consistency
Regime Filter:
Critical for reducing false signals in choppy markets
Automatically suppresses momentum trades during consolidation
Can disable if you prefer to manually interpret all signals
🔍 What Makes This Different From Other Indicators
vs. Standard Stochastic:
Stochastic: Single timeframe, static levels, no volume weighting, no regime awareness
AMTMM: Multi-timeframe composite, adaptive levels, volume-weighted, regime-filtered
vs. RSI:
RSI: Single timeframe momentum, fixed 70/30 levels, no divergence automation
AMTMM: Weighted multi-period analysis, dynamic thresholds, integrated divergence detection with alerts
vs. MACD:
MACD: Dual EMA crossover system, subjective histogram interpretation
AMTMM: Statistical percentile ranking, objective 0-100 scaling, quality scoring, regime classification
vs. Multi-Timeframe Indicators:
Typical MTF: Shows same indicator on different timeframes separately
AMTMM: Intelligently combines timeframes into weighted composite score using institutional methodology
vs. Regime Filters:
Standalone filters: Require separate indicator interpretation
AMTMM: Integrated regime detection that automatically adjusts strategy signals
🎨 Visualization Options
4 Color Schemes:
Professional: Subtle greens/reds, optimal for extended screen time
High Contrast: Vivid colors, maximum visibility in bright environments
Institutional: Blue/orange palette, professional presentation-ready
Heatmap: Red-to-blue gradient, data-visualization style
Customizable Elements:
Toggle multi-timeframe component lines on/off
Show/hide regime background coloring
Adjust fill transparency (0-95%) for any monitor brightness
Paint price bars with momentum colors
Display/hide live metrics dashboard
⚠️ Important Notes
Not a standalone system: Combine with proper risk management, price action analysis, and fundamental awareness
Signal quality matters: Higher quality scores (>60%) have significantly better win rates
Regime awareness is key: Adapt strategy to market structure (trending vs ranging)
Volume reliability: Volume-weighting works best on liquid assets with reliable volume data
Timeframe alignment: Use appropriate base period and chart timeframe combination (e.g., base=10 on 4H chart vs. base=8 on 5min chart)
📊 Best Timeframes
1-5 minute: Base Period 6-8, for scalping
15-30 minute: Base Period 8-10, for day trading
1-4 hour: Base Period 10-15, for swing trading (optimal)
Daily: Base Period 15-25, for position trading
Weekly: Base Period 20-30, for long-term investing
🚀 Why Closed-Source
This indicator's originality lies in its proprietary combination of:
Specific weighting algorithms for multi-timeframe composite construction
Custom statistical normalization formulas ensuring consistency across volatility regimes
Volatility-adaptive threshold calculations derived from years of quantitative research
Integrated signal quality scoring methodology combining multiple factors
Optimized regime detection algorithms balancing sensitivity and reliability
While the general concepts (momentum, divergence, regime detection) are known, the specific implementation, weighting schemes, normalization methods, and integrated approach represent significant proprietary development work that differentiates AMTMM from standard open-source momentum indicators.
📝 Version History
v1.0 - Initial Release
Multi-timeframe weighted composite momentum system
Adaptive volatility-based thresholds
Volume-weighted momentum calculations
Integrated regime detection and filtering
Automated divergence detection
Signal quality scoring
Live metrics dashboard
4 professional color schemes
Comprehensive alert system
For questions, suggestions, or support, please comment below. Happy trading! 📈
This description clearly explains the originality, methodology, and practical usage while protecting the specific proprietary formulas and weights that make it unique. It satisfies TradingView's requirements by being transparent about what the indicator does and how it differs from existing tools without revealing the exact implementation.
SSI-O - Super Strength Indicator (overlay) [Da_Prof]This is the overlay version of the Super Strength Indicator (SSI). The SSI is a combination of the money flow indicator (MFI), stochastic (Stoch) and relative strength index (RSI). These indicators are averaged together with weightings tested via months of backtesting to produce the SSI algorithm that is not just a simple average or summation of these indicators. The SSI is a sensitive indicator that detects exhaustion of momentum for all assets.
The overlay version of the SSI shows triangles above/below the price when there is high/low risk. The high risk is colored purple. The extreme high risk is colored red. The low risk is colored blue/green and the extreme low risk is colored green.
Weightings of each into the indicator can be changed. If changing the weighting, it is best to ensure the percentages add up to 300%. For example, if changing the RSI weight to 120%, it is best to drop the MFI and Stoch to 90% each.
The RSI SMA is default set at 1. This means the indicator uses the RSI with no smoothing. If changing to greater than 1, then the indicator uses the moving average smoothed RSI.
The default for the Stoch is to use the K only. The D can be used by changing the weightings.
SSI - Super Strength Indicator [Da_Prof]The Super Strength Indicator (SSI) is a combination of the money flow indicator (MFI), stochastic (Stoch) and relative strength index (RSI). These indicators are averaged together with weightings tested via months of backtesting to produce the SSI algorithm that is not just a simple average or summation of these indicators. The SSI is a sensitive indicator that detects exhaustion of momentum for all assets.
The SSI shows background colors when there is high/low risk. The high risk is colored purple. The extreme high risk is colored red. The low risk is colored blue/green and the extreme low risk is colored green.
Weightings of each into the indicator can be changed. If changing the weighting, it is best to ensure the percentages add up to 300%. For example, if changing the RSI weight to 120%, it is best to drop the MFI and Stoch to 90% each.
The RSI SMA is default set at 1. This means the indicator uses the RSI with no smoothing. If changing to greater than 1, then the indicator uses the moving average smoothed RSI.
The default for the Stoch is to use the K only. The D can be used by changing the weightings.
AlphaFlow - Trend DetectorOVERVIEW
AlphaFlow identifies and tracks large volume moves by combining volume analysis, price impact measurement, and conviction scoring to separate significant institutional moves from normal trading activity. Rather than just flagging high volume, this indicator evaluates whether large trades actually moved the market and assigns conviction levels based on multiple confirmation factors.
WHAT MAKES THIS ORIGINAL
This is not simply a volume indicator or volume-weighted price tracker. The originality lies in the multi-factor conviction scoring system that evaluates whether large volume moves represent genuine institutional conviction or just noise.
Key Differentiators:
- Combines volume ratio AND price impact (volume alone doesn't mean conviction)
- Conviction scoring system that weighs trend alignment, follow-through, and volume persistence
- Cumulative flow tracking that shows persistent directional pressure over time
- Market regime detection (bullish/bearish/sideways) based on flow dynamics
- Tiered signal system (EXTREME/HIGH/MEDIUM conviction) rather than binary signals
This approach solves the problem of volume spikes that don't lead to meaningful price action, or price moves on low volume that don't persist.
HOW IT WORKS
1. Whale Detection Engine:
Volume Qualification: Compares current volume to a rolling average (default 50 bars). Whale activity requires volume to be at least 1.5x the average (adjustable).
Price Impact Requirement: Volume alone isn't enough. The bar must also show significant price movement (default 0.1% minimum). This filters out high-volume consolidation where no one is actually committed to direction.
Direction Identification: Bullish whale = close > open on high volume. Bearish whale = close < open on high volume.
2. Conviction Scoring System:
The indicator doesn't just flag whale activity - it evaluates conviction through multiple factors:
Base Conviction: Calculated from (volume_ratio × price_impact) / 10
This gives higher scores to moves with both exceptional volume AND large price swings.
Trend Alignment Bonus (1.5x multiplier): Whale moves aligned with the 20-period EMA trend receive higher conviction scores. Institutional money tends to accumulate with the trend, not against it.
Follow-Through Bonus (1.3x multiplier): After whale activity, does price continue in that direction over the next bars (default 3)? Genuine conviction shows persistence.
Volume Persistence (1.2x multiplier): Is elevated volume sustained over multiple bars, or is it a one-time spike? The 3-bar average volume ratio above 1.5x indicates sustained interest.
Conviction Levels:
- EXTREME: Score > 15 (large whale emoji labels, highest confidence)
- HIGH: Score > 8 (triangle signals, strong confidence)
- MEDIUM: Score > 3 (small triangles, moderate confidence)
- LOW: Score < 3 (not plotted to reduce noise)
3. Cumulative Flow Analysis:
Rather than treating each whale move in isolation, the indicator tracks cumulative flow using an EMA of whale activity. This reveals persistent directional pressure.
Flow Calculation: Each whale bar contributes (whale_strength × direction) to the flow. Strength is volume_ratio × price_impact_percent.
Flow Momentum: Rate of change in the cumulative flow (5-bar change)
Flow Acceleration: Second derivative (3-bar change of momentum)
These metrics reveal whether whale activity is accelerating, decelerating, or reversing.
4. Market Regime Detection:
Bullish Regime: Cumulative flow > 2 AND momentum positive
Bearish Regime: Cumulative flow < -2 AND momentum negative
Sideways Regime: Neither condition met
The background color reflects the current regime, helping traders understand the broader context.
5. Flow Strength Meter:
The main plot normalizes cumulative flow to a -100 to +100 scale based on the 100-bar range. This provides a consistent visual reference regardless of the asset or timeframe.
Extreme levels at ±50 indicate particularly strong directional flow where reversals or consolidation become more likely.
HOW TO USE IT
Settings Configuration:
Whale Detection Section:
- Volume Average Period (default 50): Shorter periods make detection more sensitive to recent volume changes. Longer periods require more exceptional volume to trigger.
- Whale Volume Multiplier (default 1.5): How much above average volume must be to qualify. Lower = more signals. Higher = only extreme moves.
- Minimum Price Impact (default 0.1%): Filters out high-volume bars that didn't actually move price. Adjust based on asset volatility.
Trend Analysis:
- Trend Strength Period (default 20): EMA period for trend alignment bonus
- Confirmation Bars (default 3): How many bars to check for follow-through
Visual Settings:
- Flow Strength Meter: Main plot showing normalized cumulative flow
- Conviction Labels: Detailed labels showing volume ratio and price impact on extreme/high conviction whales
- Trend Background: Color-coded regime indication
Signal Interpretation:
EXTREME Conviction (Whale Emoji Labels):
These are the highest confidence signals. Large volume with significant price impact, aligned with trend, showing follow-through. These often mark the beginning or continuation of strong moves.
HIGH Conviction (Large Triangles):
Strong signals meeting most criteria. Good for main entries or adding to positions.
MEDIUM Conviction (Small Triangles):
Whale activity present but with fewer confirmation factors. Use for partial positions or require additional confirmation.
Flow Strength Meter:
- Above zero and rising: Bullish flow building
- Below zero and falling: Bearish flow building
- Approaching ±50: Extreme readings, watch for exhaustion
- Crossing zero: Flow regime change
Dashboard Information:
The top-right table shows:
- Current regime (bullish/bearish/sideways)
- Flow strength value
- Last whale direction
- Conviction level of last whale
- Current volume ratio
- Flow momentum direction
- Indicator status
Trading Strategies:
Trend Following: Take EXTREME and HIGH conviction signals aligned with the flow meter direction. Enter when flow is positive and rising for bullish whales, negative and falling for bearish whales.
Regime-Based: Only trade in bullish/bearish regimes (colored backgrounds). Avoid trading in sideways regimes where whale moves tend to reverse quickly.
Flow Reversals: When flow meter crosses zero with EXTREME conviction whale in the new direction, this often marks regime changes.
Exhaustion Plays: When flow reaches ±50 extreme levels, watch for EXTREME conviction whales in the opposite direction as potential reversal signals.
TECHNICAL DETAILS
Volume Ratio = Current Volume / SMA(Volume, Period)
Price Impact % = ABS(Close - Open) / Open × 100
Whale Detected = (Volume Ratio >= Multiplier) AND (Price Impact >= Minimum)
Whale Direction = Close > Open ? 1 : -1
Base Conviction = (Volume Ratio × Price Impact %) / 10
Trend Alignment = Whale Direction == Trend Direction ? 1.5 : 1.0
Follow-Through = Price continues whale direction over N bars ? 1.3 : 1.0
Volume Persistence = SMA(Volume Ratio, 3) > 1.5 ? 1.2 : 1.0
Final Conviction = Base × Trend Alignment × Follow-Through × Volume Persistence
Whale Flow = Whale Detected ? (Volume Ratio × Price Impact × Direction) : 0
Cumulative Flow = EMA(Whale Flow, 20)
Flow Momentum = Change(Cumulative Flow, 5)
Flow Acceleration = Change(Momentum, 3)
Normalized Flow Strength = (Cumulative Flow / Highest(ABS(Cumulative Flow), 100)) × 100
WHAT THIS SOLVES
Common Volume Indicator Problems:
- Volume spikes that don't move price (consolidation noise)
- Price moves on low volume that quickly reverse
- No differentiation between strong and weak volume signals
- Treating all high-volume bars equally regardless of context
- No measure of whether volume represents conviction or panic
Whale Flow Solutions:
- Requires both volume AND price impact for signals
- Conviction scoring separates strong moves from weak ones
- Cumulative flow shows persistent pressure vs isolated spikes
- Trend alignment and follow-through filter low-quality signals
- Tiered system lets traders choose their confidence threshold
LIMITATIONS
- Cannot identify individual whales or attribute volume to specific entities
- High volume can come from many sources (whales, retail panic, algo activity)
- Works best on liquid assets with consistent volume patterns
- Less reliable on low-volume assets or during market closures
- Conviction scoring thresholds may need adjustment per asset/timeframe
- Does not predict future whale activity, only identifies it after bars close
- Flow can remain at extremes longer than expected during strong trends
- False signals can occur during news events or earnings
- Not a standalone trading system - requires risk management and other analysis
Best used in combination with price action, support/resistance, and broader market context.
EDUCATIONAL VALUE
For traders learning about:
- Volume analysis beyond simple volume indicators
- Multi-factor signal confirmation systems
- Market regime and flow concepts
- Conviction-based scoring methodologies
- Cumulative indicator design
- Normalized plotting for cross-asset comparison
- Pine Script table and dashboard creation
Not financial advice.
AlphaMACD - Adaptive MACD with Efficiency RatioOVERVIEW
AlphaMACD is an adaptive implementation of the classic MACD indicator that dynamically adjusts its calculation periods based on market efficiency. Unlike traditional MACD which uses fixed periods (typically 12, 26, 9), this indicator adapts its fast and slow EMA periods in real-time based on how efficiently the market is trending.
WHAT MAKES THIS ORIGINAL
This is not a simple MACD with different settings or colors. The core innovation is the adaptive period calculation using Kaufman's Efficiency Ratio, which was originally developed for the Adaptive Moving Average (AMA). This indicator applies that adaptive logic to MACD itself.
Key Differences from Standard MACD:
- Periods dynamically adjust between user-defined ranges (default: 8-21 for fast, 21-55 for slow)
- Uses Kaufman's Efficiency Ratio to measure market trendiness
- Implements gap protection to prevent extreme spikes from market gaps
- Includes market regime detection to filter signals in choppy conditions
- Provides multi-timeframe trend confirmation
HOW IT WORKS
1. Efficiency Ratio Calculation:
The indicator calculates market efficiency by comparing the absolute price change over a period to the sum of absolute price changes within that period. High efficiency = strong trending market. Low efficiency = choppy/sideways market.
2. Adaptive Period Adjustment:
- In trending markets (high efficiency): Periods move toward the minimum values for faster response
- In choppy markets (low efficiency): Periods move toward the maximum values for slower, more stable signals
- The "Sensitivity" parameter controls how aggressively periods adapt (0.5 to 5.0)
3. Gap Protection:
The custom adaptive EMA function detects abnormal price gaps (moves larger than 3x the typical ATR-based change) and limits their impact on the calculation. This prevents weekends or news gaps from causing extreme MACD spikes.
4. Signal Quality Filtering:
- Market regime detection identifies trending vs sideways conditions
- Momentum filter (RSI-based) prevents signals during overextended moves
- Signal strength calculation helps identify high-confidence setups
- Sideways market signals are marked with warning symbols
5. Multi-Timeframe Analysis:
The indicator compares current timeframe MACD with a higher timeframe (default 60 min) to provide context and filter against-trend signals.
HOW TO USE IT
Settings:
- Core Settings: Define the minimum and maximum periods for fast/slow EMAs
- Sensitivity: Higher values make the indicator more responsive to market changes
- Multi-timeframe: Set a higher timeframe for trend confirmation
- Visual options: Customize appearance and enable/disable features
Signal Interpretation:
- Strong bullish/bearish signals (large triangles): High-confidence entries in trending markets
- Warning signals (small ⚠): Crossovers in sideways markets - use caution or skip
- Divergence labels ("DIV"): Price and MACD diverging - potential reversal
- Background color: Green tint = trending market, Orange tint = sideways market
The Information Table shows:
- Current market regime (trending or sideways)
- Market efficiency percentage (how clean the trend is)
- Current adaptive fast and slow periods
- Higher timeframe trend direction
- Current signal strength
Best Practices:
- In trending markets: Trust strong signals, avoid warning signals
- In sideways markets: Reduce position sizes or skip trades entirely
- Use higher timeframe confirmation for better signal quality
- Adjust sensitivity based on your trading timeframe (higher for intraday, lower for swing)
TECHNICAL DETAILS
Calculation Method:
- Efficiency Ratio = ABS(Close - Close ) / SUM(ABS(Close - Close ), Period)
- Smoothed Efficiency = EMA(Efficiency Ratio, 5)
- Fast Period = Fast_Min + (Fast_Max - Fast_Min) × (1 - Smoothed_Efficiency × Sensitivity)
- Slow Period = Slow_Min + (Slow_Max - Slow_Min) × (1 - Smoothed_Efficiency × Sensitivity)
- Adaptive EMA uses standard EMA formula with gap detection and limiting
- MACD = Fast Adaptive EMA - Slow Adaptive EMA
- Signal = EMA(MACD, Signal Period)
- Histogram = MACD - Signal
The adaptive periods are calculated on every bar, so the MACD responds faster in trending conditions and stabilizes during consolidation.
WHAT THIS SOLVES
Standard MACD Problems:
- Fixed periods don't adapt to changing market conditions
- Too many false signals in sideways markets
- Whipsaws during low-volatility consolidation
- Price gaps can cause misleading spikes
AlphaMACD Solutions:
- Periods automatically adjust to market state
- Market regime filter identifies and warns about sideways conditions
- Adaptive smoothing reduces whipsaws
- Gap protection prevents false extremes
LIMITATIONS
- Like all indicators, this does not predict the future
- Requires trending markets for optimal performance
- Adaptive calculation means backtesting results will differ from fixed-period MACD
- More complex than standard MACD - requires understanding of adaptive concepts
- The adaptive periods mean you cannot directly compare this to traditional MACD studies
This indicator is best used as part of a complete trading system, not as a standalone signal generator.
EDUCATIONAL VALUE
For traders learning about:
- Adaptive indicators and market efficiency concepts
- Kaufman's Adaptive Moving Average principles applied to oscillators
- Market regime detection and signal filtering
- Gap handling in technical indicators
- Multi-timeframe analysis integration
Not Financial advice.
MACD Pro - Multi-Filter Smart Divergence System# MACD Pro - Multi-Filter Smart Divergence System
## Professional MACD with Advanced Filtering & Automatic Divergence Detection
Transform the classic MACD indicator with professional-grade filters, automated divergence detection, and pre-optimized profiles for different markets.
---
## KEY FEATURES
### Smart Signal Filtering
- **Zero-Line Territory Filter** - Eliminates weak crossovers
- **3-Period Confirmation** - Reduces false signals
- **Minimum Distance Threshold** - Filters out noise
- **Multi-Indicator Confirmation** - RSI + Volume validation
### Automatic Divergence Detection
- **Visual Divergence Lines** - Connects price and MACD pivots automatically
- **Bullish/Bearish Recognition** - Real-time identification
- **Customizable Lookback** - Adjust sensitivity
- **Clean Display** - Managed line limits
### Pre-Optimized Market Profiles
- **S&P 500** (2/60/2) - Tested +3.63% annual
- **Gold** (14/48/3) - Optimized for volatility
- **Forex 30m** (24/52/9) - 24/7 market adapted
- **Scalping 1m** (5/13/6) - Quick trades
- **Linda Raschke** (3/10/16) - Classic scalping
- **Swing Trading** (8/24/9) - Higher timeframes
### Advanced Technical Features
- **ATR Normalization** - Volatility adaptation
- **Predictive Forecast** - Linear regression projection
- **Multi-Timeframe View** - Higher TF overlay
- **Volume Analysis** - Spike confirmation
- **Professional Dashboard** - Real-time metrics
---
## HOW TO USE
**Quick Start:**
1. Enable "Use Optimized Profile"
2. Select your market type
3. Watch for signal arrows and divergence lines
4. Confirm with dashboard metrics
**Signal Types:**
- 🔺 Green Triangle = Bullish crossover (filtered)
- 🔻 Red Triangle = Bearish crossover (filtered)
- ⚪ Small Circle = Conservative zero-line cross
- 🟢 Green Line = Bullish divergence
- 🔴 Red Line = Bearish divergence
---
## CUSTOMIZATION
**Filters:** Toggle each filter independently for your risk tolerance
**Divergence:** Adjust lookback period, line width, and maximum displayed lines
**Confirmation:** Customize RSI levels and volume spike thresholds
**Display:** Choose histogram, forecast, and multi-timeframe options
---
## ALERT CONDITIONS
- MACD Long Signal
- MACD Short Signal
- Bullish Divergence
- Bearish Divergence
---
## IMPORTANT NOTES
**Repainting:** Divergence detection uses historical pivots and may redraw. Crossover signals are non-repainting.
**Disclaimer:** Pre-optimized profiles based on historical data. Past performance does not guarantee future results. This indicator is for educational purposes only, not financial advice.
---
## BEST PRACTICES
**Timeframes:**
- 1-5m → Scalping profile
- 15-30m → Forex profile
- 1-4h → Swing profile
- Daily → S&P 500/Gold profiles
**Market Conditions:**
- Trending → Focus on momentum
- Ranging → Enable all filters, watch divergences
- Volatile → Use ATR normalization
**Combine With:** Support/resistance levels, trendlines, moving averages, and price action analysis.
---
## WHY MACD PRO?
| Feature | Standard MACD | MACD Pro |
|---------|--------------|----------|
| Signal Filters | ❌ | ✅ 5 Advanced |
| Divergence | ❌ Manual | ✅ Automatic |
| Market Profiles | ❌ | ✅ 7 Optimized |
| Volume Filter | ❌ | ✅ Built-in |
| Multi-Timeframe | ❌ | ✅ Yes |
| ATR Adaptation | ❌ | ✅ Yes |
---
**If you find this indicator useful, please boost 🚀**
*Protected source code. Compatible with all TradingView plans.*