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.
متذبذبات
Quantum Edge Signals — trend-aware buy/sell signalsQuantum Edge Signals (Fixed) is a practical, performance-minded indicator for swing and trend traders. It blends StochRSI and volatility to generate buy/sell signals, then filters and classifies those signals with an optional EMA trend filter and an RSI confirmation. The indicator also draws premium/discount price zones, reports buy/sell power inside those zones, plots pivot support/resistance, and places three ATR-based targets plus a stop — all while minimizing chart redraws so objects stay anchored and won’t shift when you pan or drag the chart.
Key features
• Signal engine: StochRSI oversold/overbought conditions combined with a volatility filter (price change vs. moving average of changes).
• Strong signal classification: optional EMA fast/slow trend filter to mark stronger buys/sells.
• Non-repainting confirmation: signals are confirmed using the previous bar (the entry price is the close of the confirmed bar).
• TP/SL management: three TP levels and one SL derived from ATR. Targets are created at the signal and are recalculated only when the trend flips (adaptive without constant movement).
• Premium / Discount zones: boxes drawn around a configurable MA band; zones are created once on entry and anchored to their start bar.
• Buy / Sell power: a zone-level buy/sell ratio (smoothed up/down volume) shown as a compact label at zone entry.
• Support & resistance: pivot S/R lines and small boxed zones for visual context.
• Whale screener: optional background highlight for large-volume bars.
• Performance-first: objects are created only when needed and anchored to fixed bar indices to prevent object churn and chart hanging.
How signals and targets behave
• A signal is considered “confirmed” on the previous bar to avoid repainting. The confirmed signal’s close is used as entryPrice.
• TP/SL lines are anchored to the signal bar. By default they are created at signal time and only recalc when the EMA-based trend flips direction — this keeps targets adaptive to meaningful trend changes while avoiding per-bar jitter.
• Zones and power labels are created once when price enters the premium or discount region and stay anchored to the zone start bar (so they don’t drift when you pan/drag the chart).
Main inputs (what you’ll usually tweak)
• Signal Length, Signal Factor — control StochRSI smoothing and the volatility multiplier.
• Use 2SD Filter — require price to be outside ±2 standard deviations of MA to trigger a signal.
• Show Signals (Classic / Strong / All) — which labels to display.
• Zone Length, Zone Offset — how wide and how many bars the premium/discount zones span.
• Buy/Sell Power thresholds — set numeric cutoffs for “Weak” / “Strong” labels.
• TP/SL Factors & ATR period — the multipliers used to calculate TP1/2/3 and SL from ATR.
• Fast/Slow EMA periods — used for the strong signal / trend filter.
• S/R Strength & Zone Width — pivot lookback and how wide S/R boxes are.
Recommended usage
• Timeframes: try 1H, 4H and Daily for swing/trend setups.
• Filters: enable the Strong (EMA) filter to limit trades to the direction of the trend.
• Zones: keep zone length moderate (10–30 bars) for readability.
• Testing: run forward paper trading and walk-forward tests before using real capital.
Why this version
This release focuses on reliability and chart performance. Objects (labels, lines and boxes) are anchored to the bar that created them, and the indicator avoids repeatedly creating and deleting the same objects on every historical bar — this prevents TradingView from hanging when dragging or panning.
Limitations & notes
• TP recalculation is based on ATR at the flip bar; the script keeps the original entry price fixed to avoid repainting entries.
• If you run many other drawing-heavy indicators at the same time, TradingView may still slow down — use a single instance while testing.
• The indicator is visual/confirmational — it is not a fully automated order-execution strategy.
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// 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.
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.
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.
Lesh_ghoti_2Custom Timeframe 2 randomness, Custom Timeframe 2 randomness, Custom Timeframe 2 randomness
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.
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.
Easy-Read RSI (Signals & Zones)This custom Pine Script reimagines the traditional RSI to make signals easier to see and act on. It smooths the RSI line using an EMA, adds a signal line (a moving average of the RSI), and colors the background for quick visual reference. Green shading marks oversold conditions, red shading marks overbought conditions, and a faint yellow band highlights the neutral zone (45–55). Together, these visual cues help you instantly recognize momentum shifts and potential reversals without staring at raw numbers.
The script also plots bullish and bearish signal arrows: upward arrows appear when RSI crosses above its signal line or exits the oversold zone, while downward arrows mark when RSI crosses below its signal or falls from the overbought zone. It includes built-in TradingView alerts for each event, so you can receive notifications of key turning points automatically.
Quick-Read Guide for Easy-Read RSI
Green background: RSI is in the oversold zone (typically below 30). The market may be near a short-term bottom. Watch for an up arrow (OS↑) — this suggests a possible bullish reversal or entry point.
Red background: RSI is in the overbought zone (typically above 70). The market may be overextended to the upside. Watch for a down arrow (OB↓) — this can signal a bearish reversal or exit opportunity.
Yellow background: RSI is in the neutral zone (roughly between 45 and 55). This usually means the market is consolidating or lacks a clear direction. Signals in this area are weaker and often less reliable.
Up arrow (RSI↑MA): RSI crosses above its signal line — a sign of strengthening bullish momentum or trend continuation. Can be used as a buy or add signal when confirmed by price action.
Down arrow (RSI↓MA): RSI crosses below its signal line — a sign of weakening momentum or potential reversal to the downside. Can be used as a sell or reduce-exposure signal.
OS↑ arrow: RSI moves up out of the oversold zone. This indicates early recovery momentum and potential reversal from a dip.
OB↓ arrow: RSI moves down out of the overbought zone. This signals momentum cooling and possible reversal from a high.
JackFinance: Multiple EMA IndicatorMultiple EMA Indicator - Usage Instructions
Overview
Technical indicator displaying four exponential moving averages (EMA21, EMA52, EMA120, EMA200) for trend analysis across different timeframes.
Default Settings
EMA 21: Blue (short-term)
EMA 52: Green (medium-term)
EMA 120: Yellow (long-term)
EMA 200: Red (very long-term)
Key Features
Real-time EMA values displayed in table
Background color indicates trend vs EMA200
Customizable periods via input settings
Trading Applications
Identify trend direction using EMA alignment
Use EMA crossovers for entry/exit signals
Monitor price position relative to EMAs for support/resistance
Parameters
All EMA periods can be adjusted in indicator settings to match your trading strategy.
Notes
This is a technical analysis tool only. Combine with other indicators and risk management practices.
Volume Pressure Oscillator (VPO)🔹 Core Logic
VPO Calculation:
The indicator measures price momentum weighted by volume, smoothed by EMA, and normalized within a dynamic range to highlight relative pressure extremes.
Signal Line:
A secondary EMA of VPO acts as a signal baseline for crossovers and trend confirmation.
Entry Triggers:
Zero-line Crossovers: Momentum shifts from bearish to bullish (or vice versa).
Signal Crossovers: Confirmation of sustained directional momentum.
Filters:
Volume Filter: Only trades when volume is above the moving average.
VWAP Slope Filter: Ensures trades align with intraday institutional flow.
Higher Timeframe VWAP: Confirms multi-timeframe directional bias.
RSI Filter: Avoids overextended entries.
Optional Divergence Confirmation: Adds precision in reversal environments.
XonTrades Exit Flow | by Bu-RashidThis indicator detects potential institutional exit points and reversal zones using a powerful confluence model combining:
Volume spike analysis (institutional activity)
CVD trend flips (smart money flow reversal)
Price–CVD divergence (hidden accumulation/distribution)
Liquidity sweep detection (stop-run exhaustion)
When these elements align, the indicator highlights possible Exit Flow zones, signaling where smart capital may be closing or reversing positions.
It’s optimized for XAU/USD (Gold) and NAS100 (Nasdaq) on 5-minute and 15-minute charts, with customizable strictness for traders who prefer early or confirmed signals.
Recommended use:
Apply as a confirmation layer alongside your main strategy to identify exhaustion points and institutional exits before trend reversals.
— Developed and engineered by Bu-Rashid (XonTrades1UAE)
Multi-Resolution RSI with Machine LearningMulti-Resolution RSI
Developed by imaclone.x.
Last Updated: August 21st 2025
A single indicator that fuses my ML-RSI.ai pipeline with a classic multi-timeframe RSI. One script, dual-resolution oscillators if desired, plus a machine-learning similarity engine and modular signal-processing layers.
What it does
* Primary RSI augmented with KNN similarity engine (K, lookback, weighting). Feature embeddings include RSI magnitude, RSI momentum, volatility surface, regression slope, and price momentum vectors.
* Adaptive smoothing stack: Kalman filter recursion, Double EMA cascades, or ALMA convolution.
* Multi-resolution control for the primary oscillator timeframe.
* Optional *second* RSI projected from any timeframe for hierarchical confluence.
* Advanced visuals: upper/lower thresholds, midline, background regime highlighting, crossovers, and B/S event labels.
* Color architectures: None, Trend-Following (50-line bifurcation), or Impulse (band-breach). Optional bar tinting for full-chart context.
Inputs (groups)
* Timeframe Settings: primary + secondary RSI TF/lengths.
* Levels & Visuals: thresholds, highlights, cross events, B/S markers.
* RSI Base: smoothing toggle, MA class, ALMA sigma.
* KNN Machine Learning: enable, K neighbors, historical window, feature dimensionality, ML weighting.
* Advanced Filtering: method + intensity.
* Coloring: None, Trend-Following, Impulse.
Signals
* B flag when ML-RSI crosses upward through the lower threshold.
* S flag when ML-RSI crosses downward through the upper threshold.
* Secondary RSI = higher-timeframe confirmation, not standalone trigger.
Usage notes
* Raise ML weight + feature dimensionality for deeper similarity recognition; lower them for classic oscillator behavior.
* Kalman recursion delivers adaptive, low-lag smoothing; Double EMA and ALMA yield stronger dampening.
* Typical config: intraday primary RSI + higher-TF secondary RSI for regime anchoring.
Changelog
* v6 merge: Unified CM-style MTF RSI framework with my KNN-enhanced kernel and filter stack. One composite indicator replaces multiple scripts.
Credits
* MTF band logic inspired by earlier open-source frameworks.
* ML kernel and implementation by imaclone.x.
Disclaimer
For research and algorithmic experimentation only. No signals guaranteed.
And please kindly, for the love of God, DYOFR.
Prime Market Profile [xontrades1uae]indicator designed for high-precision intraday and scalping analysis.
It dynamically maps market structure, value areas (VAH/VAL), and point of control (POC), providing a clear visual view of where liquidity, balance, and breakout levels form throughout the session.
Features:
Real-time TPO construction for active sessions.
Automatic or custom tick calibration for gold, indices, or forex.
Highlighted POC, Value Area, and Initial Balance Range.
Smart visual clustering to detect congestion, breakout zones, and key volume nodes.
Compatible with short timeframes (1m–15m) for scalpers and day traders.
Signature:
Developed & customized by Bu-Rashid | xontrades1uae
“Precision. Liquidity. Control.” 💹
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.