BayesStack RSI [CHE]BayesStack RSI — Stacked RSI with Bayesian outcome stats and gradient visualization
Summary
BayesStack RSI builds a four-length RSI stack and evaluates it with a simple Bayesian success model over a rolling window. It highlights bull and bear stack regimes, colors price with magnitude-based gradients, and reports per-regime counts, wins, and estimated win rate in a compact table. Signals seek to be more robust through explicit ordering tolerance, optional midline gating, and outcome evaluation that waits for events to mature by a fixed horizon. The design focuses on readable structure, conservative confirmation, and actionable context rather than raw oscillator flips.
Motivation: Why this design?
Classical RSI signals flip frequently in volatile phases and drift in calm regimes. Pure threshold rules often misclassify shallow pullbacks and stacked momentum phases. The core idea here is ordered, spaced RSI layers combined with outcome tracking. By requiring a consistent order with a tolerance and optionally gating by the midline, regime identification becomes clearer. A horizon-based maturation check and smoothed win-rate estimate provide pragmatic feedback about how often a given stack has recently worked.
What’s different vs. standard approaches?
Reference baseline: Traditional single-length RSI with overbought and oversold rules or simple crossovers.
Architecture differences:
Four fixed RSI lengths with strict ordering and a spacing tolerance.
Optional requirement that all RSI values stay above or below the midline for bull or bear regimes.
Outcome evaluation after a fixed horizon, then rolling counts and a prior-smoothed win rate.
Dispersion measurement across the four RSIs with a percent-rank diagnostic.
Gradient coloring of candles and wicks driven by stack magnitude.
A last-bar statistics table with counts, wins, win rate, dispersion, and priors.
Practical effect: Charts emphasize sustained momentum alignment instead of single-length crosses. Users see when regimes start, how strong alignment is, and how that regime has recently performed for the chosen horizon.
How it works (technical)
The script computes RSI on four lengths and forms a “stack” when they are strictly ordered with at least the chosen tolerance between adjacent lengths. A bull stack requires a descending set from long to short with positive spacing. A bear stack requires the opposite. Optional gating further requires all RSI values to sit above or below the midline.
For evaluation, each detected stack is checked again after the horizon has fully elapsed. A bull event is a success if price is higher than it was at event time after the horizon has passed. A bear event succeeds if price is lower under the same rule. Rolling sums over the training window track counts and successes; a pair of priors stabilizes the win-rate estimate when sample sizes are small.
Dispersion across the four RSIs is measured and converted to a percent rank over a configurable window. Gradients for bars and wicks are normalized over a lookback, then shaped by gamma controls to emphasize strong regimes. A statistics table is created once and updated on the last bar to minimize overhead. Overlay markers and wick coloring are rendered to the price chart even though the indicator runs in a separate pane.
Parameter Guide
Source — Input series for RSI. Default: close. Tips: Use typical price or hlc3 for smoother behavior.
Overbought / Oversold — Guide levels for context. Defaults: seventy and thirty. Bounds: fifty to one hundred, zero to fifty. Tips: Narrow the band for faster feedback.
Stacking tolerance (epsilon) — Minimum spacing between adjacent RSIs to qualify as a stack. Default: zero point twenty-five RSI points. Trade-off: Higher values reduce false stacks but delay entries.
Horizon H — Bars ahead for outcome evaluation. Default: three. Trade-off: Longer horizons reduce noise but delay success attribution.
Rolling window — Lookback for counts and wins. Default: five hundred. Trade-off: Longer windows stabilize the win rate but adapt more slowly.
Alpha prior / Beta prior — Priors used to stabilize the win-rate estimate. Defaults: one and one. Trade-off: Larger priors reduce variance with sparse samples.
Show RSI 8/13/21/34 — Toggle raw RSI lines. Default: on.
Show consensus RSI — Weighted combination of the four RSIs. Default: on.
Show OB/OS zones — Draw overbought, oversold, and midline. Default: on.
Background regime — Pane background tint during bull or bear stacks. Default: on.
Overlay regime markers — Entry markers on price when a stack forms. Default: on.
Show statistics table — Last-bar table with counts, wins, win rate, dispersion, priors, and window. Default: on.
Bull requires all above fifty / Bear requires all below fifty — Midline gate. Defaults: both on. Trade-off: Stricter regimes, fewer but cleaner signals.
Enable gradient barcolor / wick coloring — Gradient visuals mapped to stack magnitude. Defaults: on. Trade-off: Clearer regime strength vs. extra rendering cost.
Collection period — Normalization window for gradients. Default: one hundred. Trade-off: Shorter values react faster but fluctuate more.
Gamma bars and shapes / Gamma plots — Curve shaping for gradients. Defaults: zero point seven and zero point eight. Trade-off: Higher values compress weak signals and emphasize strong ones.
Gradient and wick transparency — Visual opacity controls. Defaults: zero.
Up/Down colors (dark and neon) — Gradient endpoints. Defaults: green and red pairs.
Fallback neutral candles — Directional coloring when gradients are off. Default: off.
Show last candles — Limit for gradient squares rendering. Default: three hundred thirty-three.
Dispersion percent-rank length / High and Low thresholds — Window and cutoffs for dispersion diagnostics. Defaults: two hundred fifty, eighty, and twenty.
Table X/Y, Dark theme, Text size — Table anchor, theme, and typography. Defaults: right, top, dark, small.
Reading & Interpretation
RSI stack lines: Alignment and spacing convey regime quality. Wider spacing suggests stronger alignment.
Consensus RSI: A single line that summarizes the four lengths; use as a smoother reference.
Zones: Overbought, oversold, and midline provide context rather than standalone triggers.
Background tint: Indicates active bull or bear stack.
Markers: “Bull Stack Enter” or “Bear Stack Enter” appears when the stack first forms.
Gradients: Brighter tones suggest stronger stack magnitude; dull tones suggest weak alignment.
Table: Count and Wins show sample size and successes over the window. P(win) is a prior-stabilized estimate. Dispersion percent rank near the high threshold flags stretched alignment; near the low threshold flags tight clustering.
Practical Workflows & Combinations
Trend following: Enter only on new stack markers aligned with structure such as higher highs and higher lows for bull, or lower lows and lower highs for bear. Use the consensus RSI to avoid chasing into overbought or oversold extremes.
Exits and stops: Consider reducing exposure when dispersion percent rank reaches the high threshold or when the stack loses ordering. Use the table’s P(win) as a context check rather than a direct signal.
Multi-asset and multi-timeframe: Defaults travel well on liquid assets from intraday to daily. Combine with higher-timeframe structure or moving averages for regime confirmation. The script itself does not fetch higher-timeframe data.
Behavior, Constraints & Performance
Repaint and confirmation: Stack markers evaluate on the live bar and can flip until close. Alert behavior follows TradingView settings. Outcome evaluation uses matured events and does not look into the future.
HTF and security: Not used. Repaint paths from higher-timeframe aggregation are avoided by design.
Resources: max bars back is two thousand. The script uses rolling sums, percent rank, gradient rendering, and a last-bar table update. Shapes and colored wicks add draw overhead.
Known limits: Lag can appear after sharp turns. Very small windows can overfit recent noise. P(win) is sensitive to sample size and priors. Dispersion normalization depends on the collection period.
Sensible Defaults & Quick Tuning
Start with the shipped defaults.
Too many flips: Increase stacking tolerance, enable midline gates, or lengthen the collection period.
Too sluggish: Reduce stacking tolerance, shorten the collection period, or relax midline gates.
Sparse samples: Extend the rolling window or increase priors to stabilize P(win).
Visual overload: Disable gradient squares or wick coloring, or raise transparency.
What this indicator is—and isn’t
This is a visualization and context layer for RSI stack regimes with simple outcome statistics. It is not a complete trading system, not predictive, and not a signal generator on its own. Use it with market structure, risk controls, and position management that fit your process.
Metadata
- Pine version: v6
- Overlay: false (price overlays are drawn via forced overlay where applicable)
- Primary outputs: Four RSI lines, consensus line, OB/OS guides, background tint, entry markers, gradient bars and wicks, statistics table
- Inputs with defaults: See Parameter Guide
- Metrics and functions used: RSI, rolling sums, percent rank, dispersion across RSI set, gradient color mapping, table rendering, alerts
- Special techniques: Ordered RSI stacking with tolerance, optional midline gating, horizon-based outcome maturation, prior-stabilized win rate, gradient normalization with gamma shaping
- Performance and constraints: max bars back two thousand, rendering of shapes and table on last bar, no higher-timeframe data, no security calls
- Recommended use-cases: Regime confirmation, momentum alignment, post-entry management with dispersion and recent outcome context
- Compatibility: Works across assets and timeframes that support RSI
- Limitations and risks: Sensitive to parameter choices and market regime changes; not a standalone strategy
- Diagnostics: Statistics table, dispersion percent rank, gradient intensity
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Oscillators
HyperOscillatorThis indicator, HyperOscillator, is an enhanced oscillator designed to measure synthetic momentum by averaging percentage changes across multiple moving average periods. It provides a clear view of trend strength with a main line that turns green for bullish momentum and purple for bearish, alongside histograms for upper and lower bounds to spot crossovers. Exhaustion points are highlighted with circles for potential reversals, and you can enable divergence labels to detect regular or hidden mismatches between price and momentum. Volume weighting amplifies signals in high-activity bars, while multi-timeframe support brings in higher TF data for better context. The dashboard shows momentum strength as a 0-100% rank, risk level for overbought/oversold, and a flat data warning. Customize scales and styles to fit your chart, and pair it with HyperChannel for spotting exhaustion at channel edges. Not financial advice—experiment and see how it boosts your trading!
🐬TSI_ShadowAdded the following features to the original TSI Shadow indicator by Daveatt
- Candle color on/off
=> Displays the current trend status by coloring the chart candles.
- Background color on/off
=> Displays the current trend status by coloring the chart background.
- Conservative signal processing based on the zero line on/off
=> When calculating the trend with the TSI, a bullish trend is only confirmed above the zero line, and a bearish trend is only confirmed below the zero line.
- Conservative signal processing based on full signal alignment on/off
=> This enhances the original trend calculation (bullish when TSI and Fast MA are above Slow MA). With this option, the trend is determined by the specific alignment of all three lines: TSI, Fast MA, and Slow MA.
기존 Daveatt 유저가 개발한 TSI Shadow 에서 아래 기능을 추가 하였습니다.
- 캔들 색상 on/off
=> 캔들에 추세의 상태를 색상으로 나타냅니다.
- 배경 색상 on/off
=> 배경에 추세의 상태를 색상으로 나타냅니다.
- 0선 기준으로 신호 발생 보수적 처리 on/off
=> TSI로 추세를 계산할 때 0선 위에서는 매수추세, 0선 아래서는 매도추세를 계산합니다.
- 전체 배열 신호 발생 보수적 처리 on/off
=> TSI선과, FastMA 선이 SlowMA 위에 있을때 상승추세, 반대면 하락추세를 나타내 주던 계산식에서 TSI-FastMA-SlowMA 세가지 선의 배열 상태로 추세를 나타냅니다.
icreature RSI Divergence + OB/OSThis script simply showing all divergences and fill in colours when ob or os . Enjoy!
RXTrend█ OVERVIEW
The "RXTrend" indicator is a technical analysis tool based on a unique approach to trend identification using RSI values from overbought and oversold zones. Designed for traders seeking a precise tool to identify key market levels and trend direction, the indicator offers flexible settings, dynamic trend lines, candlestick coloring, and buy/sell signals, supported by alerts for key events.
█ CONCEPTS
"RXTrend" leverages the Relative Strength Index (RSI) to identify overbought and oversold zones, which are often significant areas on the chart due to potentially higher volume, increased volatility, or acting as pivot points. To address this, I created an indicator that uses RSI values from these zones, mapping them to price levels to determine the trend. Additionally, for a clearer market picture, boxes are added to highlight overbought and oversold zones on the chart, and candlestick coloring is based on the direction of the RSI moving average. This provides further confirmation of the trend direction and identifies potential correction or reversal points. The indicator is universal and works across all markets (stocks, forex, cryptocurrencies) and timeframes.
█ FEATURES
- RSI Calculation: Calculates RSI based on the closing price over a specified period, with a default length of 14.
- Trend Line: A smoothed trend line based on mapping RSI values from overbought (for downtrends) or oversold (for uptrends) zones to price levels. RSI values are transformed into prices using the price range from a selected period (default: 50 bars) and then smoothed to form the trend line. The line changes color based on the trend direction (blue for uptrend, orange for downtrend).
- Candlestick Coloring: Option to color candles based on the direction of the RSI moving average (RSI MA). Candle colors align with the trend and box colors (blue for uptrend, orange for downtrend, gray for neutral).
- Overbought and Oversold Zones: Identifies overbought (RSI > OB) and oversold (RSI < OS) levels, drawing dynamic boxes on the price chart to reflect these zones. Boxes update in real-time, adjusting to new highs and lows.
- Buy and Sell Signals: Generates buy signals (blue "Buy" labels) when the price crosses above the smoothed oversold line and sell signals (orange "Sell" labels) when the price crosses below the smoothed overbought line.
- Shadow Fill: Option to fill the space between the trend line and price (HL2) with adjustable transparency, aiding visual trend assessment.
Alerts: Built-in alerts for:
- Buy and sell signals.
- Appearance of new overbought/oversold boxes.
- RSI MA direction change (candle color change to uptrend or downtrend).
Customization: Allows adjustment of RSI length, overbought/oversold levels, smoothing period, colors, box and label transparency, and the option to keep boxes after RSI returns to normal.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
RSI Settings:
- RSI Length: Sets the RSI calculation period (default: 14).
- Overbought Level (OB): Sets the overbought threshold (default: 70).
- Oversold Level (OS): Sets the oversold threshold (default: 30).
Price Settings:
- Price Range Lookback: Defines the period for calculating the price range (default: 50).
Candle Coloring:
- Color Candles: Enables/disables candle coloring based on RSI MA direction.
- RSI MA Length: Sets the RSI moving average period (default: 21).
Smoothing Settings:
- Smoothing Length: Degree of trend line smoothing (default: 5).
Colors:
- Trend Colors: Customize colors for uptrend (default: blue), downtrend (default: orange), and shadow fill.
Box Settings:
- Box Transparency: Adjusts box transparency (0-100).
- Box Colors: Sets colors for overbought (orange) and oversold (blue) zones.
- Keep Boxes: Determines if boxes remain after RSI returns to normal.
Signals:
- Show Buy/Sell Signals: Enables/disables signal label display.
- Label Transparency: Adjusts signal label transparency.
Interpreting Signals:
- Trend Line: Shows market direction (blue for uptrend, orange for downtrend).
- Buy Signals: Blue "Buy" label appears when the price crosses above the smoothed oversold line, signaling a potential uptrend.
- Sell Signals: Orange "Sell" label appears when the price crosses below the smoothed overbought line, signaling a potential downtrend.
- Overbought/Oversold Boxes: Orange boxes indicate overbought zones (RSI > OB), blue boxes indicate oversold zones (RSI < OS). Boxes expand dynamically in real-time.
- Candlestick Coloring: Candle colors align with the trend and box colors, reflecting RSI MA direction.
- Alerts: Set up alerts in TradingView for buy/sell signals, new overbought/oversold boxes, or RSI MA direction changes.
- Combining with Other Tools: Use the indicator alongside support/resistance levels, Fair Value Gaps (FVG), or other indicators to confirm signals.
█ APPLICATIONS
The "RXTrend" indicator is designed to identify key market zones and trend direction, making it useful for trend-following and reversal strategies. It enables:
- Trend Confirmation: Candlestick coloring and the trend line help assess the dominant market direction, supporting entry or exit decisions. The trend line can act as a significant support/resistance level, and a price bounce from it may provide a good entry point, especially when confirmed by Fibonacci levels. Additionally, the appearance of overbought/oversold boxes combined with a change in candle color (RSI MA direction) may indicate an impending correction. This allows analysis of potential market overextension and correction endings, enabling multiple entries within a trend.
- Overbought and Oversold Zone Identification: Boxes highlight potential reversal or correction points, especially when combined with support/resistance levels or FVG.
- Signal-Based Strategies: Buy and sell signals can be used as entry points in a trend or as warnings of potential reversals.
█ NOTES
- The indicator is universal and works across all markets and timeframes due to its RSI-based and price-mapping logic.
- Adjust settings (e.g., RSI length, OB/OS levels, smoothing) to suit your trading style and timeframe.
- Use in conjunction with other technical analysis tools to enhance signal accuracy.
OBV Cloud v1.0 [PriceBlance]🌐 English
OBV Cloud v1.0 – Free & Open-Source
OBV Cloud v1.0 integrates On-Balance Volume (OBV) with a Cloud model and enhanced trend filters.
It helps traders quickly identify:
Money Flow Trend: OBV Cloud acts as a dynamic support/resistance zone.
Trend Filters: EMA9 (short-term) and WMA45 (medium-term) directly applied on OBV.
OBV–Price Divergence: Detects both regular and hidden bullish/bearish divergences.
Trend Strength: Measured with ADX calculated on OBV.
OBV Cloud is suitable for both swing and day trading, allowing traders to spot breakouts, reversals, or sustained trends through volume-based analysis.
Cheap/Expensive Zone Highlighter V.2 Publicindicator Cheap/Expensive Zone Highlighter Ver2
Uptrend = Based on price> EMA200 (O+H+L+C)/4
Cheap zone = RSI<45
Dowtrend = Based on price< EMA200 (O+H+L+C)/4
Expensive Zone= RSI>55
Cheap/Expensive Zone Highlighter V.2 indicator Cheap/Expensive Zone Highlighter Ver2
Uptrend = Based on price> EMA200 (O+H+L+C)/4
Cheap zone = RSI<45
Dowtrend = Based on price< EMA200 (O+H+L+C)/4
Expensive Zone= RSI>55
icreature RSI Divergence Indicator with Customizable OB/OS Spotsicreature RSI Divergence Indicator with Customizable OB/OS Spots
11 Sector Stocks Oscillator with Adjustable Speedoscillator made by grok 1min is all I have tested ai made it so use at your own risk
Nasdaq Futures Oscillator with VWAPai built oscillator use at your own risk don't know how it works but read script or test it out on a 1min chart
Top 6 Stocks Oscillator with VWAPai made this oscillator. only used on 1 min. not sure how it works so use at your own risk
MSRanges📖 Market Structure with Ranges —
What this script does
This indicator highlights market structure on any symbol or timeframe. It automatically marks:
Swing points: Higher High (HH), Lower High (LH), Higher Low (HL), Lower Low (LL).
Break of Structure (BOS) and optional Change of Character (CHoCH) events.
Price ranges: each new swing label shows the difference from the last swing in price units (e.g. HH (54.8) or LL (-169.5)).
This lets you see at a glance whether the market is trending, consolidating, or shifting character.
How it works
Pivot detection
Uses TradingView’s ta.pivothigh / ta.pivotlow with a user-set Swing Length.
A pivot is confirmed only after the right-hand bars pass, so labels appear with a delay equal to Swing Length.
Swing classification
Each new pivot is compared with the previous pivot:
If a new high is higher than the last → HH.
If a new high is lower → LH.
If a new low is higher → HL.
If a new low is lower → LL.
Break of Structure (BOS)
A BOS is drawn when price closes (or wicks, depending on settings) beyond a previous swing.
The first BOS against trend can optionally be labelled CHoCH.
Range calculation
When a new swing is confirmed, the script prints the difference between that pivot and the previous swing.
Example: HL at 24,600 → HH at 24,655 → label shows HH (55).
Inputs & customization
Swing Length: bars left/right used to confirm pivots. Larger = fewer, more reliable swings; smaller = more signals, more noise.
BOS Confirmation: choose whether a BOS requires a full candle close or just a wick beyond the level.
Show CHoCH: toggle whether the first countertrend BOS is renamed CHoCH.
Show Swing Points: show/hide HH / LH / HL / LL labels.
BOS Style Settings: customize color, line style, and width.
How to use in practice
Trend identification:
Uptrend → repeating HL → HH sequence.
Downtrend → repeating LH → LL.
Breakout confirmation:
A BOS confirms continuation. Retests of BOS lines often act as support/resistance.
Reversal watch:
A CHoCH can signal possible trend shift. Wait for confirmation from price action or higher timeframe structure.
Range analysis:
The range numbers help compare move sizes. If swings shrink, market may be consolidating; if they expand, volatility is rising.
Best practices
Combine with higher timeframe analysis: use HTF trend, then refine entries on LTF.
Always confirm with other tools (volume, RSI, order flow) before trading.
Adjust Swing Length for the symbol and timeframe you trade.
Use risk management — never rely on a single indicator.
Technical notes
Pivots are not predictive — they appear only after confirmation. This avoids repainting but introduces lag.
Many labels/lines can impact chart performance; the script sets sensible max_labels_count and max_lines_count.
Designed for clarity, not signals. It does not issue buy/sell calls.
Disclaimer
This script is for educational purposes only . It is not financial advice and should not be used as a sole basis for trading decisions. Past performance of any method or indicator does not guarantee future results. Always test on demo accounts and apply proper risk management.
RSI Cross Strategy Precise EntryThis is based on RSI movement. it generates buy and sell signals precisely
Custom MACD (Normalized by ATR)This is a modified version of the classic MACD indicator.
Instead of using just the difference between EMA(12) and EMA(26), this version normalizes the MACD line by ATR(26) and scales it by 100:
* 100
This adjustment makes the MACD relative to market volatility, allowing for easier comparison across assets and timeframes.
The idea of normalizing MACD with ATR comes from Alex Spioglou, who suggested this improvement to enhance signal consistency in volatile markets.
Plots include the ATR-normalized MACD line, the signal line, and the histogram, with rising/falling color cues and built-in alert conditions.
CMC Macro Regime PanelOverview (what it is):
A macro‑regime gate built entirely from TradingView-native symbols (CRYPTOCAP, FRED, DXY/VIX, HYG/LQD). It aggregates central‑bank liquidity (Fed balance sheet − RRP − Treasury General Account), USD strength, credit conditions, stablecoin flows/dominance, tech beta and BTC–NDX co‑move into one normalized score (CLRC). The panel outputs Risk‑ON/OFF regimes, an Early 3/5 pre‑signal, and an automatic BTC vs ETH vs ALTs preference. It is intentionally scoped to Daily & Weekly reads (no intraday timing). Publish with a clean chart and a clear description as per TradingView rules.
TradingView
Why we also use other TradingView screens (and why that is compliant)
This script pulls data via request.security() from official TV symbols only; users often want to open the raw series on separate charts to sanity‑check:
CRYPTOCAP indices: TOTAL, TOTAL2, TOTAL3 (market cap aggregates) and dominance tickers like BTC.D, USDT.D. Helpful for regime & rotation (ALTs vs BTC). TradingView provides definitions for crypto market cap and dominance symbols.
TradingView
+3
TradingView
+3
TradingView
+3
FRED releases: WALCL (Fed assets, weekly), RRPONTSYD (ON RRP, daily), WTREGEN (TGA, weekly), M2SL (M2, monthly). These are the official macro sources exposed on TV.
FRED
+3
FRED
+3
FRED
+3
Risk proxies: TVC:DXY (USD index), TVC:VIX (implied vol), AMEX:HYG/AMEX:LQD (credit), NASDAQ:NDX (tech beta), BINANCE:ETHBTC. VIX/NDX relationship is well-documented; VIX measures 30‑day expected S&P500 vol.
TradingView
+2
TradingView
+2
Compliance note: Using multiple screens is optional for users, but it explains/justifies how components work together (a requirement for public scripts). Keep publication chart clean; use extra screens only to illustrate in the description.
TradingView
How it works (high level)
Liquidity block (Weekly/Monthly)
Net Liquidity = WALCL − RRPONTSYD − WTREGEN (YoY z‑score). WALCL is weekly (as of Wednesday) via H.4.1; RRP is daily; TGA is a Fed liability series. M2 YoY is monthly.
FRED
+3
FRED
+3
FRED
+3
Risk conditions (Daily)
DXY 3‑month momentum (inverted), VIX level (inverted), Credit (HYG/LQD ratio or HY OAS). VIX is a 30‑day constant‑maturity implied vol index per Cboe methodology.
Cboe
+1
Crypto‑internal (Daily)
Stablecoins (USDT+USDC+DAI 30‑day log change), USDT dominance (20‑day, inverted), TOTAL3 (63‑day momentum). Dominance symbols on TV follow a documented formula.
TradingView
Beta & co‑move (Daily)
NDX 63‑day momentum, BTC↔NDX 90‑day correlation.
All components become z‑scores (optionally clipped), weighted, missing inputs drop and weights renormalize. We never use lookahead; we confirm on bar close to avoid repainting per Pine docs (barstate.isconfirmed, multi‑TF).
TradingView
+2
TradingView
+2
What you see on the chart
White line (CLRC) = macro regime score.
Background: Green = Risk‑ON, Red = Risk‑OFF, Teal = Early 3/5 (pre‑signal).
Table: shows each component’s z‑score and the Preference: BTC / ETH / ALTs / Mixed.
Signals & interpretation
Designed for Daily (1D) and Weekly (1W) only.
Regime gates (default Fast preset):
Enter ON: CLRC ≥ +0.8; Hold ON while ≥ +0.5.
Enter OFF: CLRC ≤ −1.0; Hold OFF while ≤ −0.5.
0 / ±1 reading: CLRC is a standardized composite.
~0 = neutral baseline (no macro edge).
≥ +1 = strong macro tailwind (≈ +1σ).
≤ −1 = strong headwind (≈ −1σ).
Early 3/5 (teal): a fast pre‑signal when at least 3 of 5 daily checks align: USDT.D↓, DXY↓, VIX↓, HYG/LQD↑, ETHBTC↑ or TOTAL3↑. It often precedes a full ON flip—use for pre‑positioning rather than full sizing.
BTC/ETH/ALTs selector (only when ON):
ALTs when BTC.D↓ and (ETHBTC↑ or TOTAL3↑) ⇒ rotate down the risk curve.
BTC when BTC.D↑ and ETHBTC↓ ⇒ keep it concentrated.
ETH when ETHBTC↑ while BTC.D flat/up ⇒ add ETH beta.
(Dominance mechanics are documented by TV.)
TradingView
Dissonance (incompatibility) rules — when to stand down
Use these overrides to avoid false comfort:
CLRC > +1 but USDT.D↑ and/or VIX spikes day‑over‑day → downgrade to Neutral; wait for USDT.D to stabilize and VIX to cool (VIX is a fear gauge of 30‑day expectation).
Cboe Global Markets
CLRC > +1 but DXY↑ sharply (USD squeeze) → size below normal; require DXY momentum to roll over.
CLRC < −1 but Early 3/5 = true two days in a row → start reducing underweights; look for ON flip within a few bars.
NetLiq improving (W) but credit (HYG/LQD) deteriorating (D) → treat as mixed regime; prefer BTC over ALTs.
How to use (step‑by‑step)
A. Read on Daily (1D) — main regime
Open CRYPTOCAP:TOTAL3, 1D (panel applied).
Wait for bar close (use alerts on confirmed bar). Pine docs recommend barstate.isconfirmed to avoid repainting on realtime bars.
TradingView
If ON, check Preference (BTC / ETH / ALTs).
Then drop to 4H on your trading pair for micro entries (this indicator itself is not for intraday timing).
B. Confirm weekly macro (1W) — once per week)
Review WALCL/RRP/TGA after the H.4.1 release on Thursdays ~4:30 pm ET. WALCL is “Weekly, as of Wednesday”; M2 is Monthly—so do not expect daily responsiveness from these.
Federal Reserve
+2
FRED
+2
Recommended check times (practical schedule)
Daily regime read: right after your chart’s daily close (confirmed bar). For consistent timing across crypto, many users set chart timezone to UTC and read ~00:05 UTC; you can change chart timezone in TV’s settings.
TradingView
In‑day monitoring: optional spot checks 16:00 & 20:00 UTC (DXY/VIX move during US hours), but act only after the daily bar confirms.
Weekly macro pass: Thu 21:30–22:30 UTC (after H.4.1 4:30 pm ET) or Fri after daily close, to let weekly FRED series propagate.
Federal Reserve
Limitations & data latency (be explicit)
Higher‑TF data & confirmation: FRED weekly/monthly series will not reflect intraday risk in crypto; we aggregate them for regime, not for entry timing.
Repainting 101: Realtime bars move until close. This script does not use lookahead and follows Pine guidance on multi‑TF series; still, always act on confirmed bars.
TradingView
+1
Public‑library compliance: Title EN‑only; description starts in EN; clean chart; justify component mash‑up; no lookahead; no unrealistic claims.
TradingView
Alerts you can use
“Macro Risk‑ON (entry)” — fires on ON flip (confirmed bar).
“Macro Risk‑OFF (entry)” — fires on OFF flip.
“Early 3/5” — fires when the teal pre‑signal appears (not a regime flip).
“Preference change” — BTC/ETH/ALTs toggles while ON.
Publish note: Alerts are fine; just avoid implying guaranteed accuracy/performance.
TradingView
Background research (why these inputs matter)
Liquidity → Crypto: Fed H.4.1 timing and series definitions (WALCL, RRP, TGA) formalize the “net liquidity” concept used here.
FRED
+3
Federal Reserve
+3
FRED
+3
Stablecoins ↔ Non‑stable crypto: empirical work shows bi‑directional causality between stablecoin market cap and non‑stable crypto cap; stablecoin growth co‑moves with broader crypto activity.
Global liquidity link: world liquidity positively relates to total crypto market cap; lagged effects are observed at monthly horizons.
VIX/Uncertainty effect: fear shocks impair BTC’s “safe haven” behavior; VIX is a meaningful risk‑off read.
Hedge Pressure Index (HPI)Hedge Pressure Index (HPI)
Overview
The Hedge Pressure Index (HPI) is a flow-aware indicator that fuses daily options Open Interest (OI) with intraday put/call volume to estimate the directional hedging pressure of market makers and dealers. It helps traders visualize whether options flow is creating mechanical buy/sell pressure in IWM, and when that pressure may be shifting.
What HPI Shows
Daily OI Baseline (white line): Net OI carried forward intraday (Put OI − λ × Call OI). Updated once daily before the open.
Intraday Flow (teal line): Net put minus λ × call volume in real time. Smoothed to show underlying flow.
Spread Histogram (gray): Divergence between intraday flow and daily OI.
HPI Proxy Histogram (blue): Intraday hedge-pressure intensity. Strong extremes indicate heavy one-sided dealer hedging.
Trading Signals
Crossover:
When intraday Volume line crosses above OI, it suggests bullish hedge pressure.
When Volume line crosses below OI, it suggests bearish hedge pressure.
Z-Score Extremes:
HPI ≥ +1.5 → strong mechanical bid.
HPI ≤ −1.5 → strong mechanical offer.
Alerts: Built in for both crossovers and extreme readings.
How to Use HPI
1. Confirmation Tool (recommended for most traders):
Trade your usual price/technical setups.
Use HPI as a confirmation: only take trades that align with the hedge pressure direction.
2. Flow Bias (advanced):
Use HPI direction intraday as a standalone bias.
Fade signals when the histogram mean-reverts or crosses zero.
Best practice: Focus on the open and first 2 hours where hedging flows are most active. Combine with ATR/time-based stops.
Inputs
Demo Mode: If no OI/volume feed is set, the script uses chart volume for layout.
λ (Call Weight): Adjusts how much call volume offsets put volume (default = 1.0).
Smoothing Length: Smooths intraday flow line.
Z-Score Lookback: Sets lookback window for HPI extremes.
Custom Symbols:
Daily Net OI (pre-open OI difference).
Intraday Put Volume.
Intraday Call Volume.
Setup Instructions
Add the indicator to an IWM chart.
In Inputs, either keep Demo Mode ON (for layout) or enter your vendor’s Daily Net OI / Put Volume / Call Volume symbols.
Set alerts for crossovers and strong HPI readings to catch flow shifts in real time.
Optionally tune λ and smoothing to match your feed’s scale.
Notes
This is a proxy for dealer hedge pressure. For highest accuracy, replace the proxy histogram with gamma-weighted flow by strike/DTE when your data feed supports it.
Demo mode is for visualization only; live use requires a valid OI and volume feed.
Disclaimer
This script is for educational and research purposes only. It is not financial advice. Options and derivatives carry significant risk. Always test in a demo environment before using live capital.
AVNT Weather Diary — Buy Readiness Score (0–10) with Trend & Ram🔹 Description
This script is a visual "weather diary" for AVNT (or any symbol). It combines RSI, MACD, and ramp momentum signals into a 0–10 Buy Readiness score and translates that into simple “weather” conditions:
🌧️ Rainy → Weak setup
🌫️ Storm Clearing → Possible build-up
⛅ Clearing Skies → Neutral but improving
☀️ Sunny → Stronger trend forming
🌈 Blue Sky → High strength / breakout potential
What’s included:
0–10 readiness score based on RSI(1h/4h), MACD, and RSI ramps (5m/15m).
Weather + emoji labels for quick interpretation.
Trend label: Uptrend, Chop/Basing, or Downtrend.
Sustained-clear vs False-clear streaks to catch fake breakouts.
Top-right status table for quick metrics.
Bottom info box summarizing conditions (score, weather, trend, streaks).
Background tint so you can feel the "weather" of the chart at a glance.
Alerts for each weather shift and for sustained coiling streaks (pre-breakout).
✅ Works best on AVNT but is adaptable to any coin or stock.
✅ Designed for traders who prefer simple storytelling instead of raw numbers.
Relative Strength Index_ShRelative Strength Index updated to keep upper level at 60 while lower at 40
FX MAN PRO//@version=5
indicator(title="FCB Signals with SMA, Momentum & Stochastic", shorttitle="FCB+AllFilters+Stoch", overlay=true)
// ---------- Inputs ----------
Pattern = input.int(1, "Pattern Length", minval=1)
showSignals = input.bool(true, "Show Buy/Sell Signals")
signalOffset = input.int(0, "Signal Offset", minval=-5, maxval=5)
smaFastLength = input.int(7, "SMA Fast")
smaSlowLength = input.int(21, "SMA Slow")
momentumLength = input.int(10, "Momentum Length")
// ---------- Stochastic Inputs ----------
stochKLength = input.int(14, "Stoch K Length")
stochDLength = input.int(3, "Stoch D Length")
stochSmooth = input.int(3, "Stoch Smooth")
stochOverbought = input.int(80, "Overbought Level")
stochOversold = input.int(20, "Oversold Level")
// ---------- Fractal Functions ----------
fractalUp(pattern) =>
p = high
okl = 1
okr = 1
res = 0.0
for i = pattern to 1
okl := high < high and okl == 1 ? 1 : 0
for i = pattern + 2 to pattern * 2 + 1
okr := high < high and okr == 1 ? 1 : 0
res := okl == 1 and okr == 1 ? p : res
res
fractalDn(pattern) =>
p = low
okl = 1
okr = 1
res = 0.0
for i = pattern to 1
okl := low > low and okl == 1 ? 1 : 0
for i = pattern + 2 to pattern * 2 + 1
okr := low > low and okr == 1 ? 1 : 0
res := okl == 1 and okr == 1 ? p : res
res
// ---------- Compute ----------
xUpper = fractalUp(Pattern)
xLower = fractalDn(Pattern)
// ---------- Hide FCB ----------
plot(xUpper, color=na, title="FCB Up")
plot(xLower, color=na, title="FCB Down")
// ---------- Candle Analysis ----------
body = math.abs(close - open)
shadowTop = high - math.max(open, close)
shadowBot = math.min(open, close) - low
strongBody = body > (shadowTop + shadowBot)
isGreen = close > open
isRed = close < open
// ---------- SMA ----------
smaFast = ta.sma(close, smaFastLength)
smaSlow = ta.sma(close, smaSlowLength)
// ---------- Momentum ----------
momentumValue = ta.mom(close, momentumLength)
// ---------- Stochastic ----------
kLine = ta.sma(ta.stoch(close, high, low, stochKLength), stochSmooth)
dLine = ta.sma(kLine, stochDLength)
// ---------- Stochastic Direction ----------
kUp = kLine > kLine
dUp = dLine > dLine
kDown = kLine < kLine
dDown = dLine < dLine
// ---------- Check Stochastic Neutral ----------
inNeutral = (kLine < stochOverbought and kLine > stochOversold) and (dLine < stochOverbought and dLine > stochOversold)
// ---------- First Candle Signal Logic ----------
var bool buyActive = false
var bool sellActive = false
buyCond = close > xUpper and strongBody and isGreen and smaFast > smaSlow and momentumValue > momentumValue and kUp and dUp and inNeutral
sellCond = close < xLower and strongBody and isRed and smaFast < smaSlow and momentumValue < momentumValue and kDown and dDown and inNeutral
buySignal = buyCond and not buyActive
sellSignal = sellCond and not sellActive
buyActive := buyCond ? true : not buyCond ? false : buyActive
sellActive := sellCond ? true : not sellCond ? false : sellActive
// ---------- Plot Signals with golden text ----------
plotshape(showSignals and buySignal,
title="Buy Signal",
style=shape.triangleup,
location=location.belowbar,
color=color.green,
size=size.tiny,
text="BUY",
textcolor=color.new(color.yellow, 0), // طلایی
offset=signalOffset)
plotshape(showSignals and sellSignal,
title="Sell Signal",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.tiny,
text="SELL",
textcolor=color.new(color.yellow, 0), // طلایی
offset=signalOffset)
Repulse OB/OS Z-Score (v3)🔹 What this script does
This indicator is an enhanced version of the Repulse, originally developed by Eric Lefort. The Repulse measures bullish and bearish pressure in the market by analyzing price momentum and crowd behavior.
In this version, I introduce a Z-Score transformation to the Repulse values. The Z-Score converts raw outputs into a standardized statistical scale, allowing traders to identify when pressure is abnormally high or low relative to historical conditions.
🔹 How it works
Repulse Core: The original Repulse calculation compares buying vs. selling pressure, highlighting shifts in momentum.
Z-Scoring Method: Repulse values are normalized around their mean and scaled by standard deviation. This transforms the indicator into a dimensionless metric, where:
Positive Z-Scores indicate stronger-than-usual bullish pressure.
Negative Z-Scores indicate stronger-than-usual bearish pressure.
Bands: Thresholds such as ±1 or ±2 Z-Scores can help detect when pressure is stretched, potentially signaling exhaustion or reversal points.
🔹 Why it’s useful
Statistical Clarity: Traders can instantly see whether current pressure is normal or extreme.
Cross-Asset Comparisons: Because Z-Scores are standardized, signals can be compared across different markets or timeframes.
Mean Reversion Tool: Extreme Z-Score values often precede turning points, making this a versatile addition to trend and momentum analysis.
🔹 How to use it
Apply the indicator to any chart and timeframe.
Watch for Z-Scores above +2 (possible overheated bullish pressure) or below –2 (possible oversold/exhaustion).
Use these levels as contextual signals, not standalone triggers. Best results come from combining with price structure, support/resistance, or volume analysis.
⚠️ Note: This script does not predict price. It highlights statistical extremes in pressure to support decision-making. Always use in combination with other tools and risk management practices.
RSI Crossover with Candlestick Patternsusing the RSI indicator levels 40 and 60, where the signal cuts above level 40 with a candlestick hammer or bull engulfing and cuts below level 60 with a candlestick inverter hammer or bearish engulfing.