AI-Weighted RSI (Zeiierman)█ Overview
AI-Weighted RSI (Zeiierman) is an adaptive oscillator that enhances classic RSI by applying a correlation-weighted prediction layer. Instead of looking only at RSI values directly, this indicator continuously evaluates how other price- and volume-based features (returns, volatility, volume shifts) correlate with RSI, and then weights them accordingly to project the next RSI state.
The result is a smoother, forward-looking RSI framework that adapts to market conditions in real time.
By leveraging feature correlation instead of static formulas, AI-Weighted RSI behaves like a lightweight learning model, adjusting its emphasis depending on which features are most aligned with RSI behavior during the current regime.
█ How It Works
⚪ Feature Extraction
Each bar, the script computes features: log returns, RSI itself, ATR% (volatility), volume, and volume log-change.
⚪ Correlation Screening
Over a rolling learning window, it measures the correlation of each feature against RSI. The strongest relationships are ranked and selected.
⚪ Adaptive Weighting
Features are standardized (z-scored), then combined using their signed correlations as weights, building a rolling, adaptive prediction of RSI.
⚪ Prediction to RSI Weight
The predicted RSI is mapped back into a “weight” scale (±2 by default). Above 0 = bullish bias, below 0 = bearish bias, with color-graded fills to visualize overbought/oversold pressure.
⚪ Signal Line
A smoothing option (signal length) overlays a moving average of the AI-Weighted RSI for clearer trend confirmation.
█ Why AI-Weighted RSI
⚪ Adaptive to Market Regime
Because the model re-evaluates correlations continuously, it naturally shifts which features dominate, sometimes volatility explains RSI best, sometimes volume, sometimes returns.
⚪ Forward-Looking Bias
Instead of simply reflecting RSI, the model provides a projection, helping anticipate shifts in momentum before RSI itself flips.
█ How to Use
⚪ Directional Bias
Read the RSI relative to 0. Above = bullish momentum bias, below = bearish.
⚪ Overbought / Oversold Zones
Shaded fills beyond +0.5 or -0.5 highlight extremes where RSI pressure often exhausts.
⚪ Divergences
When price makes new highs/lows but AI-Weighted RSI fails to confirm, it often signals weakening momentum.
█ Settings
RSI Length: Lookback for the core RSI calculation.
Signal Length: Smoothing applied to the AI-Weighted RSI output.
Learning Window: Bars used for correlation learning and z-scoring.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Oszillatoren
ATAI Volume analysis with price action V 1.00ATAI Volume Analysis with Price Action
1. Introduction
1.1 Overview
ATAI Volume Analysis with Price Action is a composite indicator designed for TradingView. It combines per‑side volume data —that is, how much buying and selling occurs during each bar—with standard price‑structure elements such as swings, trend lines and support/resistance. By blending these elements the script aims to help a trader understand which side is in control, whether a breakout is genuine, when markets are potentially exhausted and where liquidity providers might be active.
The indicator is built around TradingView’s up/down volume feed accessed via the TradingView/ta/10 library. The following excerpt from the script illustrates how this feed is configured:
import TradingView/ta/10 as tvta
// Determine lower timeframe string based on user choice and chart resolution
string lower_tf_breakout = use_custom_tf_input ? custom_tf_input :
timeframe.isseconds ? "1S" :
timeframe.isintraday ? "1" :
timeframe.isdaily ? "5" : "60"
// Request up/down volume (both positive)
= tvta.requestUpAndDownVolume(lower_tf_breakout)
Lower‑timeframe selection. If you do not specify a custom lower timeframe, the script chooses a default based on your chart resolution: 1 second for second charts, 1 minute for intraday charts, 5 minutes for daily charts and 60 minutes for anything longer. Smaller intervals provide a more precise view of buyer and seller flow but cover fewer bars. Larger intervals cover more history at the cost of granularity.
Tick vs. time bars. Many trading platforms offer a tick / intrabar calculation mode that updates an indicator on every trade rather than only on bar close. Turning on one‑tick calculation will give the most accurate split between buy and sell volume on the current bar, but it typically reduces the amount of historical data available. For the highest fidelity in live trading you can enable this mode; for studying longer histories you might prefer to disable it. When volume data is completely unavailable (some instruments and crypto pairs), all modules that rely on it will remain silent and only the price‑structure backbone will operate.
Figure caption, Each panel shows the indicator’s info table for a different volume sampling interval. In the left chart, the parentheses “(5)” beside the buy‑volume figure denote that the script is aggregating volume over five‑minute bars; the center chart uses “(1)” for one‑minute bars; and the right chart uses “(1T)” for a one‑tick interval. These notations tell you which lower timeframe is driving the volume calculations. Shorter intervals such as 1 minute or 1 tick provide finer detail on buyer and seller flow, but they cover fewer bars; longer intervals like five‑minute bars smooth the data and give more history.
Figure caption, The values in parentheses inside the info table come directly from the Breakout — Settings. The first row shows the custom lower-timeframe used for volume calculations (e.g., “(1)”, “(5)”, or “(1T)”)
2. Price‑Structure Backbone
Even without volume, the indicator draws structural features that underpin all other modules. These features are always on and serve as the reference levels for subsequent calculations.
2.1 What it draws
• Pivots: Swing highs and lows are detected using the pivot_left_input and pivot_right_input settings. A pivot high is identified when the high recorded pivot_right_input bars ago exceeds the highs of the preceding pivot_left_input bars and is also higher than (or equal to) the highs of the subsequent pivot_right_input bars; pivot lows follow the inverse logic. The indicator retains only a fixed number of such pivot points per side, as defined by point_count_input, discarding the oldest ones when the limit is exceeded.
• Trend lines: For each side, the indicator connects the earliest stored pivot and the most recent pivot (oldest high to newest high, and oldest low to newest low). When a new pivot is added or an old one drops out of the lookback window, the line’s endpoints—and therefore its slope—are recalculated accordingly.
• Horizontal support/resistance: The highest high and lowest low within the lookback window defined by length_input are plotted as horizontal dashed lines. These serve as short‑term support and resistance levels.
• Ranked labels: If showPivotLabels is enabled the indicator prints labels such as “HH1”, “HH2”, “LL1” and “LL2” near each pivot. The ranking is determined by comparing the price of each stored pivot: HH1 is the highest high, HH2 is the second highest, and so on; LL1 is the lowest low, LL2 is the second lowest. In the case of equal prices the newer pivot gets the better rank. Labels are offset from price using ½ × ATR × label_atr_multiplier, with the ATR length defined by label_atr_len_input. A dotted connector links each label to the candle’s wick.
2.2 Key settings
• length_input: Window length for finding the highest and lowest values and for determining trend line endpoints. A larger value considers more history and will generate longer trend lines and S/R levels.
• pivot_left_input, pivot_right_input: Strictness of swing confirmation. Higher values require more bars on either side to form a pivot; lower values create more pivots but may include minor swings.
• point_count_input: How many pivots are kept in memory on each side. When new pivots exceed this number the oldest ones are discarded.
• label_atr_len_input and label_atr_multiplier: Determine how far pivot labels are offset from the bar using ATR. Increasing the multiplier moves labels further away from price.
• Styling inputs for trend lines, horizontal lines and labels (color, width and line style).
Figure caption, The chart illustrates how the indicator’s price‑structure backbone operates. In this daily example, the script scans for bars where the high (or low) pivot_right_input bars back is higher (or lower) than the preceding pivot_left_input bars and higher or lower than the subsequent pivot_right_input bars; only those bars are marked as pivots.
These pivot points are stored and ranked: the highest high is labelled “HH1”, the second‑highest “HH2”, and so on, while lows are marked “LL1”, “LL2”, etc. Each label is offset from the price by half of an ATR‑based distance to keep the chart clear, and a dotted connector links the label to the actual candle.
The red diagonal line connects the earliest and latest stored high pivots, and the green line does the same for low pivots; when a new pivot is added or an old one drops out of the lookback window, the end‑points and slopes adjust accordingly. Dashed horizontal lines mark the highest high and lowest low within the current lookback window, providing visual support and resistance levels. Together, these elements form the structural backbone that other modules reference, even when volume data is unavailable.
3. Breakout Module
3.1 Concept
This module confirms that a price break beyond a recent high or low is supported by a genuine shift in buying or selling pressure. It requires price to clear the highest high (“HH1”) or lowest low (“LL1”) and, simultaneously, that the winning side shows a significant volume spike, dominance and ranking. Only when all volume and price conditions pass is a breakout labelled.
3.2 Inputs
• lookback_break_input : This controls the number of bars used to compute moving averages and percentiles for volume. A larger value smooths the averages and percentiles but makes the indicator respond more slowly.
• vol_mult_input : The “spike” multiplier; the current buy or sell volume must be at least this multiple of its moving average over the lookback window to qualify as a breakout.
• rank_threshold_input (0–100) : Defines a volume percentile cutoff: the current buyer/seller volume must be in the top (100−threshold)%(100−threshold)% of all volumes within the lookback window. For example, if set to 80, the current volume must be in the top 20 % of the lookback distribution.
• ratio_threshold_input (0–1) : Specifies the minimum share of total volume that the buyer (for a bullish breakout) or seller (for bearish) must hold on the current bar; the code also requires that the cumulative buyer volume over the lookback window exceeds the seller volume (and vice versa for bearish cases).
• use_custom_tf_input / custom_tf_input : When enabled, these inputs override the automatic choice of lower timeframe for up/down volume; otherwise the script selects a sensible default based on the chart’s timeframe.
• Label appearance settings : Separate options control the ATR-based offset length, offset multiplier, label size and colors for bullish and bearish breakout labels, as well as the connector style and width.
3.3 Detection logic
1. Data preparation : Retrieve per‑side volume from the lower timeframe and take absolute values. Build rolling arrays of the last lookback_break_input values to compute simple moving averages (SMAs), cumulative sums and percentile ranks for buy and sell volume.
2. Volume spike: A spike is flagged when the current buy (or, in the bearish case, sell) volume is at least vol_mult_input times its SMA over the lookback window.
3. Dominance test: The buyer’s (or seller’s) share of total volume on the current bar must meet or exceed ratio_threshold_input. In addition, the cumulative sum of buyer volume over the window must exceed the cumulative sum of seller volume for a bullish breakout (and vice versa for bearish). A separate requirement checks the sign of delta: for bullish breakouts delta_breakout must be non‑negative; for bearish breakouts it must be non‑positive.
4. Percentile rank: The current volume must fall within the top (100 – rank_threshold_input) percent of the lookback distribution—ensuring that the spike is unusually large relative to recent history.
5. Price test: For a bullish signal, the closing price must close above the highest pivot (HH1); for a bearish signal, the close must be below the lowest pivot (LL1).
6. Labeling: When all conditions above are satisfied, the indicator prints “Breakout ↑” above the bar (bullish) or “Breakout ↓” below the bar (bearish). Labels are offset using half of an ATR‑based distance and linked to the candle with a dotted connector.
Figure caption, (Breakout ↑ example) , On this daily chart, price pushes above the red trendline and the highest prior pivot (HH1). The indicator recognizes this as a valid breakout because the buyer‑side volume on the lower timeframe spikes above its recent moving average and buyers dominate the volume statistics over the lookback period; when combined with a close above HH1, this satisfies the breakout conditions. The “Breakout ↑” label appears above the candle, and the info table highlights that up‑volume is elevated relative to its 11‑bar average, buyer share exceeds the dominance threshold and money‑flow metrics support the move.
Figure caption, In this daily example, price breaks below the lowest pivot (LL1) and the lower green trendline. The indicator identifies this as a bearish breakout because sell‑side volume is sharply elevated—about twice its 11‑bar average—and sellers dominate both the bar and the lookback window. With the close falling below LL1, the script triggers a Breakout ↓ label and marks the corresponding row in the info table, which shows strong down volume, negative delta and a seller share comfortably above the dominance threshold.
4. Market Phase Module (Volume Only)
4.1 Concept
Not all markets trend; many cycle between periods of accumulation (buying pressure building up), distribution (selling pressure dominating) and neutral behavior. This module classifies the current bar into one of these phases without using ATR , relying solely on buyer and seller volume statistics. It looks at net flows, ratio changes and an OBV‑like cumulative line with dual‑reference (1‑ and 2‑bar) trends. The result is displayed both as on‑chart labels and in a dedicated row of the info table.
4.2 Inputs
• phase_period_len: Number of bars over which to compute sums and ratios for phase detection.
• phase_ratio_thresh : Minimum buyer share (for accumulation) or minimum seller share (for distribution, derived as 1 − phase_ratio_thresh) of the total volume.
• strict_mode: When enabled, both the 1‑bar and 2‑bar changes in each statistic must agree on the direction (strict confirmation); when disabled, only one of the two references needs to agree (looser confirmation).
• Color customisation for info table cells and label styling for accumulation and distribution phases, including ATR length, multiplier, label size, colors and connector styles.
• show_phase_module: Toggles the entire phase detection subsystem.
• show_phase_labels: Controls whether on‑chart labels are drawn when accumulation or distribution is detected.
4.3 Detection logic
The module computes three families of statistics over the volume window defined by phase_period_len:
1. Net sum (buyers minus sellers): net_sum_phase = Σ(buy) − Σ(sell). A positive value indicates a predominance of buyers. The code also computes the differences between the current value and the values 1 and 2 bars ago (d_net_1, d_net_2) to derive up/down trends.
2. Buyer ratio: The instantaneous ratio TF_buy_breakout / TF_tot_breakout and the window ratio Σ(buy) / Σ(total). The current ratio must exceed phase_ratio_thresh for accumulation or fall below 1 − phase_ratio_thresh for distribution. The first and second differences of the window ratio (d_ratio_1, d_ratio_2) determine trend direction.
3. OBV‑like cumulative net flow: An on‑balance volume analogue obv_net_phase increments by TF_buy_breakout − TF_sell_breakout each bar. Its differences over the last 1 and 2 bars (d_obv_1, d_obv_2) provide trend clues.
The algorithm then combines these signals:
• For strict mode , accumulation requires: (a) current ratio ≥ threshold, (b) cumulative ratio ≥ threshold, (c) both ratio differences ≥ 0, (d) net sum differences ≥ 0, and (e) OBV differences ≥ 0. Distribution is the mirror case.
• For loose mode , it relaxes the directional tests: either the 1‑ or the 2‑bar difference needs to agree in each category.
If all conditions for accumulation are satisfied, the phase is labelled “Accumulation” ; if all conditions for distribution are satisfied, it’s labelled “Distribution” ; otherwise the phase is “Neutral” .
4.4 Outputs
• Info table row : Row 8 displays “Market Phase (Vol)” on the left and the detected phase (Accumulation, Distribution or Neutral) on the right. The text colour of both cells matches a user‑selectable palette (typically green for accumulation, red for distribution and grey for neutral).
• On‑chart labels : When show_phase_labels is enabled and a phase persists for at least one bar, the module prints a label above the bar ( “Accum” ) or below the bar ( “Dist” ) with a dashed or dotted connector. The label is offset using ATR based on phase_label_atr_len_input and phase_label_multiplier and is styled according to user preferences.
Figure caption, The chart displays a red “Dist” label above a particular bar, indicating that the accumulation/distribution module identified a distribution phase at that point. The detection is based on seller dominance: during that bar, the net buyer-minus-seller flow and the OBV‑style cumulative flow were trending down, and the buyer ratio had dropped below the preset threshold. These conditions satisfy the distribution criteria in strict mode. The label is placed above the bar using an ATR‑based offset and a dashed connector. By the time of the current bar in the screenshot, the phase indicator shows “Neutral” in the info table—signaling that neither accumulation nor distribution conditions are currently met—yet the historical “Dist” label remains to mark where the prior distribution phase began.
Figure caption, In this example the market phase module has signaled an Accumulation phase. Three bars before the current candle, the algorithm detected a shift toward buyers: up‑volume exceeded its moving average, down‑volume was below average, and the buyer share of total volume climbed above the threshold while the on‑balance net flow and cumulative ratios were trending upwards. The blue “Accum” label anchored below that bar marks the start of the phase; it remains on the chart because successive bars continue to satisfy the accumulation conditions. The info table confirms this: the “Market Phase (Vol)” row still reads Accumulation, and the ratio and sum rows show buyers dominating both on the current bar and across the lookback window.
5. OB/OS Spike Module
5.1 What overbought/oversold means here
In many markets, a rapid extension up or down is often followed by a period of consolidation or reversal. The indicator interprets overbought (OB) conditions as abnormally strong selling risk at or after a price rally and oversold (OS) conditions as unusually strong buying risk after a decline. Importantly, these are not direct trade signals; rather they flag areas where caution or contrarian setups may be appropriate.
5.2 Inputs
• minHits_obos (1–7): Minimum number of oscillators that must agree on an overbought or oversold condition for a label to print.
• syncWin_obos: Length of a small sliding window over which oscillator votes are smoothed by taking the maximum count observed. This helps filter out choppy signals.
• Volume spike criteria: kVolRatio_obos (ratio of current volume to its SMA) and zVolThr_obos (Z‑score threshold) across volLen_obos. Either threshold can trigger a spike.
• Oscillator toggles and periods: Each of RSI, Stochastic (K and D), Williams %R, CCI, MFI, DeMarker and Stochastic RSI can be independently enabled; their periods are adjustable.
• Label appearance: ATR‑based offset, size, colors for OB and OS labels, plus connector style and width.
5.3 Detection logic
1. Directional volume spikes: Volume spikes are computed separately for buyer and seller volumes. A sell volume spike (sellVolSpike) flags a potential OverBought bar, while a buy volume spike (buyVolSpike) flags a potential OverSold bar. A spike occurs when the respective volume exceeds kVolRatio_obos times its simple moving average over the window or when its Z‑score exceeds zVolThr_obos.
2. Oscillator votes: For each enabled oscillator, calculate its overbought and oversold state using standard thresholds (e.g., RSI ≥ 70 for OB and ≤ 30 for OS; Stochastic %K/%D ≥ 80 for OB and ≤ 20 for OS; etc.). Count how many oscillators vote for OB and how many vote for OS.
3. Minimum hits: Apply the smoothing window syncWin_obos to the vote counts using a maximum‑of‑last‑N approach. A candidate bar is only considered if the smoothed OB hit count ≥ minHits_obos (for OverBought) or the smoothed OS hit count ≥ minHits_obos (for OverSold).
4. Tie‑breaking: If both OverBought and OverSold spike conditions are present on the same bar, compare the smoothed hit counts: the side with the higher count is selected; ties default to OverBought.
5. Label printing: When conditions are met, the bar is labelled as “OverBought X/7” above the candle or “OverSold X/7” below it. “X” is the number of oscillators confirming, and the bracket lists the abbreviations of contributing oscillators. Labels are offset from price using half of an ATR‑scaled distance and can optionally include a dotted or dashed connector line.
Figure caption, In this chart the overbought/oversold module has flagged an OverSold signal. A sell‑off from the prior highs brought price down to the lower trend‑line, where the bar marked “OverSold 3/7 DeM” appears. This label indicates that on that bar the module detected a buy‑side volume spike and that at least three of the seven enabled oscillators—in this case including the DeMarker—were in oversold territory. The label is printed below the candle with a dotted connector, signaling that the market may be temporarily exhausted on the downside. After this oversold print, price begins to rebound towards the upper red trend‑line and higher pivot levels.
Figure caption, This example shows the overbought/oversold module in action. In the left‑hand panel you can see the OB/OS settings where each oscillator (RSI, Stochastic, Williams %R, CCI, MFI, DeMarker and Stochastic RSI) can be enabled or disabled, and the ATR length and label offset multiplier adjusted. On the chart itself, price has pushed up to the descending red trendline and triggered an “OverBought 3/7” label. That means the sell‑side volume spiked relative to its average and three out of the seven enabled oscillators were in overbought territory. The label is offset above the candle by half of an ATR and connected with a dashed line, signaling that upside momentum may be overextended and a pause or pullback could follow.
6. Buyer/Seller Trap Module
6.1 Concept
A bull trap occurs when price appears to break above resistance, attracting buyers, but fails to sustain the move and quickly reverses, leaving a long upper wick and trapping late entrants. A bear trap is the opposite: price breaks below support, lures in sellers, then snaps back, leaving a long lower wick and trapping shorts. This module detects such traps by looking for price structure sweeps, order‑flow mismatches and dominance reversals. It uses a scoring system to differentiate risk from confirmed traps.
6.2 Inputs
• trap_lookback_len: Window length used to rank extremes and detect sweeps.
• trap_wick_threshold: Minimum proportion of a bar’s range that must be wick (upper for bull traps, lower for bear traps) to qualify as a sweep.
• trap_score_risk: Minimum aggregated score required to flag a trap risk. (The code defines a trap_score_confirm input, but confirmation is actually based on price reversal rather than a separate score threshold.)
• trap_confirm_bars: Maximum number of bars allowed for price to reverse and confirm the trap. If price does not reverse in this window, the risk label will expire or remain unconfirmed.
• Label settings: ATR length and multiplier for offsetting, size, colours for risk and confirmed labels, and connector style and width. Separate settings exist for bull and bear traps.
• Toggle inputs: show_trap_module and show_trap_labels enable the module and control whether labels are drawn on the chart.
6.3 Scoring logic
The module assigns points to several conditions and sums them to determine whether a trap risk is present. For bull traps, the score is built from the following (bear traps mirror the logic with highs and lows swapped):
1. Sweep (2 points): Price trades above the high pivot (HH1) but fails to close above it and leaves a long upper wick at least trap_wick_threshold × range. For bear traps, price dips below the low pivot (LL1), fails to close below and leaves a long lower wick.
2. Close break (1 point): Price closes beyond HH1 or LL1 without leaving a long wick.
3. Candle/delta mismatch (2 points): The candle closes bullish yet the order flow delta is negative or the seller ratio exceeds 50%, indicating hidden supply. Conversely, a bearish close with positive delta or buyer dominance suggests hidden demand.
4. Dominance inversion (2 points): The current bar’s buyer volume has the highest rank in the lookback window while cumulative sums favor sellers, or vice versa.
5. Low‑volume break (1 point): Price crosses the pivot but total volume is below its moving average.
The total score for each side is compared to trap_score_risk. If the score is high enough, a “Bull Trap Risk” or “Bear Trap Risk” label is drawn, offset from the candle by half of an ATR‑scaled distance using a dashed outline. If, within trap_confirm_bars, price reverses beyond the opposite level—drops back below the high pivot for bull traps or rises above the low pivot for bear traps—the label is upgraded to a solid “Bull Trap” or “Bear Trap” . In this version of the code, there is no separate score threshold for confirmation: the variable trap_score_confirm is unused; confirmation depends solely on a successful price reversal within the specified number of bars.
Figure caption, In this example the trap module has flagged a Bear Trap Risk. Price initially breaks below the most recent low pivot (LL1), but the bar closes back above that level and leaves a long lower wick, suggesting a failed push lower. Combined with a mismatch between the candle direction and the order flow (buyers regain control) and a reversal in volume dominance, the aggregate score exceeds the risk threshold, so a dashed “Bear Trap Risk” label prints beneath the bar. The green and red trend lines mark the current low and high pivot trajectories, while the horizontal dashed lines show the highest and lowest values in the lookback window. If, within the next few bars, price closes decisively above the support, the risk label would upgrade to a solid “Bear Trap” label.
Figure caption, In this example the trap module has identified both ends of a price range. Near the highs, price briefly pushes above the descending red trendline and the recent pivot high, but fails to close there and leaves a noticeable upper wick. That combination of a sweep above resistance and order‑flow mismatch generates a Bull Trap Risk label with a dashed outline, warning that the upside break may not hold. At the opposite extreme, price later dips below the green trendline and the labelled low pivot, then quickly snaps back and closes higher. The long lower wick and subsequent price reversal upgrade the previous bear‑trap risk into a confirmed Bear Trap (solid label), indicating that sellers were caught on a false breakdown. Horizontal dashed lines mark the highest high and lowest low of the lookback window, while the red and green diagonals connect the earliest and latest pivot highs and lows to visualize the range.
7. Sharp Move Module
7.1 Concept
Markets sometimes display absorption or climax behavior—periods when one side steadily gains the upper hand before price breaks out with a sharp move. This module evaluates several order‑flow and volume conditions to anticipate such moves. Users can choose how many conditions must be met to flag a risk and how many (plus a price break) are required for confirmation.
7.2 Inputs
• sharp Lookback: Number of bars in the window used to compute moving averages, sums, percentile ranks and reference levels.
• sharpPercentile: Minimum percentile rank for the current side’s volume; the current buy (or sell) volume must be greater than or equal to this percentile of historical volumes over the lookback window.
• sharpVolMult: Multiplier used in the volume climax check. The current side’s volume must exceed this multiple of its average to count as a climax.
• sharpRatioThr: Minimum dominance ratio (current side’s volume relative to the opposite side) used in both the instant and cumulative dominance checks.
• sharpChurnThr: Maximum ratio of a bar’s range to its ATR for absorption/churn detection; lower values indicate more absorption (large volume in a small range).
• sharpScoreRisk: Minimum number of conditions that must be true to print a risk label.
• sharpScoreConfirm: Minimum number of conditions plus a price break required for confirmation.
• sharpCvdThr: Threshold for cumulative delta divergence versus price change (positive for bullish accumulation, negative for bearish distribution).
• Label settings: ATR length (sharpATRlen) and multiplier (sharpLabelMult) for positioning labels, label size, colors and connector styles for bullish and bearish sharp moves.
• Toggles: enableSharp activates the module; show_sharp_labels controls whether labels are drawn.
7.3 Conditions (six per side)
For each side, the indicator computes six boolean conditions and sums them to form a score:
1. Dominance (instant and cumulative):
– Instant dominance: current buy volume ≥ sharpRatioThr × current sell volume.
– Cumulative dominance: sum of buy volumes over the window ≥ sharpRatioThr × sum of sell volumes (and vice versa for bearish checks).
2. Accumulation/Distribution divergence: Over the lookback window, cumulative delta rises by at least sharpCvdThr while price fails to rise (bullish), or cumulative delta falls by at least sharpCvdThr while price fails to fall (bearish).
3. Volume climax: The current side’s volume is ≥ sharpVolMult × its average and the product of volume and bar range is the highest in the lookback window.
4. Absorption/Churn: The current side’s volume divided by the bar’s range equals the highest value in the window and the bar’s range divided by ATR ≤ sharpChurnThr (indicating large volume within a small range).
5. Percentile rank: The current side’s volume percentile rank is ≥ sharp Percentile.
6. Mirror logic for sellers: The above checks are repeated with buyer and seller roles swapped and the price break levels reversed.
Each condition that passes contributes one point to the corresponding side’s score (0 or 1). Risk and confirmation thresholds are then applied to these scores.
7.4 Scoring and labels
• Risk: If scoreBull ≥ sharpScoreRisk, a “Sharp ↑ Risk” label is drawn above the bar. If scoreBear ≥ sharpScoreRisk, a “Sharp ↓ Risk” label is drawn below the bar.
• Confirmation: A risk label is upgraded to “Sharp ↑” when scoreBull ≥ sharpScoreConfirm and the bar closes above the highest recent pivot (HH1); for bearish cases, confirmation requires scoreBear ≥ sharpScoreConfirm and a close below the lowest pivot (LL1).
• Label positioning: Labels are offset from the candle by ATR × sharpLabelMult (full ATR times multiplier), not half, and may include a dashed or dotted connector line if enabled.
Figure caption, In this chart both bullish and bearish sharp‑move setups have been flagged. Earlier in the range, a “Sharp ↓ Risk” label appears beneath a candle: the sell‑side score met the risk threshold, signaling that the combination of strong sell volume, dominance and absorption within a narrow range suggested a potential sharp decline. The price did not close below the lower pivot, so this label remains a “risk” and no confirmation occurred. Later, as the market recovered and volume shifted back to the buy side, a “Sharp ↑ Risk” label prints above a candle near the top of the channel. Here, buy‑side dominance, cumulative delta divergence and a volume climax aligned, but price has not yet closed above the upper pivot (HH1), so the alert is still a risk rather than a confirmed sharp‑up move.
Figure caption, In this chart a Sharp ↑ label is displayed above a candle, indicating that the sharp move module has confirmed a bullish breakout. Prior bars satisfied the risk threshold — showing buy‑side dominance, positive cumulative delta divergence, a volume climax and strong absorption in a narrow range — and this candle closes above the highest recent pivot, upgrading the earlier “Sharp ↑ Risk” alert to a full Sharp ↑ signal. The green label is offset from the candle with a dashed connector, while the red and green trend lines trace the high and low pivot trajectories and the dashed horizontals mark the highest and lowest values of the lookback window.
8. Market‑Maker / Spread‑Capture Module
8.1 Concept
Liquidity providers often “capture the spread” by buying and selling in almost equal amounts within a very narrow price range. These bars can signal temporary congestion before a move or reflect algorithmic activity. This module flags bars where both buyer and seller volumes are high, the price range is only a few ticks and the buy/sell split remains close to 50%. It helps traders spot potential liquidity pockets.
8.2 Inputs
• scalpLookback: Window length used to compute volume averages.
• scalpVolMult: Multiplier applied to each side’s average volume; both buy and sell volumes must exceed this multiple.
• scalpTickCount: Maximum allowed number of ticks in a bar’s range (calculated as (high − low) / minTick). A value of 1 or 2 captures ultra‑small bars; increasing it relaxes the range requirement.
• scalpDeltaRatio: Maximum deviation from a perfect 50/50 split. For example, 0.05 means the buyer share must be between 45% and 55%.
• Label settings: ATR length, multiplier, size, colors, connector style and width.
• Toggles : show_scalp_module and show_scalp_labels to enable the module and its labels.
8.3 Signal
When, on the current bar, both TF_buy_breakout and TF_sell_breakout exceed scalpVolMult times their respective averages and (high − low)/minTick ≤ scalpTickCount and the buyer share is within scalpDeltaRatio of 50%, the module prints a “Spread ↔” label above the bar. The label uses the same ATR offset logic as other modules and draws a connector if enabled.
Figure caption, In this chart the spread‑capture module has identified a potential liquidity pocket. Buyer and seller volumes both spiked above their recent averages, yet the candle’s range measured only a couple of ticks and the buy/sell split stayed close to 50 %. This combination met the module’s criteria, so it printed a grey “Spread ↔” label above the bar. The red and green trend lines link the earliest and latest high and low pivots, and the dashed horizontals mark the highest high and lowest low within the current lookback window.
9. Money Flow Module
9.1 Concept
To translate volume into a monetary measure, this module multiplies each side’s volume by the closing price. It tracks buying and selling system money default currency on a per-bar basis and sums them over a chosen period. The difference between buy and sell currencies (Δ$) shows net inflow or outflow.
9.2 Inputs
• mf_period_len_mf: Number of bars used for summing buy and sell dollars.
• Label appearance settings: ATR length, multiplier, size, colors for up/down labels, and connector style and width.
• Toggles: Use enableMoneyFlowLabel_mf and showMFLabels to control whether the module and its labels are displayed.
9.3 Calculations
• Per-bar money: Buy $ = TF_buy_breakout × close; Sell $ = TF_sell_breakout × close. Their difference is Δ$ = Buy $ − Sell $.
• Summations: Over mf_period_len_mf bars, compute Σ Buy $, Σ Sell $ and ΣΔ$ using math.sum().
• Info table entries: Rows 9–13 display these values as texts like “↑ USD 1234 (1M)” or “ΣΔ USD −5678 (14)”, with colors reflecting whether buyers or sellers dominate.
• Money flow status: If Δ$ is positive the bar is marked “Money flow in” ; if negative, “Money flow out” ; if zero, “Neutral”. The cumulative status is similarly derived from ΣΔ.Labels print at the bar that changes the sign of ΣΔ, offset using ATR × label multiplier and styled per user preferences.
Figure caption, The chart illustrates a steady rise toward the highest recent pivot (HH1) with price riding between a rising green trend‑line and a red trend‑line drawn through earlier pivot highs. A green Money flow in label appears above the bar near the top of the channel, signaling that net dollar flow turned positive on this bar: buy‑side dollar volume exceeded sell‑side dollar volume, pushing the cumulative sum ΣΔ$ above zero. In the info table, the “Money flow (bar)” and “Money flow Σ” rows both read In, confirming that the indicator’s money‑flow module has detected an inflow at both bar and aggregate levels, while other modules (pivots, trend lines and support/resistance) remain active to provide structural context.
In this example the Money Flow module signals a net outflow. Price has been trending downward: successive high pivots form a falling red trend‑line and the low pivots form a descending green support line. When the latest bar broke below the previous low pivot (LL1), both the bar‑level and cumulative net dollar flow turned negative—selling volume at the close exceeded buying volume and pushed the cumulative Δ$ below zero. The module reacts by printing a red “Money flow out” label beneath the candle; the info table confirms that the “Money flow (bar)” and “Money flow Σ” rows both show Out, indicating sustained dominance of sellers in this period.
10. Info Table
10.1 Purpose
When enabled, the Info Table appears in the lower right of your chart. It summarises key values computed by the indicator—such as buy and sell volume, delta, total volume, breakout status, market phase, and money flow—so you can see at a glance which side is dominant and which signals are active.
10.2 Symbols
• ↑ / ↓ — Up (↑) denotes buy volume or money; down (↓) denotes sell volume or money.
• MA — Moving average. In the table it shows the average value of a series over the lookback period.
• Σ (Sigma) — Cumulative sum over the chosen lookback period.
• Δ (Delta) — Difference between buy and sell values.
• B / S — Buyer and seller share of total volume, expressed as percentages.
• Ref. Price — Reference price for breakout calculations, based on the latest pivot.
• Status — Indicates whether a breakout condition is currently active (True) or has failed.
10.3 Row definitions
1. Up volume / MA up volume – Displays current buy volume on the lower timeframe and its moving average over the lookback period.
2. Down volume / MA down volume – Shows current sell volume and its moving average; sell values are formatted in red for clarity.
3. Δ / ΣΔ – Lists the difference between buy and sell volume for the current bar and the cumulative delta volume over the lookback period.
4. Σ / MA Σ (Vol/MA) – Total volume (buy + sell) for the bar, with the ratio of this volume to its moving average; the right cell shows the average total volume.
5. B/S ratio – Buy and sell share of the total volume: current bar percentages and the average percentages across the lookback period.
6. Buyer Rank / Seller Rank – Ranks the bar’s buy and sell volumes among the last (n) bars; lower rank numbers indicate higher relative volume.
7. Σ Buy / Σ Sell – Sum of buy and sell volumes over the lookback window, indicating which side has traded more.
8. Breakout UP / DOWN – Shows the breakout thresholds (Ref. Price) and whether the breakout condition is active (True) or has failed.
9. Market Phase (Vol) – Reports the current volume‑only phase: Accumulation, Distribution or Neutral.
10. Money Flow – The final rows display dollar amounts and status:
– ↑ USD / Σ↑ USD – Buy dollars for the current bar and the cumulative sum over the money‑flow period.
– ↓ USD / Σ↓ USD – Sell dollars and their cumulative sum.
– Δ USD / ΣΔ USD – Net dollar difference (buy minus sell) for the bar and cumulatively.
– Money flow (bar) – Indicates whether the bar’s net dollar flow is positive (In), negative (Out) or neutral.
– Money flow Σ – Shows whether the cumulative net dollar flow across the chosen period is positive, negative or neutral.
The chart above shows a sequence of different signals from the indicator. A Bull Trap Risk appears after price briefly pushes above resistance but fails to hold, then a green Accum label identifies an accumulation phase. An upward breakout follows, confirmed by a Money flow in print. Later, a Sharp ↓ Risk warns of a possible sharp downturn; after price dips below support but quickly recovers, a Bear Trap label marks a false breakdown. The highlighted info table in the center summarizes key metrics at that moment, including current and average buy/sell volumes, net delta, total volume versus its moving average, breakout status (up and down), market phase (volume), and bar‑level and cumulative money flow (In/Out).
11. Conclusion & Final Remarks
This indicator was developed as a holistic study of market structure and order flow. It brings together several well‑known concepts from technical analysis—breakouts, accumulation and distribution phases, overbought and oversold extremes, bull and bear traps, sharp directional moves, market‑maker spread bars and money flow—into a single Pine Script tool. Each module is based on widely recognized trading ideas and was implemented after consulting reference materials and example strategies, so you can see in real time how these concepts interact on your chart.
A distinctive feature of this indicator is its reliance on per‑side volume: instead of tallying only total volume, it separately measures buy and sell transactions on a lower time frame. This approach gives a clearer view of who is in control—buyers or sellers—and helps filter breakouts, detect phases of accumulation or distribution, recognize potential traps, anticipate sharp moves and gauge whether liquidity providers are active. The money‑flow module extends this analysis by converting volume into currency values and tracking net inflow or outflow across a chosen window.
Although comprehensive, this indicator is intended solely as a guide. It highlights conditions and statistics that many traders find useful, but it does not generate trading signals or guarantee results. Ultimately, you remain responsible for your positions. Use the information presented here to inform your analysis, combine it with other tools and risk‑management techniques, and always make your own decisions when trading.
Machine Learning Gaussian Mixture Model | AlphaNattMachine Learning Gaussian Mixture Model | AlphaNatt
A revolutionary oscillator that uses Gaussian Mixture Models (GMM) with unsupervised machine learning to identify market regimes and automatically adapt momentum calculations - bringing statistical pattern recognition techniques to trading.
"Markets don't follow a single distribution - they're a mixture of different regimes. This oscillator identifies which regime we're in and adapts accordingly."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🤖 THE MACHINE LEARNING
Gaussian Mixture Models (GMM):
Unlike K-means clustering which assigns hard boundaries, GMM uses probabilistic clustering :
Models data as coming from multiple Gaussian distributions
Each market regime is a different Gaussian component
Provides probability of belonging to each regime
More sophisticated than simple clustering
Expectation-Maximization Algorithm:
The indicator continuously learns and adapts using the E-M algorithm:
E-step: Calculate probability of current market belonging to each regime
M-step: Update regime parameters based on new data
Continuous learning without repainting
Adapts to changing market conditions
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 THREE MARKET REGIMES
The GMM identifies three distinct market states:
Regime 1 - Low Volatility:
Quiet, ranging markets
Uses RSI-based momentum calculation
Reduces false signals in choppy conditions
Background: Pink tint
Regime 2 - Normal Market:
Standard trending conditions
Uses Rate of Change momentum
Balanced sensitivity
Background: Gray tint
Regime 3 - High Volatility:
Strong trends or volatility events
Uses Z-score based momentum
Captures extreme moves
Background: Cyan tint
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 KEY INNOVATIONS
1. Probabilistic Regime Detection:
Instead of binary regime assignment, provides probabilities:
30% Regime 1, 60% Regime 2, 10% Regime 3
Smooth transitions between regimes
No sudden indicator jumps
2. Weighted Momentum Calculation:
Combines three different momentum formulas
Weights based on regime probabilities
Automatically adapts to market conditions
3. Confidence Indicator:
Shows how certain the model is (white line)
High confidence = strong regime identification
Low confidence = transitional market state
Line transparency changes with confidence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ PARAMETER OPTIMIZATION
Training Period (50-500):
50-100: Quick adaptation to recent conditions
100: Balanced (default)
200-500: Stable regime identification
Number of Components (2-5):
2: Simple bull/bear regimes
3: Low/Normal/High volatility (default)
4-5: More granular regime detection
Learning Rate (0.1-1.0):
0.1-0.3: Slow, stable learning
0.3: Balanced (default)
0.5-1.0: Fast adaptation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TRADING STRATEGIES
Visual Signals:
Cyan gradient: Bullish momentum
Magenta gradient: Bearish momentum
Background color: Current regime
Confidence line: Model certainty
1. Regime-Based Trading:
Regime 1 (pink): Expect mean reversion
Regime 2 (gray): Standard trend following
Regime 3 (cyan): Strong momentum trades
2. Confidence-Filtered Signals:
Only trade when confidence > 70%
High confidence = clearer market state
Avoid transitions (low confidence)
3. Adaptive Position Sizing:
Regime 1: Smaller positions (choppy)
Regime 2: Normal positions
Regime 3: Larger positions (trending)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 ADVANTAGES OVER OTHER ML INDICATORS
vs K-Means Clustering:
Soft clustering (probabilities) vs hard boundaries
Captures uncertainty and transitions
More mathematically robust
vs KNN (K-Nearest Neighbors):
Unsupervised learning (no historical labels needed)
Continuous adaptation
Lower computational complexity
vs Neural Networks:
Interpretable (know what each regime means)
No overfitting issues
Works with limited data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 PERFORMANCE CHARACTERISTICS
Best Market Conditions:
Markets with clear regime shifts
Volatile to trending transitions
Multi-timeframe analysis
Cryptocurrency markets (high regime variation)
Key Strengths:
Automatically adapts to market changes
No manual parameter adjustment needed
Smooth transitions between regimes
Probabilistic confidence measure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 TECHNICAL BACKGROUND
Gaussian Mixture Models are used extensively in:
Speech recognition (Google Assistant)
Computer vision (facial recognition)
Astronomy (galaxy classification)
Genomics (gene expression analysis)
Finance (risk modeling at investment banks)
The E-M algorithm was developed at Stanford in 1977 and is one of the most important algorithms in unsupervised machine learning.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 PRO TIPS
Watch regime transitions: Best opportunities often occur when regimes change
Combine with volume: High volume + regime change = strong signal
Use confidence filter: Avoid low confidence periods
Multi-timeframe: Compare regimes across timeframes
Adjust position size: Scale based on identified regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT NOTES
Machine learning adapts but doesn't predict the future
Best used with other confirmation indicators
Allow time for model to learn (100+ bars)
Not financial advice - educational purposes
Backtest thoroughly on your instruments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏆 CONCLUSION
The GMM Momentum Oscillator brings institutional-grade machine learning to retail trading. By identifying market regimes probabilistically and adapting momentum calculations accordingly, it provides:
Automatic adaptation to market conditions
Clear regime identification with confidence levels
Smooth, professional signal generation
True unsupervised machine learning
This isn't just another indicator with "ML" in the name - it's a genuine implementation of Gaussian Mixture Models with the Expectation-Maximization algorithm, the same technology used in:
Google's speech recognition
Tesla's computer vision
NASA's data analysis
Wall Street risk models
"Let the machine learn the market regimes. Trade with statistical confidence."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt | Machine Learning Trading Systems
Version: 1.0
Algorithm: Gaussian Mixture Model with E-M
Classification: Unsupervised Learning Oscillator
Not financial advice. Always DYOR.
Hurst Momentum Oscillator | AlphaNattHurst Momentum Oscillator | AlphaNatt
An adaptive oscillator that combines the Hurst Exponent - which identifies whether markets are trending or mean-reverting - with momentum analysis to create signals that automatically adjust to market regime.
"The Hurst Exponent reveals a hidden truth: markets aren't always trending. This oscillator knows when to ride momentum and when to fade it."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 THE MATHEMATICS
Hurst Exponent (H):
Measures the long-term memory of time series:
H > 0.5: Trending (persistent) behavior
H = 0.5: Random walk
H < 0.5: Mean-reverting behavior
Originally developed for analyzing Nile river flooding patterns, now used in:
Fractal market analysis
Network traffic prediction
Climate modeling
Financial markets
The Innovation:
This oscillator multiplies momentum by the Hurst coefficient:
When trending (H > 0.5): Momentum is amplified
When mean-reverting (H < 0.5): Momentum is reduced
Result: Adaptive signals based on market regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 KEY ADVANTAGES
Regime Adaptive: Automatically adjusts to trending vs ranging markets
False Signal Reduction: Reduces momentum signals in mean-reverting markets
Trend Amplification: Stronger signals when trends are persistent
Mathematical Edge: Based on fractal dimension analysis
No Repainting: All calculations on historical data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TRADING SIGNALS
Visual Interpretation:
Cyan zones: Bullish momentum in trending market
Magenta zones: Bearish momentum or mean reversion
Background tint: Blue = trending, Pink = mean-reverting
Gradient intensity: Signal strength
Trading Strategies:
1. Trend Following:
Trade momentum signals when background is blue (trending)
2. Mean Reversion:
Fade extreme readings when background is pink
3. Regime Transition:
Watch for background color changes as early warning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 OPTIMAL USAGE
Best Conditions:
Strong trending markets (crypto bull runs)
Clear ranging markets (forex sessions)
Regime transitions
Multi-timeframe analysis
Market Applications:
Crypto: Excellent for identifying trend persistence
Forex: Detects when pairs are ranging
Stocks: Identifies momentum stocks
Commodities: Catches persistent trends
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt | Fractal Market Analysis
Version: 1.0
Classification: Adaptive Regime Oscillator
Not financial advice. Always DYOR.
RSI ALL INOverbought and Oversold with Candle Pattern Confluences
1. Overbought / Oversold signal only
2. RSI + Engulfing Candle
3. RSI + Hammer/Shooting Star
DNSE VN301!, ADX Momentum StrategyDiscover the tailored Pine Script for trading VN30F1M Futures Contracts intraday.
This strategy applies the Statistical Method (IQR) to break down the components of the ADX, calculating the threshold of "normal" momentum fluctuations in price to identify potential breakouts for entry and exit signals. The script automatically closes all positions by 14:30 to avoid overnight holdings.
www.tradingview.com
Settings & Backtest Results:
- Chart: 30-minute timeframe
- Initial capital: VND 100 million
- Position size: 4 contracts per trade (includes trading fees, excludes tax)
- Backtest period: Sep-2021 to Sep-2025
- Return: over 270% (with 5 ticks slippage)
- Trades executed: 1,000+
- Win rate: ~40%
- Profit factor: 1.2
Default Script Settings:
Calculates the acceleration of changes in the +DI and -DI components of the ADX, using IQR to define "normal" momentum fluctuations (adjustable via Lookback period).
Calculates the difference between each bar’s Open and Close prices, using IQR to define "normal" gaps (adjustable via Lookback period).
Entry & Exit Conditions:
Entry Long: Change in +DI or -DI > Avg IQR Value AND Close Price > Previous Close
Exit Long: (all 4 conditions must be met)
- Change in +DI or -DI > Avg IQR Value
- RSI < Previous RSI
- Close–Open Gap > Avg IQR Gap
- Close Price < Previous Close
Entry Short: Change in +DI or -DI > Avg IQR Value AND Close Price < Previous Close
Exit Short: (all 4 conditions must be met)
- Change in +DI or -DI > Avg IQR Value
- RSI > Previous RSI
- Close–Open Gap > Avg IQR Gap
- Close Price > Previous Close
Disclaimers:
Trading futures contracts carries a high degree of risk, and price movements can be highly volatile. This script is intended as a reference tool only. It should be used by individuals who fully understand futures trading, have assessed their own risk tolerance, and are knowledgeable about the strategy’s logic.
All investment decisions are the sole responsibility of the user. DNSE bears no liability for any potential losses incurred from applying this strategy in real trading. Past performance does not guarantee future results. Please contact us directly if you have specific questions about this script.
RSI Pivots with Divergence Overlay█ OVERVIEW
The RSI Pivots with Divergence Overlay indicator is an advanced tool based on RSI, displaying dynamic bands on the price chart to simplify the identification of overbought and oversold conditions. Pivot points and divergences between them are derived from these bands, providing a comprehensive view of the market and enabling the creation of various trading strategies based on this single indicator.
█ CONCEPTS
Areas where RSI exits the bands are often reversal points in the market. The concept of this indicator is to highlight places where the probability of a trend reversal increases. Therefore, pivots and divergences have been added to better identify these key moments. Additionally, the bands allow viewing the market context in relation to the RSI indicator, facilitating analysis of momentum and volatility.
█ KEY FEATURES
Dynamic Bands and RSI Signals: The bands are calculated based on the closing price and RSI value, with dynamic scaling adjusted to market volatility. The upper band corresponds to overbought levels, the lower to oversold, and the midline is their average. The price level relative to the bands serves as a visual RSI signal, indicating potential overbought or oversold conditions.
Pivot Points: The indicator identifies local price highs and lows in relation to RSI levels. The pivot level is taken from the high/low of the candle. A high pivot is detected when the high of the candle reaches a local maximum after crossing the upper RSI level (overbought), signaling a potential reversal. A low pivot appears after a local price minimum following a drop below the lower RSI level (oversold), indicating a possible uptrend reversal. The pivot length (default 2 bars) defines the search range for these extremes, meaning that with a length of 2, a potential divergence signal will appear with a 2-candle delay, as this is the minimum time required to confirm a local pivot. Pivot lines are drawn on the chart, and labels display the RSI value (from the close of the candle) and price at the detection moment. Pivot lines disappear after the detection of the next low pivot for lower lines and high pivot for upper lines, but unbreached lines or those with high volume may still serve as support or resistance levels.
Divergence Detection: The indicator automatically detects divergences to predict trend changes. Bearish divergence occurs when the price forms a higher high pivot, but the RSI (from the close of the candle) is lower than in the previous pivot, indicating weakening upward momentum and a potential bearish reversal. Bullish divergence appears when the price forms a lower low pivot, but the RSI is higher, suggesting building momentum and a possible bullish reversal. Divergences are marked in pivot labels (e.g., "Bear Div" or "Bull Div") and supported by alerts upon detection.
Return Signals: The indicator generates buy and sell signals based on RSI (price) returning to the bands after extreme conditions, independently of pivots and divergences. A buy signal is triggered when RSI (price) crosses above the lower level (exiting oversold), suggesting a potential price rise toward the midline or upper band. A sell signal occurs when RSI (price) falls below the upper level (exiting overbought), indicating a possible price drop toward the lower band. Signals are visualized as arrows (up/down triangles) on the chart, with customizable colors.
█ CONFIGURATION
The indicator offers extensive customization options:
RSI Length (rsiLength): Sets the number of periods used to calculate RSI (default 14).
RSI Upper Level (rsiUpper): Defines the overbought threshold (default 70).
RSI Lower Level (rsiLower): Defines the oversold threshold (default 30).
Band Scaling (scale): Determines the scaling multiplier for bands based on market volatility (default 15.0).
SMA Length for Candle Midpoint (length): Number of periods for calculating the moving average of candle midpoints (default 200). This parameter is used to smooth price data, enabling more accurate volatility assessment and band width adjustment to market dynamics.
Pivot Length (pivotLength): Sets the range (in bars) for detecting local price extremes (default 2).
Pivot Label Offset (pivotLabelOffset): Multiplier for the candle range to position pivot labels (default 0.3).
Show Bands (showBands): Enables/disables the display of bands on the chart.
Show Fill (showFill): Enables/disables the fill between bands and the midline.
Show Pivot Lines (showPivotLines): Enables/disables pivot lines on the chart.
Show Pivot Labels (showPivotLabels): Enables/disables labels with RSI and price values at pivots.
Show Return Signals (showReturnSignals): Enables/disables the display of buy and sell signals.
Colors and Style: Customizable colors for bands, fills, pivot lines, labels, and line widths (default 1).
█ USAGE
The indicator performs best when combined with other technical analysis tools, such as Fibonacci levels, moving averages, or trendlines, to confirm pivot, divergence, and return signals. It enables traders to identify key reversal points, detect hidden trend weaknesses through divergences, and confirm trade entries with return signals.
Usage Examples:
Price bounces off a previous pivot with high volume – this increases the probability of a trend change or correction.
A similar situation when RSI is outside the bands strengthens the signal.
If divergence occurs in addition, we have further confirmation.
This can be combined with Fibonacci levels to check if Fibo zones overlap with pivot lines – this may increase the chance of a strong price reaction.
█ ALERTS
The indicator supports alerts for:
Buy and sell signals (RSI returning to bands).
Detection of bearish and bullish divergences.
RSI ADX Bollinger Analysis High-level purpose and design philosophy
This indicator — RSI-ADX-Bollinger Analysis — is a compact, educational market-analysis toolkit that blends momentum (RSI), trend strength (ADX), volatility structure (Bollinger Bands) and simple volumetrics to provide traders a snapshot of market condition and trade idea quality. The design philosophy is explicit and layered: use each component to answer a different question about price action (momentum, conviction, volatility, participation), then combine answers to form a more robust, explainable signal. The mashup is intended for analysis and learning, not automatic execution: it surfaces the why behind signals so traders can test, learn and apply rules with risk management.
________________________________________
What each indicator contributes (component-by-component)
RSI (Relative Strength Index) — role and behavior: RSI measures short-term momentum by comparing recent gains to recent losses. A high RSI (near or above the overbought threshold) indicates strong recent buying pressure and potential exhaustion if price is extended. A low RSI (near or below the oversold threshold) indicates strong recent selling pressure and potential exhaustion or a value area for mean-reversion. In this dashboard RSI is used as the primary momentum trigger: it helps identify whether price is locally over-extended on the buy or sell side.
ADX (Average Directional Index) — role and behavior: ADX measures trend strength independently of direction. When ADX rises above a chosen threshold (e.g., 25), it signals that the market is trending with conviction; ADX below the threshold suggests range or weak trend. Because patterns and momentum signals perform differently in trending vs. ranging markets, ADX is used here as a filter: only when ADX indicates sufficient directional strength does the system treat RSI+BB breakouts as meaningful trade candidates.
Bollinger Bands — role and behavior: Bollinger Bands (20-period basis ± N standard deviations) show volatility envelope and relative price position vs. a volatility-adjusted mean. Price outside the upper band suggests pronounced extension relative to recent volatility; price outside the lower band suggests extended weakness. A band expansion (increasing width) signals volatility breakout potential; contraction signals range-bound conditions and potential squeeze. In this dashboard, Bollinger Bands provide the volatility/structural context: RSI extremes plus price beyond the band imply a stronger, volatility-backed move.
Volume split & basic MA trend — role and behavior: Buy-like and sell-like volume (simple heuristic using close>open or closeopen) or sell-like (close1.2 for validation and compare win rate and expectancy.
4. TF alignment: Accept signals only when higher timeframe (e.g., 4h) trend agrees — compare results.
5. Parameter sensitivity: Vary RSI threshold (70/30 vs 80/20), Bollinger stddev (2 vs 2.5), and ADX threshold (25 vs 30) and measure stability of results.
These exercises teach both statistical thinking and the specific failure modes of the mashup.
________________________________________
Limitations, failure modes and caveats (explicit & teachable)
• ADX and Bollinger measures lag during fast-moving news events — signals can be late or wrong during earnings, macro shocks, or illiquid sessions.
• Volume classification by open/close is a heuristic; it does not equal TAPEDATA, footprint or signed volume. Use it as supportive evidence, not definitive proof.
• RSI can remain overbought or oversold for extended stretches in persistent trends — relying solely on RSI extremes without ADX or BB context invites large drawdowns.
• Small-cap or low-liquidity instruments yield noisy band behavior and unreliable volume ratios.
Being explicit about these limitations is a strong point in a TradingView description — it demonstrates transparency and educational intent.
________________________________________
Originality & mashup justification (text you can paste)
This script intentionally combines classical momentum (RSI), volatility envelope (Bollinger Bands) and trend-strength (ADX) because each indicator answers a different and complementary question: RSI answers is price locally extreme?, Bollinger answers is price outside normal volatility?, and ADX answers is the market moving with conviction?. Volume participation then acts as a practical check for real market involvement. This combination is not a simple “indicator mashup”; it is a designed ensemble where each element reduces the others’ failure modes and together produce a teachable, testable signal framework. The script’s purpose is educational and analytical — to show traders how to interpret the interplay of momentum, volatility, and trend strength.
________________________________________
TradingView publication guidance & compliance checklist
To satisfy TradingView rules about mashups and descriptions, include the following items in your script description (without exposing source code):
1. Purpose statement: One or two lines describing the script’s objective (educational multi-indicator market overview and idea filter).
2. Component list: Name the major modules (RSI, Bollinger Bands, ADX, volume heuristic, SMA trend checks, signal tracking) and one-sentence reason for each.
3. How they interact: A succinct non-code explanation: “RSI finds momentum extremes; Bollinger confirms volatility expansion; ADX confirms trend strength; all three must align for a BUY/SELL.”
4. Inputs: List adjustable inputs (RSI length and thresholds, BB length & stddev, ADX threshold & smoothing, volume MA, table position/size).
5. Usage instructions: Short workflow (check TF alignment → confirm participation → define stop & R:R → backtest).
6. Limitations & assumptions: Explicitly state volume is approximated, ADX has lag, and avoid promising guaranteed profits.
7. Non-promotional language: No external contact info, ads, claims of exclusivity or guaranteed outcomes.
8. Trademark clause: If you used trademark symbols, remove or provide registration proof.
9. Risk disclaimer: Add the copy-ready disclaimer below.
This matches TradingView’s request for meaningful descriptions that explain originality and inter-component reasoning.
________________________________________
Copy-ready short publication description (paste into TradingView)
Advanced RSI-ADX-Bollinger Market Overview — educational multi-indicator dashboard. This script combines RSI (momentum extremes), Bollinger Bands (volatility envelope and band expansion), ADX (trend strength), simple SMA trend bias and a basic buy/sell volume heuristic to surface high-quality idea candidates. Signals require alignment of momentum, volatility expansion and rising ADX; volume participation is displayed to support signal confidence. Inputs are configurable (RSI length/levels, BB length/stddev, ADX length/threshold, volume MA, display options). This tool is intended for analysis and learning — not for automated execution. Users should back test and apply robust risk management. Limitations: volume classification here is a heuristic (close>open), ADX and BB measures lag in fast news events, and results vary by instrument liquidity.
________________________________________
Copy-ready risk & misuse disclaimer (paste into description or help file)
This script is provided for educational and analytical purposes only and does not constitute financial or investment advice. It does not guarantee profits. Indicators are heuristics and may give false or late signals; always back test and paper-trade before using real capital. The author is not responsible for trading losses resulting from the use or misuse of this indicator. Use proper position sizing and risk controls.
________________________________________
Risk Disclaimer: This tool is provided for education and analysis only. It is not financial advice and does not guarantee returns. Users assume all risk for trades made based on this script. Back test thoroughly and use proper risk management.
MatrixScalper Tablo + 3 Bant Osilatör
MatrixScalper “Table + 3-Band Oscillator” is a lightweight, multi-timeframe trend-momentum filter that stacks three histograms (TF1/TF2/TF3—default 5m/15m/1h) and a compact table showing EMA trend, Supertrend, RSI and MACD direction for each timeframe. Green bars/✓ mean bullish alignment, red bars/✗ bearish; mixed or gray implies neutrality. Use it to trade with the higher-timeframe bias (e.g., look for longs when 15m & 60m are bullish and the 5m band flips back to green after a pullback). It’s a filter—not a standalone signal—so combine with price action/S&R/volume; optional alerts can be added for “all-bull” or “all-bear” alignment.
BUY & SELL Probability (M5..D1) - MTFMTF Probability Indicator (M5 to D1)
Indicator — Dual Histogram with Buy/Sell Labels
This indicator is designed to provide a probabilistic bias for bullish or bearish conditions by combining three different analytical components across multiple timeframes. The goal is to reduce noise from single-indicator signals and instead highlight confluence where trend, momentum, and strength agree.
Why this combination is useful
- EMA(200) Trend Filter: Identifies whether price is trading above or below a widely used long-term moving average.
- MACD Momentum: Detects short-term directional momentum through line crossovers.
- ADX Strength: Measures how strong the trend is, preventing signals in weak or flat markets.
By combining these, the indicator avoids situations where one tool signals a trade but others do not, helping to filter out low-probability setups.
How it works
- Each timeframe (M5, M15, H1, H4, D1) generates its own trend, momentum, and strength score.
- Scores are weighted according to user-defined importance and then aggregated into a single probability.
- Proximity to recent support and resistance levels can adjust the final score, accounting for nearby barriers.
- The final probability is displayed as:
- Histogram (subwindow): Green bars for bullish probability >50%, red bars for bearish <50%.
- On-chart labels: Showing exact buy/sell percentages on the last bar for quick reference.
Inputs
- EMA length (default 200), MACD settings, ADX period.
- Weights for each timeframe and component (trend, momentum, strength).
- Optional boost for the chart’s current timeframe.
- Smoothing length for probability values.
- Lookback period for support/resistance adjustment.
How to use it
- A green histogram above zero indicates bullish probability >50%.
- A red histogram below zero indicates bearish probability >50%.
- Neutral readings near 50% show low confluence and may be best avoided.
- Users can adjust weights to emphasize higher or lower timeframes, depending on their trading style.
Notes
- This script does not guarantee profitable trades.
- Best used together with price action, volume, or additional confirmation tools.
- Signals are calculated only on closed bars to avoid repainting.
- For testing and learning purposes — not financial advice.
Chanpreet RSI(3) Extreme Rays (4H, Adjustable Style)Chanpreet RSI(3) Extreme Rays (4H)
This indicator applies a short-length RSI (3) on the 4-hour timeframe and highlights momentum extremes directly on the chart.
🔎 What it does
Detects when RSI(3) moves into overbought (>80) or oversold (<20) territory.
Groups consecutive candles inside these zones into one “event” instead of marking each bar individually.
For each event:
• In overbought → records the highest high of the stretch and marks it with a horizontal ray.
• In oversold → records the lowest low of the stretch and marks it with a horizontal ray.
Keeps only the most recent N rays (default 5, adjustable).
⚙️ Inputs
Max Rays to Keep → how many unique events are kept visible.
Ray Thickness → adjust line thickness.
Overbought Ray Color → default red.
Oversold Ray Color → default green.
📈 How to use
Apply on any chart; RSI(3) values are always calculated from 4H data (via request.security).
Use rays as reference levels that highlight recent momentum extremes or exhaustion zones.
This is not a buy/sell signal by itself — combine with your own analysis, confirmation tools, and risk management.
Best Recommended time frame is 5 mins, 10 mins & 15 mins for intraday trading.
🧩 Unique features
Groups multiple bars into a single clean ray, reducing clutter.
Uses 4H RSI(3) regardless of the chart’s active timeframe.
Fully customizable appearance (colors, thickness, max events).
⚠️ Disclaimer
This script is provided for educational and informational purposes only.
It does not constitute financial advice or guarantee performance.
Always test thoroughly and use proper risk management before trading live.
Etihad Indicator This indicator gives a buy signal when RSI is above 50 and momemntum (14) is above 0. Gives a sell signal when RSI is below 50 and momentum below 0.
🎮 Liquidity Checklist – EFI + CMF + Centered MFIWhat it is
A confirmation dashboard combining EFI (Elder Force Index), CMF (Chaikin Money Flow), and MFI (Money Flow Index).
Provides a checklist table with / conditions, glow plots, and theme/override system. Intended as confirmation tool, not a standalone signal generator.
Why combine these three?
EFI (Force): captures impulse of price change × volume strength of push. CMF (Flow): measures accumulation/distribution capital inflow or outflow.
MFI (Liquidity/Momentum): RSI with volume liquidity stretch or balance.
Aligning force + flow + liquidity avoids weak setups and highlights agreement.
How it works
EFI: EMA of ( Close × Volume). Positive = buying pressure; Negative = selling pressure.
CMF: Money Flow Multiplier × Volume, averaged relative to total volume. Above 0 = inflow; Below 0 = outflow.
MFI: built-in 0 100 oscillator.
On chart: plotted centered as (MFI 50). In table: shown as real 0 100 value.
Checklist logic
Long bias: EFI > 0; CMF > 0; MFI > 35.
Short bias: EFI < 0; CMF < 0; MFI < 65.
Between 35 65, MFI may allow both long and short (neutral liquidity zone).
What s original here
Centered MFI plotting so all indicators share a zero baseline.
Dashboard checklist table with live indicator values.
Theme engine with custom color overrides (separate plot vs. table).
Normalization toggle for EFI/CMF readability on high-volume tickers.
Inputs & settings
Lengths: EFI (13), CMF (20), MFI (14).
Themes: Arcade, Feng Shui, Samurai, Irish, Cyberpunk.
Override plot colors option; table stays theme-based.
Normalize EFI/CMF (default OFF). ON scales EFI/CMF to 100 +100 for visual balance with MFI. Logic uses raw values.
How to read
Chart: EFI & CMF as glowing columns; MFI as centered line; reference lines at 0, +15 ( 65), 15
(35).
Table: / for each condition and live values; READY row lights when all align.
Suggested use
Use as confirmation filter:
1) Define trade idea (structure, catalyst).
2) Check EFI and CMF align with bias.
3) Confirm MFI not stretched (avoid longs >65, shorts <35).
4) Look for READY tick when all three align.
Works across timeframes; many prefer 15m 1H for intraday.
Limitations
Not a trading system on its own.
CMF may be na when High == Low.
Normalization affects visuals only, not logic. Always backtest and manage risk.
Credits
EFI by Alexander Elder. CMF by Marc Chaikin.
MFI standard oscillator.
Centered-MFI plotting, checklist UI, themes, normalization: NICK789.
Disclaimer
Educational use only; not financial advice.
No guarantees of accuracy or profitability.
Markets involve risk; past performance does not guarantee results.
Etihad IndicatorBuy signal when RSI above 50 and momentum above zero. Sell signal when RSI below 50 and momentum below zero.
Комбинированный сигнал: MA10/MA40 + RSI50 + ЧайкинFriends, I share with you my indicator by strategy: crossing MA10/MA40 + RSI50 + Chaikin (above/below 0).
Indicator when the signal appears shows the entrance to the long/ short
The indicator works well on the trend. There may be false signals in the sidewall.
RSI Momentum Trend MM with Risk Per Trade [MTF]This is a comprehensive and highly customizable trend-following strategy based on RSI momentum. The core logic identifies strong directional moves when the RSI crosses user-defined thresholds, combined with an EMA trend confirmation. It is designed for traders who want granular control over their strategy's parameters, from signal generation to risk management and exit logic.
This script evolves a simple concept into a powerful backtesting tool, allowing you to test various money management and trade management theories across different timeframes.
Key Features
- RSI Momentum Signals: Uses RSI crosses above a "Positive" level or below a "Negative" level to generate trend signals. An EMA filter ensures entries align with the immediate trend.
- Multi-Timeframe (MTF) Analysis: The core RSI and EMA signals can be calculated on a higher timeframe (e.g., using 4H signals to trade on a 1H chart) to align trades with the larger trend. This feature helps to reduce noise and improve signal quality.
Advanced Money Management
- Risk per Trade %: Calculate position size based on a fixed percentage of equity you want to risk per trade.
- Full Equity: A more aggressive option to open each position with 100% of the available strategy equity.
Flexible Exit Logic: Choose from three distinct exit strategies to match your trading style
- Percentage (%) Based: Set a fixed Stop Loss and Take Profit as a percentage of the entry price.
- ATR Multiplier: Base your Stop Loss and Take Profit on the Average True Range (ATR), making your exits adaptive to market volatility.
- Trend Reversal: A true trend-following mode. A long position is held until an opposite "Negative" signal appears, and a short position is held until a "Positive" signal appears. This allows you to "let your winners run."
Backtest Date Range Filter: Easily configure a start and end date to backtest the strategy's performance during specific market periods (e.g., bull markets, bear markets, or high-volatility periods).
How to Use
RSI Settings
- Higher Timeframe: Set the timeframe for signal calculation. This must be higher than your chart's timeframe.
- RSI Length, Positive above, Negative below: Configure the core parameters for the RSI signals.
Money Management
Position Sizing Mode
- Choose "Risk per Trade" to use the Risk per Trade (%) input for precise risk control.
- Choose "Full Equity" to use 100% of your capital for each trade.
- Risk per Trade (%): Define the percentage of your equity to risk on a single trade (only works with the corresponding sizing mode).
SL/TP Calculation Mode
Select your preferred exit method from the dropdown. The strategy will automatically use the relevant inputs (e.g., % values, ATR Multiplier values, or the trend reversal logic).
Backtest Period Settings
Use the Start Date and End Date inputs to isolate a specific period for your backtest analysis.
License & Disclaimer
© waranyu.trkm — MIT License.
This script is for educational purposes only and should not be considered financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always conduct your own research and risk assessment before making any trading decisions.
VIX RSI/USDVIX/USD/DXY into rsi in one
Blue diamond=calls
White diamond = puts
yes there's some false signals due to volatility but mainly rsi for vix/usd
Tradable Tickers -
SP:SPX AMEX:SPY NASDAQ:QQQ
Multi-RSI with Stochastic Oscillator - flack0xA sophisticated momentum analysis tool combining 4 customizable RSI oscillators with an innovative Close/Close Stochastic implementation. Designed for traders seeking comprehensive momentum insights across multiple timeframes in a single, organized indicator.
Key Features:
4 Independent RSI Oscillators with default periods: 2, 3, 9, 27
Innovative Close/Close Stochastic - Compares closing prices to closing price ranges (not high/low)
Complete Customization - Individual control over periods, colors, line widths, and visibility
Reference Levels - Customizable overbought (70), oversold (30), and midline (50) levels
Smart Alert System - Crossover notifications for key momentum shifts
Unique Close/Close Stochastic Methodology:
Unlike traditional Stochastic oscillators that use high/low ranges.
Benefits of Close/Close Approach:
Eliminates Gap Noise - Ignores overnight gaps and intraday wicks
Smoother Signals - Reduces whipsaws common in traditional Stochastic
Position-Relevant - Focuses on actual settlement prices traders care about
Cleaner Momentum Reading - Pure closing price momentum without intraday volatility
Stochastic ColorStochastic Color. A momentum indicator that compares a particular closing price of an asset to a range of its prices over a specific period of time. It helps identify overbought and oversold conditions in the market. The indicator ranges from 0 to 100, with readings above 80 typically considered overbought and readings below 20 considered oversold. It is often used to anticipate potential price reversals.
Multiple Divergence Scanner (move to candles and merge scales)This indicator detects and visualizes multiple types of RSI-based divergences, including Regular, Hidden, and Dual-source (Multi) Bullish/Bearish signals. Not limited with RSI only. You can add move functions and it will automaticly combine your options.
It offers customizable score filtering, label positioning, and visual styling.
Ideal for traders who seek both technical precision and symbolic clarity in their charts.
You have to drag it to your candles after adding to your chart. Then right click on price->Merge all scales to right/left.
RSI with KAMA and Custom Buy/Sell SignalsUses Kaufman MA on the RSI to generate signals when crossing user thresholds
Daily CMO + Volume Intraday Strategy v6 by Subirrmomentum strategy. buy on next hourly candle after signal. target 5%, sl 1%