Yield Curve Regime Shading with LegendTakes two symbols (e.g. two futures contracts, two FX pairs, etc.) as inputs.
Calculates the “regime” as the sign of the change in their difference over an n‑period lookback.
Lets you choose whether you want to color the bars themselves or shade the background.
How it works
Inputs
symbolA, symbolB: the two tickers you’re comparing.
n: lookback in bars to measure the change in the spread.
mode: pick between “Shading” or “Candle Color”.
Data fetching
We use request.security() to pull each series at the chart’s timeframe.
Regime calculation
spread = priceA – priceB
spreadPrev = ta.valuewhen(not na(spread), spread , 0) (i.e. the spread n bars ago)
If spread > spreadPrev → bullish regime
If spread < spreadPrev → bearish regime
Plotting
Shading: apply bgcolor() in green/red.
Candle Color: use barcolor() to override the bar color.
Kitaran
Z Score 主图策略 — v1.02Hello Traders,
Here is my new year gift for the community, Digergence for Many Indicators v4. I tried to make it modular and readable as much as I can. Thanks to Pine Team for improving Pine Platform all the time!
How it works?
- On each candle it checks divergences between current and any of last 16 Pivot Points for the indicators.
- it search divergence on choisen indicators => RSI , MACD , MACD Histogram, Stochastic , CCI , Momentum, OBV, VWMACD, CMF and any External Indicator!
- it checks following divergences for 16 pivot points that is in last 100 bars for each Indicator.
--> Regular Positive Digergences
--> Regular Negative Digergences
--> Hidden Positive Digergences
--> Hidden Negative Digergences
- for positive divergences first it checks if closing price is higher than last closing price and indicator value is higher than perious value, then start searching divergence
- for negative divergences first it checks if closing price is lower than last closing price and indicator value is lower than perious value, then start searching divergence
Some Options:
Pivot Period: you set Pivot Period as you wish. you can see Pivot Points using "Show Pivot Points" option
Source for Pivot Points: you can use Close or High/Low as source
Divergence Type: you can choose Divergence type to be shown => "Regular", "Hidden", "Regular/Hidden"
Show Indicator Names: you have different options to show indicator names => "Full", "First Letter", "Don't Show"
Show Divergence Number: option to see number of indicators which has Divergence
Show Only Last Divergence: if you enable this option then it shows only last Positive and Negative Divergences
you can include any External Indicator to see if there is divergence
- enable "Check External Indicator"
- and then choose External indicator name in the list, "External Indicator"
- External indicator name is shown as Extrn
- related external indicator must be added before enabling this option
Coloring, line width and line style options for different type of divergences.
Following Alerts added:
- Positive Regular Divergence Detected
- Negative Regular Divergence Detected
- Positive Hidden Divergence Detected
- Negative Hidden Divergence Detected
Now lets see some examples:
Kompas Peluang (CCI Focused View)
📌 Kompas Peluang — Smart Signal Detection Based on Momentum & Volatility Confluence
Kompas Peluang is a multi-signal indicator designed to help traders identify potential entry zones using a fusion of four key components: ✅ CCI (Commodity Channel Index) ✅ RSI (Relative Strength Index) ✅ MACD (Moving Average Convergence Divergence) ✅ WVF (Williams Vix Fix for volatility spikes)
When two or more signals align, the indicator highlights a strategic buy zone — ideal for disciplined “Buy the Dip” or DCA-style entries.
⚙️ Key Features:
Filters opportunities based on multi-signal confluence, not a single trigger
Blends momentum and volatility to detect potential reversals
Clean visuals, intuitive logic, and highly customizable
Use it standalone or pair it with the Kompas Trend EMA tool to boost timing precision and avoid false entries.
STMDUpdated Setup Rules
Buy condition:
SMA 8 > SMA 13 > SMA 20 (aligned and pointing up).
All 3 averages are rising (positive slope).
Entry candle is a power candle (bullish elephant bar).
SELL condition:
SMA 8 < SMA 13 < SMA 20 (aligned and pointing down).
All 3 averages are falling (negative slope).
Entry candle is a power candle (bearish elephant bar).
BTC Transaction Indicator Name: "Bitcoin On-Chain Volume & Dynamic Parabolic Curve Signals"
Purpose:
This indicator is designed for Bitcoin traders and long-term holders. It combines the analysis of Bitcoin's on-chain transaction volume with price action to generate "Whale" and "Bear" signals. Additionally, it features a unique dynamic parabolic curve that acts as a visual support line, adapting its visibility based on price interaction with a key Exponential Moving Average (EMA).
Key Components:
On-Chain Volume Analysis:
Utilizes Estimated Transaction Volume (ETRAV) data from the Bitcoin blockchain.
Calculates fast and slow Simple Moving Averages (SMAs) of this volume.
Identifies volume trends (up/down) and significant volume increases/decreases.
Employs fixed thresholds (2,500,000 for low volume and 25,000,000 for high volume) to define key activity levels, similar to how historical on-chain analysis defined accumulation and distribution zones.
Price Action Analysis:
Calculates fast and slow SMAs of the price.
Detects price trends (up/down), recoveries, and declines based on these price SMAs.
"Whale" and "Bear" Signals:
Whale Signals (Buy-side): Generated when there's an upward volume trend, significant volume increase, and a downward price trend followed by price recovery. These indicate potential accumulation phases.
Bear Signals (Sell-side): Generated when there's a downward volume trend, significant volume decrease, and an upward price trend followed by price decline. These indicate potential distribution phases.
Visuals: Both types of signals are plotted as small, colored circles directly on the price chart, with corresponding text labels ("Whale," "Buy," "Bear," "Sell," "Price Recovering," "Price Declining").
Dynamic Parabolic Curve:
Concept: A green parabolic (exponential) curve that serves as a dynamic visual support line.
Activation: The curve starts drawing automatically only when the price crosses over the EMA 500 (Exponential Moving Average of 500 periods). The curve's starting point is set at a user-defined percentage below the EMA 500 value at that exact crossover point.
Visibility: The curve remains visible and continues its trajectory only as long as the price stays above the EMA 500.
Deactivation: The curve disappears instantly if the price falls below or equals the EMA 500. It will only reappear if the price crosses above the EMA 500 again.
Customization: The curve's steepness (Tasa Crecimiento Curva) and its initial distance from the EMA 500 (Inicio Curva % por debajo de EMA500) are adjustable.
Dynamic Label: A "Parabólico" text label is plotted near the center of the active curve segment, with an adjustable vertical offset to ensure it stays visually appealing below the curve.
What is PLOTTED on the chart:
The small, colored circle signals for Whale/Buy and Bear/Sell activity.
The green dynamic parabolic curve.
What is NOT PLOTTED:
EMA 200, EMA 500 lines (though they are calculated internally for logic).
Raw volume data or volume Moving Averages (these are only used for signal calculation, not plotted).
Ideal for:
Bitcoin traders and investors focused on long-term trends and cycle analysis, who want visual cues for accumulation/distribution phases based on on-chain activity, complemented by a unique, dynamically appearing parabolic support curve.
Important Notes:
Relies on the availability of external on-chain data (QUANDL:BCHAIN) within TradingView.
Functions best on a daily timeframe for optimal on-chain data relevance.
Rainbow Price Chart This indicator is a technical and on-chain analysis tool for Bitcoin, designed to help investors better understand the different phases of the market cycle and underlying sentiment. It directly overlays on the price chart (overlay=true).
Indicator Name: "Rainbow Price Chart & V/T Ratio Signals"
General Purpose:
It combines two popular methodologies for visualizing Bitcoin's value and sentiment: the classic "Rainbow Price Chart" and signals derived from the "Value per Transaction Ratio" (V/T Ratio) based on blockchain data. It is ideal for long-term investors looking for strategic entry/exit points.
Main Components:
Rainbow Price Chart:
Concept: Divides Bitcoin's price range into different market "sentiment zones" (e.g., "Bubble Zone," "FOMO Zone," "HODL Zone," "Accumulation Zone," "Buy Zone," "Fire Sale Zone") using colored bands. These bands are calculated as ascending and descending multiples of a base Exponential Moving Average (EMA), configurable by default to 200 periods.
Visualization: The zones are represented with transparent color fills on the price chart. A detailed legend in the top right corner of the chart explains the meaning of each color and sentiment zone.
Important Note: This type of chart is designed to be viewed and analyzed correctly on a logarithmic price scale. The indicator includes a visual reminder to activate this scale.
Value per Transaction (V/T) Ratio Signals:
Concept: Measures the average value per transaction on the Bitcoin blockchain by dividing the total transacted volume in USD by the number of transactions. This ratio is smoothed with an Exponential Moving Average (by default, 7 periods) and is framed within a dynamic Linear Regression Channel (LRC) based on standard deviation.
Signal Generation: Based on the position of the smoothed V/T Ratio within this LRC channel, the indicator generates signals directly on the price chart, such as:
"BOTTOM": Low price, V/T Ratio in the lower band of the LRC.
"SEMI-LOW" / "SEMI-HIGH": Intermediate phases within the channel.
"ATH" (All-Time High): Potentially overvalued price, V/T Ratio in the upper band of the LRC.
On-Chain Data: The indicator requests external daily on-chain data for total transacted volume (TVTVR) and number of transactions (NTRAN) from the Bitcoin blockchain.
Diagnostic Panes: Includes plots of the raw on-chain data (volume and number of transactions) in a separate pane, which are useful for debugging or verifying the data source. The lines for the V/T Ratio itself and its LRC channel are not plotted by default but can be activated in the code for deeper analysis.
Ideal for:
Bitcoin investors and "hodlers" who desire a visual tool that combines price-based market cycle context with fundamental signals derived from on-chain activity, to help identify key moments for accumulation or potential distribution.
Considerations:
Relies on the availability of external on-chain data (QUANDL:BCHAIN) within TradingView.
Functions best on a daily timeframe.
21 & 200 EMA with Star at Crossovers21-day EMA: Plotted in green
200-day EMA: Plotted in red
Crossover Markers:
A yellow star (★) appears on the chart at the 21 EMA price level when:
21 EMA crosses above the 200 EMA (bullish crossover)
21 EMA crosses below the 200 EMA (bearish crossover)
Stars have a black background to ensure high visibility
London & NY Sessions - Full ViewGreen vertical line at London Open (08:00 London time)
Red vertical line at New York Open (13:30 London time)
🟩 Shaded background for:
London Session: 08:00 – 17:00
New York Session: 13:30 – 21:00
London & NY Sessions - Full ViewThis Pine Script highlights the London and New York trading sessions on a 5-minute chart using the London time zone. It includes:
✅ A green vertical line and label at London Open (08:00)
✅ A red vertical line and label at New York Open (13:30)
✅ Light green background during the London session (08:00–17:00)
✅ Light red background during the New York session (13:30–21:00)
Use it to visually track key market openings and identify high-volume trading periods.
CirclesCircles - Support & Resistance Levels
Overview
This indicator plots horizontal support and resistance levels based on W.D. Gann's mathematical approach of dividing 360 degrees by 2 and by 3. These divisions create natural price magnetism points that have historically acted as significant support and resistance levels across all markets and timeframes.
How It Works
360÷2 Levels (Blue): 5.63, 11.25, 33.75, 56.25, 78.75, etc.
360÷3 Levels (Red): 7.5, 15, 30, 37.5, 52.5, 60, 75, etc.
Both Levels (Yellow): 22.5, 45, 67.5, 90, 112.5, 135, 157.5, 180 - These are "doubly strong" as they appear in both calculations
Key Features
Auto-Scaling: Automatically adjusts for any price range (from $0.001 altcoins to $100K+ Bitcoin)
Manual Scaling: Choose from 0.001x to 1000x multipliers or set custom values
Full Customization: Colors, line widths, styles (solid/dashed/dotted)
Historical View: Option to show all levels regardless of current price
Clean Display: Adjustable label positioning and line extensions
Use Cases
Identify potential reversal zones before price reaches them
Set profit targets and stop losses at key mathematical levels
Confirm breakouts when price decisively moves through major levels
Works on all timeframes and all markets (stocks, crypto, forex, commodities)
Gann Theory
W.D. Gann believed that markets move in mathematical harmony based on geometric angles and time cycles. These 360-degree divisions represent natural balance points where price often finds support or resistance, making them valuable for both short-term trading and long-term analysis.
Perfect for traders who use:
Support/Resistance trading
Fibonacci levels
Pivot points
Mathematical/geometric analysis
Multi-timeframe analysis
Simple Sessions & LevelsWhat this indicator does:
This script marks out two essential types of price levels for intraday and swing traders:
The high and low of a customizable 15-minute opening range after the market/session open.
The previous day’s high, midpoint (“halfback”), and low.
How it works:
The script lets you set the session start time (hour and minute) to match your market.
It then calculates the high and low of the first 15 minutes after the session opens and plots those as solid lines.
It also plots the prior day’s high, halfback (midpoint), and low on your chart for easy reference.
Each line and each label can be toggled on or off independently in the settings for maximum customization.
Colors for each level are also fully customizable.
How to use it:
Add the script to your chart.
Set the session start hour and minute to match the open of the market or instrument you trade.
Choose which levels and labels you want displayed by using the toggles in the settings.
The indicator will automatically draw the session range and prior day levels for you.
Use these lines as reference for key support, resistance, and potential trade entry/exit points.
What makes it unique and useful:
This tool combines a flexible session opening range with classic daily reference levels in one package. You have complete control over which levels and labels are shown, making it adaptable for any trading style. It’s especially useful for day traders who want to quickly identify volatility windows and the most important price levels from the previous session.
Relative Strength Index + Golden Cross + MACDThis script is a high-performance, cleanly visualized indicator designed for swing traders and intraday scalpers. It combines multiple classic and modern techniques to help identify momentum trends, crossover signals, and smart entry zones.
🔧 Key Features:
RSI (Relative Strength Index) with gradient bands (overbought/oversold zones)
Golden Cross & Death Cross (SMA 50/200) with green/red + markers
SMA 50 over 150 (bullish crossover) with a blue + marker
MACD Crossover Dots (green for bullish, red for bearish)
Supertrend Dots for direction confirmation (lime/fuchsia)
Smart Entry Dot when RSI > 50, MACD bullish, and SMA50 > SMA200 (teal triangle)
Background Highlight for strong trend momentum using custom ADX + RSI filter
🎯 Ideal For:
Scalping with momentum confirmation
Swing trading on multi-timeframe alignment
Combining traditional indicators with clean visuals
🧪 Suggested Use:
Use this indicator in combination with support/resistance or price action. Filter out low-probability trades by focusing on:
Smart Entry signals during momentum backgrounds
Cross-check with Supertrend direction and RSI slope
Confirmed Candlestick Pattern DetectorConfirmed Candlestick Pattern Detector, such as Evening Star, Morning Star etc.
Weekly DividerAdds clear weekly vertical lines to your chart. Simple, customizable, and works with Pine Script v6. Ideal for anyone who wants to see weekly transitions on any instrument — Forex, crypto, stocks, etc. Made with love by Imani 💫
Custom NY Session Blocks (Even Lighter)Custom NYS Blocks to delineate the AM, LUNCH, and PM of New York
Session SizeAnalyze previous Sessions Size (Asia, London, New York) and give back the average range size in points.
Great tool if you want to take seriously the time and price
LA SOÑADA 7000 4h//@version=5
strategy(title='LA SOÑADA 7000 4h', calc_on_order_fills=true, calc_on_every_tick=false, initial_capital=10000, commission_type=strategy.commission.percent, commission_value=0.04, overlay=true, default_qty_type=strategy.cash, default_qty_value=60000)
buffer = input.float(title='buffer', defval=0.3, minval=0, step=0.1)
b1 = close * (1 + buffer / 100)
b2 = close * (1 - buffer / 100)
strategy.entry('Long', strategy.long, when=close > b1, comment='entry')
strategy.close('Long', when=close < b2, comment='exit')
//money management
stop_loss = input.int(15, 'Stop loss %', minval=1, step=1)
sl = strategy.position_avg_price * (1 - stop_loss / 100)
close_Stop = close < sl
strategy.close('Long', when=close_Stop, comment='Stop loss')
Target_profit = input.int(50, 'Target Profit %', minval=1, step=1)
tp = strategy.position_avg_price * (1 + Target_profit / 100)
close_Target = close > tp
strategy.close('Long', when=close_Target, comment='Target')
Binance OI Stochastic MFIibb.co Binance Open Interest Stochastic Money Flow Index (OI Stochastic MFI)
Inspiration:
This indicator is an innovative tool combining the traditional Money Flow Index (MFI) and Stochastic Oscillator concepts, enhanced by directly incorporating Open Interest data from Binance Futures BTCUSDT perpetual contracts.
What is it and what does it measure?
The traditional Money Flow Index (MFI) measures the flow of money considering both price and volume.
Open Interest represents the total number of outstanding futures contracts at any given moment, offering deeper insight into speculative involvement and investors' positioning.
This indicator replaces the traditional volume input with Open Interest, providing a more accurate perspective of speculative inflows and outflows in Bitcoin's perpetual futures market.
Advantages and Applications:
Higher accuracy for futures markets, particularly cryptocurrencies, due to direct usage of Binance Futures data reflecting real and speculative activities.
Clear identification of extreme overbought and oversold levels.
Provides objective visual signals for buying (green upward arrows) and selling (red downward arrows).
How to interpret:
The indicator oscillates between values of 0 and 100.
Values above the configured overbought level (e.g., 80) indicate potential downward reversals.
Values below the configured oversold level (e.g., 20) indicate potential upward reversals.
Crossovers of the K-line (blue) with the D-line (orange) generate immediate buy or sell signals.
Practical use:
Long (buy): Look for a green upward arrow after the indicator exits an oversold region.
Short (sell): Look for a red downward arrow after the indicator exits an overbought region.
This indicator is especially useful for traders operating perpetual futures contracts, providing increased precision and clarity for decision-making based on speculative money flows.
ZY Return ZonesThe ZY Return Zones indicator automatically draws the potential support/resistance levels of the parity and clearly displays them on the chart. Although the default settings are the last support/resistance levels, users can change the settings to show the last 6 support/resistance points in the indicator settings.
Check OAS of EMAsThis script checks the Optimal Alignment and Slope of the EMA's and prints a label if it finds one.
🔍 1. Optimal Alignment
This refers to the order of EMAs on the chart, which should reflect the trend.
In an uptrend, the alignment might be:
10 EMA above 20 EMA above 50 EMA
In a downtrend:
10 EMA below 20 EMA below 50 EMA
This "stacked" alignment confirms trend strength and direction.
📈 2. Slope
The angle or slope of the EMAs shows momentum.
A steep upward slope = strong bullish momentum.
A steep downward slope = strong bearish momentum.
Flat or sideways slope = weak or no trend (ranging market).