Two level MACD into one indicatorMerged two level MACD into one indicator, then Long Entry (buy) and Short Entry (sell) is more clearly now.
Try and test it, please send me some feedback or suggestions, then the indicator can help you make money more easy!
good luck!
AMEX:SPY
Pesquisar nos scripts por "spy"
SS EMA / SMA RibbonColor Change if above or below EMAs / Ribbon
StokedStocks EMA / SMA Ribbon 9 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 200
EMAs Color Change if above or below EMAs / Ribbon
Lime : Uptrending; Long Bias
Green : Dip Buy / ReEntry or downtrend reversal warning
Red : Downtrend. Short Bias
Maroon : Short Reentry (sell the peak) or uptrend reversal warning
1st strategy Long when Price crosses above all EMAs
2nd strategy if late is buy first or second pullback to 9 or 20 EMA which are the 1st and 2nd ribbon lines (in an uptrend)
3rd strategy is Short once price crosses UNDER all EMAs
Use Trailing stop % once long or short
Better when shorter time frames line up with Longer time Frames for less risk EXAMPLE Above all EMAs on 5min chart and on Daily Chart
SMT - JimmyTrades🔧 SMT – JimmyTrades: Publication Rules and User Guide
📌 What This Script Does
This script detects Smart Money Traps (SMT) Divergences between the instrument on your chart and a comparative symbol (default: ES). It automatically plots both confirmed and unconfirmed bullish and bearish SMT setups across multiple timeframes.
These SMT divergences can help traders:
Identify potential reversal points
Confirm high-probability entries in line with smart money behavior
Enhance bias when confluence aligns with other market structure or liquidity factors
⚙️ Important Settings
Please make sure you correctly configure the following inputs:
Symbol: The comparative asset to check divergence against. Common examples: ES, NQ, SPX.
Session Type: Ensure this matches your chart’s session setting: Extended or Regular.
Adjustment Type: Match this to your chart (None, Dividends, or Splits) under TradingView’s chart settings (bottom-right corner).
Pivot Lookback: Controls the sensitivity of divergence detection (default is 15). Higher values reduce signal frequency.
Timeframes: You can enable up to six timeframes independently for SMT scanning.
🟢 Bullish SMT Signals
Bullish SMTs are identified when price on your chart makes a lower low, but the comparative symbol (e.g., ES) does not, suggesting potential accumulation or trap liquidity.
🔴 Bearish SMT Signals
Bearish SMTs are flagged when your chart makes a higher high, while the comparative symbol fails to do so, hinting at distribution or a stop run setup.
📈 How to Use This Script
Add the indicator to your chart.
Set the correct comparative symbol (e.g., ES for NQ, SPX for SPY, etc.).
Choose your preferred timeframes.
Watch for unconfirmed SMTs (dotted lines) as potential early warnings.
Look for confirmed SMTs (solid lines) once price respects the divergence zone for several bars.
Combine with structure, liquidity sweeps, killzones, and high-impact news for higher confluence.
🧠 Best Practices
Use SMT signals as part of a broader trade plan—not standalone entries.
Focus on SMTs forming after liquidity sweeps or during session opens (London/NY).
Combine with your higher-timeframe bias, breaker blocks, or Pegasus/Unicorn entry models.
⚠️ Limitations
Historical backtest may show perfect SMTs—real-time confirmation requires patience.
SMTs may not play out without proper context—avoid blindly entering based on signal alone.
This script is not financial advice—use at your own discretion and always manage risk.
Willams %RwEMAspy
Was looking for something else when surfed into an old question
wanting %R 21 period with EMA 13 period of the %R signal
and being a rookie at this, made this code to post for them.
Tried to comment the script in such a way that other rookies
like me could make better sense of what is being done. Hope
this helps someone. I find it useful as one of my indicators for
trading.
Pinescript for tradingview.com user Tom1trader
All time frames.
Interpretation:
%R (Red) crosses above it's average (Blue) - bull
%R crosses below it's average - bear. Background
color changes green-up red-down with above crossings.
Most but not all of serious price movement takes place
from the time the %R (red) goes into oversold (or bought) and
exits again.
%R centerline crosses can also be useful.
I use various indicators and want all of the confirmation
that I can get for expectations BUT I never know what the
next bar will do and define my risks accordingly.
Sectors Relative Strength Normal DistributionI wrote this indicator as an attempt to see the Relative Strengths of different sectors in the same scale, but there is also other ways to do that.
This indicator plots the normal distribution for the 10 sectors of the SPY for the last X bars of the selected resolution, based on the selected comparative security. It shows which sectors are outperforming and underperforming the SPY (or any other security) relatively to each other by the given deviation.
MarketRSThe strength of a stock relative to the market (SPY) is an import indicator accumulation of a stock by institutionan funds, especially during a market decline. This indicator plot the ratio of a security/SPY and plots a fast (5 period) and slow (21 period) EMA.
TWAP/VWAP AUTO SHIFTER Bands🟢 TWAP/VWAP AUTO SHIFTER Bands – NinjaTrader Logic + Dynamic Deviation Zones
📌 Overview
This powerful tool combines institution-grade price anchoring (VWAP/TWAP) with adaptive volatility bands and smart zone visualization. The core innovation: a toggleable VWAP logic engine, letting traders switch between:
* 🧠 Standard TradingView VWAP/TWAP
* 🧠 Custom NinjaTrader-style VWAP logic (faithfully ported for Pine Script 6)
Use it to visualize where price is anchored, where trend turns, and where hidden liquidity or mean-reversion zones may be forming.
🎯 What This Script Does
This indicator plots:
1. A central VWAP/TWAP line, anchored to -any timeframe or custom period-
2. Karma trend line using adaptive volatility envelopes
3. Dynamic bands that react to price range, volatility, and momentum
4. Optional range-based zones using Fibonacci-like ratios for structure detection
5. A visual "hidden fill" shading system to highlight bullish or bearish control
🚀 Unique Features
🧮 1. NinjaTrader VWAP Logic (Optional)
When enabled, this mode replaces TradingView’s default VWAP with a custom weighted average based on:
mean = average of ((high + low) and (open + close))
VWAP = sum(mean × volume) / sum(volume)
✔ Gives more stable center in volatile conditions
✔ Matches many institutional VWAP tools
Use the toggle:
☑️ “Use NinjaTrader VWAP Formula”
To activate this precision logic.
🕰 2. Anchor VWAP/TWAP to Any Timeframe
Choose your VWAP anchor from:
* D = Daily
* W = Weekly
* M = Monthly
* Or define your **own custom timeframe** (e.g., “240” or “15”)
This makes it:
⏳ Perfect for day traders anchoring intraday
🧭 Valuable for swing traders observing weekly bias
🧱 Solid for long-term positioning
📊 3. Karma Deviation Line (Trend Pulse)
The Karma line uses an adaptive efficiency ratio + fast/slow deviation logic to track momentum shifts.
* When it crosses above VWAP: possible bullish control
* When it falls below: possible reversion risk
It uses smoothed deviation bands to filter noise.
🎨 4. Hidden Fills & Range Bands
Zone shading makes this one of the most visual VWAP bands indicators out there:
* Red shade = aggressive push above VWAP
* Green shade = price collapsing under VWAP
* White “internal channel” = tight inner value zone
* Purple/gray bands = map structural levels for profit-taking, fading, or breakout watch
🧠 How to Use It
🧩 VWAP Anchoring
* Set timeframe to match your strategy horizon
* Use custom anchor (like 15m, 2h) to match intraday setups
🧠 Ninja Logic
* Enable to use VWAP matching NinjaTrader and institutional backends
* Recommended for high-volume or low-liquidity instruments
📈 Karma Bands
* Look for Karma line breaking VWAP from below → early trend
* Look for Karma curling down inside green zone → mean reversion
📐 Range Zones
* Use shaded fills to visualize exhaustion
* Watch for clean bounces off internal ratios
⚙️Recommended Settings
| Style | Setting |
| -------------------------------| ------------------------------------ |
| VWAP Mode | NinjaLogic ON (for precise behavior) |
| Anchor TF | Daily (or custom intraday like 30m) |
| Deviation | Fast: 50, Slow: 200 |
| Show Range Marks | ON |
| Hidden Zones | ON (for visual clarity) |
🧪 Tested On:
* BTC/ETH/USD
* Nifty Futures
* NASDAQ Stocks
* SPY/QQQ
* Crude Oil and Metals
📝 Author’s Note
Remember that this is an educational idea and past performance is not assurance of future performance.
🟢 Happy Anchoring!
Triple MA RS ConfluenceThis script evaluates relative strength confluence by comparing the ratio of an asset to a benchmark (e.g., Asset/SPY) against three configurable moving averages (MA #1, MA #2, MA #3).
Each bar is color-coded based on RS position relative to the MAs:
Lime Green — RS > all three MAs (full confluence)
Yellow — RS > MA #2 and MA #3, but ≤ MA #1 (partial confluence)
Red — RS ≤ MA #2 (no confluence)
Designed for systematic trend identification, this tool helps visually confirm RS alignment across short-, medium-, and long-term conditions. Inputs include adjustable MA lengths and types (EMA/SMA), benchmark symbol, and visual toggles for confluence state changes.
Pairs well with multi-timeframe RS strategies or clustered MA compression filters.
Distribution & Accumulation Days# Distribution & Accumulation Days Indicator
## Overview
This powerful institutional activity tracker identifies **Distribution Days** (selling pressure) and **Accumulation Days** (buying pressure) based on the proven methodology used by Investor's Business Daily (IBD). Perfect for detecting when "smart money" institutions are actively buying or selling, helping you align your trades with institutional flow.
## What It Does
- **Distribution Days**: Identifies days when price drops significantly on higher volume (institutional selling)
- **Accumulation Days**: Identifies days when price rises significantly on higher volume (institutional buying)
- **Real-time Counting**: Tracks the number of each type over your specified lookback period
- **Net Analysis**: Shows whether buying or selling pressure is dominant
## Key Features
### 🎯 **Customizable Threshold**
- Set your own price change percentage (default 0.2%) to filter out minor moves
- Focus only on significant institutional activity
### 📊 **Moving Average Filter**
- Optional MA filter to eliminate noise during strong downtrends
- Choose from SMA, WMA, or EMA
- Only counts signals when price is above the moving average
### 📈 **Visual Markers**
- **Red 'D'** markers above bars = Distribution (selling pressure)
- **Green 'A'** markers below bars = Accumulation (buying pressure)
- Numbers show current count within your lookback period
### 📋 **Information Dashboard**
Real-time table displays:
- Total Distribution Days in period
- Total Accumulation Days in period
- Net difference (positive = more buying, negative = more selling)
## How to Use
### Market Analysis
- **4-5 Distribution Days** in 25 sessions = Potential market weakness
- **Multiple Accumulation Days** after decline = Potential bottom formation
- **Net positive** = Institutional buying dominance
- **Net negative** = Institutional selling dominance
### Trade Setup
- Look for accumulation clusters near support levels for long entries
- Watch for distribution clusters near resistance for potential short setups
- Use in conjunction with your existing technical analysis
## Settings
| Parameter | Description | Default |
|-----------|-------------|---------|
| Days Back | Lookback period for counting | 25 |
| Price Change Threshold | Minimum % move required | 0.2% |
| Moving Average Filter | Enable/disable MA filter | Off |
| MA Type | SMA, WMA, or EMA | EMA |
| MA Length | Moving average period | 50 |
## Best Practices
- Use on **daily timeframe only** (automatically restricts to daily)
- Works best on major indices (SPY, QQQ, IWM) and liquid stocks
- Combine with support/resistance levels for better entries
- Monitor both individual counts and net difference for complete picture
## Important Notes
- Based on proven IBD methodology used by professional traders
- Requires significant volume confirmation - price moves without volume are ignored
- Most effective when used as part of a complete trading system
- Works only on daily charts (designed for institutional timeframe analysis)
---
*This indicator helps you see the market through institutional eyes. When the big players are buying or selling, you'll know.*
**Tags**: Distribution, Accumulation, IBD, Institutional, Volume Analysis, Smart Money, Market Structure
Yelober - Sector Rotation Detector# Yelober - Sector Rotation Detector: User Guide
## Overview
The Yelober - Sector Rotation Detector is a TradingView indicator designed to track sector performance and identify market rotations in real-time. It monitors key sector ETFs, calculates performance metrics, and provides actionable stock recommendations based on sector strength and weakness.
## Purpose
This indicator helps traders identify when capital is moving from one sector to another (sector rotation), which can provide valuable trading opportunities. It also detects risk-off conditions in the market and highlights sectors with abnormal trading volume.
## Table Columns Explained
### 1. Sector
Displays the sector name being monitored. The indicator tracks six primary sectors plus the S&P 500:
- Energy (XLE)
- Financial (XLF)
- Technology (XLK)
- Consumer Staples (XLP)
- Utilities (XLU)
- Consumer Discretionary (XLY)
- S&P 500 (SPY)
### 2. Perf %
Shows the daily percentage performance of each sector ETF. Values are color-coded:
- Green: Positive performance
- Red: Negative performance
Positive values display with a "+" sign (e.g., +1.25%)
### 3. RSI
Displays the Relative Strength Index value for each sector, which helps identify overbought or oversold conditions:
- Values above 70 (highlighted in red): Potentially overbought
- Values below 30 (highlighted in green): Potentially oversold
- Values between 30-70 (highlighted in blue): Neutral territory
### 4. Vol Ratio
Shows the volume ratio, which compares today's volume to the average volume over the lookback period:
- Values above 1.5x (highlighted in yellow): Indicates abnormally high trading volume
- Values below 1.5x (highlighted in blue): Normal trading volume
This helps identify sectors with unusual activity that may signal important price movements.
### 5. Trend
Displays the current price trend direction with symbols:
- ▲ (green): Uptrend (today's close > yesterday's close)
- ▼ (red): Downtrend (today's close < yesterday's close)
- ◆ (gray): Neutral (today's close = yesterday's close)
## Summary & Recommendations Section
The summary section provides:
1. **Sector Rotation Detection**: Identifies when there's a significant performance gap (>2%) between the strongest and weakest sectors.
2. **Risk-Off Mode Detection**: Alerts when defensive sectors (Consumer Staples and Utilities) are positive while Technology is negative, which often signals investors are moving to safer assets.
3. **Strong Volume Detection**: Indicates when any sector shows abnormally high trading volume.
4. **Stock Recommendations**: Suggests specific stocks to consider for long positions (from the strongest sectors) and short positions (from the weakest sectors).
## Example Interpretations
### Example 1: Sector Rotation
If you see:
- Technology: -1.85%
- Financial: +2.10%
- Summary shows: "SECTOR ROTATION DETECTED: Rotation from Technology to Financial"
**Interpretation**: Capital is moving out of tech stocks and into financial stocks. This could be due to rising interest rates, which typically benefit banks while pressuring high-growth tech companies. Consider looking at financial stocks like JPM, BAC, and WFC for potential long positions.
### Example 2: Risk-Off Conditions
If you see:
- Consumer Staples: +0.80%
- Utilities: +1.20%
- Technology: -1.50%
- Summary shows: "RISK-OFF MODE DETECTED"
**Interpretation**: Investors are seeking safety in defensive sectors while selling growth-oriented tech stocks. This often occurs during market uncertainty or ahead of economic concerns. Consider reducing exposure to high-beta stocks and possibly adding defensive names like PG, KO, or NEE.
### Example 3: Volume Spike
If you see:
- Energy: +3.20% with Volume Ratio 2.5x (highlighted in yellow)
- Summary shows: "STRONG VOLUME DETECTED"
**Interpretation**: The energy sector is making a strong move with significantly higher-than-average volume, suggesting conviction behind the price movement. This could indicate the beginning of a sustained trend in energy stocks. Consider names like XOM, CVX, and COP.
## How to Use the Indicator
1. Apply the indicator to any chart (works best on daily timeframes).
2. Customize settings if needed:
- Timeframe: Choose between intraday (60 or 240 minutes), daily, or weekly
- Lookback Period: Adjust the historical comparison period (default: 20)
- RSI Period: Modify the RSI calculation period (default: 14)
3. To refresh the data: Click the settings icon, increase the "Click + to refresh data" counter, and click "OK".
4. Identify opportunities based on sector performance, RSI levels, volume ratios, and the summary recommendations.
This indicator helps traders align with market rotation trends and identify which sectors (and specific stocks) may outperform or underperform in the near term.
SHYY TFC SPX Sectors list This script provides a clean, configurable table displaying real-time data for the major SPX sectors, key indices, and market sentiment indicators such as VIX and the 10-year yield (US10Y).
It includes 16 columns with two rows:
* The top row shows the sector/asset symbol.
* The bottom row shows the most recent daily close price.
Each price cell is dynamically color-coded based on:
* Direction (green/red) during regular trading hours
* Separate colors during extended hours (pre-market or post-market)
* VIX values greater than 30 trigger a distinct background highlight
Users can fully control the position of the table on the chart via input settings. This flexibility allows traders to place the table in any screen corner or center without overlapping key price action.
The script is designed for:
* Monitoring broad market health at a glance
* Understanding sector performance in real-time
* Spotting risk-on/risk-off behavior (via SPY, QQQ, VIX, US10Y)
Unlike traditional watchlists, this table visually encodes directional movement and trading session context (regular vs. extended hours), making it highly actionable for intraday, swing, or macro-level analysis.
All data is pulled using `request.security()` on daily candles and uses pure Pine logic without external dependencies.
To use:
1. Add the indicator to your chart.
2. Adjust the table position via the input dropdown.
3. Read sector strength or weakness directly from the table.
Smart Pro Strategy – Buy/Sell + Elliott + Squeeze + Dashboard📊 Smart Momentum Pro – Complete Intraday Strategy for Stocks, Crypto, and Indices
✅ What’s Included:
• Buy/Sell signals based on price action, volume, and momentum
• Elliott Wave detection (1, 3, 5, A, B, C)
• Live market summary table with trend direction and volatility
• Fibonacci-based reversal zone
• Squeeze alert system with visual chart notifications
• Smart EMA 8/21/50/200 tracking
• Fully designed for black charts and red/green candles
• Perfect for BTC, ETH, SPY, HIMS, and more
🧠 Timeframes: Ideal for 5min, 15min, 1h, and Daily charts.
Creflo C's BS Detector✅ Buy Signal Triggers when:
All of the following conditions are true:
📈 close > ema5 — price is above the short-term trend.
🔁 ema10 > ema21 — confirms near-term bullish momentum.
📊 close > ema50 — strong medium-term trend.
🏗️ close > ema200 — long-term trend is bullish.
💪 RSI > sma(RSI, 2) — momentum is increasing.
🏔️ close >= 85% of the 104-week high — stock is near its 2-year highs.
⚔️ (60-bar performance > SPY's 60-bar performance) — stock is outperforming the market.
⏱️ It's been at least 21 bars since the last signal — you’re clear to fire again.
❌ Sell Signal Triggers when any one of the following is true:
🚨 close < chandelierExit
Defined as 21-bar high - (3 × ATR(21))
This is a trailing stop based on volatility.
❌ close < ema21 — loss of short-term support.
⚠️ close < ema50 — medium-term trend breakdown.
💀 close < ema200 — long-term trend cracked.
AND:
⏱️ It's been at least 21 bars since the last signal
Creflo C's BS Detector✅ Buy Signal Triggers when:
All of the following conditions are simultaneously true:
close > ema5 → price is rising short-term.
ema10 > ema21 → near-term trend is bullish.
close > ema50 → confirms medium-term support.
close > ema200 → confirms long-term trend is up.
rsi > sma(rsi, 2) → momentum is rising.
close >= 85% of the 104-week high → shows strength relative to 2-year high.
stockPerf > benchPerf OR ticker is SPY
(Stock has outperformed the S&P 500 over the past 60 days.)
AND
It’s been at least 7 bars since the last buy signal unless the last signal was a sell.
❌ Sell Signal Triggers when any of the following is true:
close < chandelierExit
Trailing stop using:
21-bar high - (3 × ATR21)
close < ema21 → loss of short-term support.
close < ema50 → break of medium-term trend.
close < ema200 → long-term trend violation.
AND
It’s been at least 7 bars since the last sell signal unless the last signal was a buy.
Options Betting Range - FixedOptions Betting Range
Options Betting Range is a powerful TradingView indicator designed to streamline options trading by visualizing high-probability price ranges for key symbols. With automated trendlines and clear labels, it empowers traders to make precise, data-driven decisions based on customizable prediction and execution dates.
## Key Features
Broad S&P 500 Coverage: Supports most S&P 500 stock symbols, excluding those with insufficient options volume for reliable data, alongside major ETFs and indices like SPY, IWM, QQQ, DIA, TLT, ^GSPC, ^IXIC, ^RUT, ^NDX, and ^SOX.
Automated Trendlines: Plots dashed and solid trendlines to mark high/low price boundaries, triggered only on specified prediction dates for clean, uncluttered charts.
Customizable Inputs: Configure prediction and execution dates to align with your trading strategy.
Clear Visuals: Color-coded labels (green for highs, purple for lows) display price ranges and percentage spreads for rapid decision-making.
Single-Execution Logic: Draws trendlines once per prediction date, ensuring chart clarity and efficiency.
## How It Works
Based on the latest daily open interest data, the indicator calculates swing ranges for different strike dates, drawing trendlines and labels to visualize potential price boundaries for options trading.
## Why Use It?
Streamlined Analysis: Automates range visualization, saving time and reducing manual charting.
Strategic Clarity: Objective price levels minimize emotional bias and enhance trade planning.
Versatile Application: Ideal for day traders, swing traders, and options strategists across multiple markets.
## Tips for Best Use
Regular Updates: To maintain the accuracy of options betting ranges, periodically update the indicator. On the view page, hover over the indicator name and click the blue whirlwind icon to complete the update.
## Get Started
Add Options Betting Range to your TradingView chart, select a supported symbol, and customize your prediction/execution dates. Leverage the visualized price ranges to execute precise options trading strategies with confidence.
BBS – Bond Breadth Signal"When bonds scream, breadth collapses, and fear spikes — BBS listens."
🧠 BBS – Bond Breadth Signal
A reversal timing tool built on macro conviction, not price noise.
The Bond Breadth Signal (BBS) was developed to identify major market inflection points by combining four key market stress indicators:
1) 10-Year Yield ROC – Measures sharp moves in the bond market
2) Z-Score of the 10Y – Captures statistical extremes
3) NSHF (Net Highs–Lows) – Signals internal market strength or weakness
4) TLT ROC + VIX – Confirmations of flight to safety and volatility-driven fear
When all conditions align, BBS marks either a For-Sure Buy or For-Sure Sell — these are rare, high-confidence signals designed to cut through noise and focus on true market dislocations.
🔧 Features:
-Background color and signal arrows on confirmation days
-Signals remain visually active for 3 days for added clarity
-Fully adjustable thresholds and alert toggles
-Plot panel for yield, TLT, NSHF, VIX, and Z-score visuals
This tool isn’t designed to fire every day. It’s meant to wait for those moments when the market truly bends — not just wiggles.
Best used on major indices (SPY, QQQ, IWM) to assess macro turning points.
Single MA Pullback – Producers TradeHow to Use the “Single MA Pullback – Producers Trade” Indicator
This indicator helps options traders identify high-probability CALL and PUT signals based on price reacting to a single moving average.
⸻
✅ How It Works
• Select your preferred MA type (EMA, SMA, WMA, VWMA) and length.
• A Buy signal (CALL) is generated when price crosses above the MA.
• A Sell signal (PUT) is generated when price crosses below the MA.
• Visual arrows mark each signal, and a label suggests an option contract with strike and expiration.
⸻
🧠 Features
• Strike prices are automatically calculated ~1% out of the money.
• Expiration dates target the next Friday, based on the current day of the week.
• Symbol-specific strike rounding (e.g., 1 for SPY/XSP, 5 for most stocks).
⸻
📆 Expiration Date Notes
• Expiration dates shown in the label are based on a best-estimate to the next Friday.
• Depending on the time of day or day of week, the date may be off by one day.
• Always verify expiration dates on your trading platform before placing a trade.
⸻
📌 Important Tip on Expiration
A further out expiration is almost always a better idea — especially for:
• Avoiding time decay (theta)
• Holding through small pullbacks
• Letting your trade develop with less pressure
Even when the label suggests a short-dated contract, you can manually choose a longer expiration (e.g., 2–3 weeks out) for added safety and flexibility.
⸻
📈 Trading Suggestions
1. Green arrow = CALL setup. Red arrow = PUT setup.
2. Labels include trade type, strike price, and suggested expiration.
3. Confirm the signal with volume, price structure, or catalyst.
4. Manage your risk with proper sizing and optional stop-loss/target planning.
$ADD LevelsThis Pine Script is designed to track and visualize the NYSE Advance-Decline Line (ADD). The Advance-Decline Line is a popular market breadth indicator, showing the difference between advancing and declining stocks on the NYSE. It’s often used to gauge overall market sentiment and strength.
1. //@version=5
This line tells TradingView to use Pine Script v5, the latest and most powerful version of Pine.
2. indicator(" USI:ADD Levels", overlay=false)
• This creates a new indicator called ” USI:ADD Levels”.
• overlay=false means it will appear in a separate pane, not on the main price chart.
3. add = request.security(...)
This fetches real-time data from the symbol USI:ADD (Advance-Decline Line) using a 1-minute timeframe. You can change the timeframe if needed.
add_symbol = input.symbol(" USI:ADD ", "Market Breadth Symbol")
add = request.security(add_symbol, "1", close)
4. Key Thresholds
These define the market sentiment zones:
Zone. Value. Meaning
Overbought +1500 Extremely bullish
Bullish +1000 Generally bullish trend
Neutral ±500 Choppy, unclear market
Bearish -1000 Generally bearish trend
Oversold -1500 Extremely bearish
5. Plot the ADD Line hline(...)
Draws static lines at +1500, +1000, +500, -500, -1000, -1500 for reference so you can visually assess where ADD stands.
6. Horizontal Threshold Lines bgcolor(...)
• Green background if ADD > +1500 → extremely bullish.
• Red background if ADD < -1500 → extremely bearish.
7. Background Highlights alertcondition(...)
• Green background if ADD > +1500 → extremely bullish.
• Red background if ADD < -1500 → extremely bearish.
8. Alert Conditions. alertcondition(...)
Lets you create automatic alerts for:
• USI:ADD being very high or low.
• Crosses above +1000 (bullish trigger).
• Crosses below -1000 (bearish trigger).
You can use these to trigger trades or monitor sentiment shifts.
Summary: When to Use It
• Use this script in a market breadth dashboard.
• Combine it with price action and volume analysis.
• Monitor for ADD crosses to signal potential market reversals or momentum.
RRC Sniper SetupRRC Sniper Setup, this looks at candles this way:
Go to Market Scanner
Create New Scan → "RRC Sniper Setup"
Add filters listed below with timeframe logic (e.g. 1m/5m)
Run scan on:
Your Watchlist
SPY 500
QQQ 100
AI/Momentum names
1. Reclaim Filter
Find price breaking back above a key level (VWAP or EMA113)
Last 1m Close > EMA 113 (1m)
OR
Last 5m Close > VWAP
2. Retrace Filter
Price pulls back into the zone and holds within a tight range
Current Price < VWAP * 1.0025
AND
Current Price > VWAP * 0.9975
AND
Volume (Current Candle) < Volume (Previous Candle)
✅ 3. Confirm Filter
Price begins moving back up with confirmation candle and volume
Last Candle Close > Last Candle Open
AND
Volume (Current Candle) > Volume (Previous Candle)
Multi-Session ORBThe Multi-Session ORB Indicator is a customizable Pine Script (version 6) tool designed for TradingView to plot Opening Range Breakout (ORB) levels across four major trading sessions: Sydney, Tokyo, London, and New York. It allows traders to define specific ORB durations and session times in Central Daylight Time (CDT), making it adaptable to various trading strategies.
Key Features:
1. Customizable ORB Duration: Users can set the ORB duration (default: 15 minutes) via the inputMax parameter, determining the time window for calculating the high and low of each session’s opening range.
2. Flexible Session Times: The indicator supports user-defined session and ORB times for:
◦ Sydney: Default ORB (17:00–17:15 CDT), Session (17:00–01:00 CDT)
◦ Tokyo: Default ORB (19:00–19:15 CDT), Session (19:00–04:00 CDT)
◦ London: Default ORB (02:00–02:15 CDT), Session (02:00–11:00 CDT)
◦ New York: Default ORB (08:30–08:45 CDT), Session (08:30–16:00 CDT)
3. Session-Specific ORB Levels: For each session, the indicator calculates and tracks the high and low prices during the specified ORB period. These levels are updated dynamically if new highs or lows occur within the ORB timeframe.
4. Visual Representation:
◦ ORB high and low lines are plotted only during their respective session times, ensuring clarity.
◦ Each session’s lines are color-coded for easy identification:
▪ Sydney: Light Yellow (high), Dark Yellow (low)
▪ Tokyo: Light Pink (high), Dark Pink (low)
▪ London: Light Blue (high), Dark Blue (low)
▪ New York: Light Purple (high), Dark Purple (low)
◦ Lines are drawn with a linewidth of 2 and disappear when the session ends or if the timeframe is not intraday (or exceeds the ORB duration).
5. Intraday Compatibility: The indicator is optimized for intraday timeframes (e.g., 1-minute to 15-minute charts) and only displays when the chart’s timeframe multiplier is less than or equal to the ORB duration.
How It Works:
• Session Detection: The script uses the time() function to check if the current bar falls within the user-defined ORB or session time windows, accounting for all days of the week.
• ORB Logic: At the start of each session’s ORB period, the script initializes the high and low based on the first bar’s prices. It then updates these levels if subsequent bars within the ORB period exceed the current high or fall below the current low.
• Plotting: ORB levels are plotted as horizontal lines during the respective session, with visibility controlled to avoid clutter outside session times or on incompatible timeframes.
Use Case:
Traders can use this indicator to identify key breakout levels for each trading session, facilitating strategies based on price action around the opening range. The flexibility to adjust ORB and session times makes it suitable for various markets (e.g., forex, stocks, or futures) and time zones.
Limitations:
• The indicator is designed for intraday timeframes and may not display on higher timeframes (e.g., daily or weekly) or if the timeframe multiplier exceeds the ORB duration.
• Time inputs are in CDT, requiring users to adjust for their local timezone or market requirements.
• If you need to use this for GC/CL/SPY/QQQ you have to adjust the times by one hour.
This indicator is ideal for traders focusing on session-based breakout strategies, offering clear visualization and customization for global market sessions.
Symbol Seasonality Matrix (w/ BTC Base) Symbol Seasonality Matrix (w/ BTC Base)
Compare monthly performance between Bitcoin and any symbol across time
🧠 Overview
This indicator provides a side-by-side monthly return table of Bitcoin (BTCUSD from Bitfinex) and any selected symbol (e.g., ETH, stocks, etc.). It visualizes seasonality patterns, historical performance shifts, and relative trends in a clean matrix layout with dynamic line overlays.
⚙️ Mechanism
BTC Benchmarking:
BTC monthly returns are always shown as a benchmark against the selected chart symbol.
Monthly ROI Calculation:
For each month, the indicator tracks the open and close price and calculates the monthly return using:
(close_end - close_start) / close_start × 100%
It stores both price and return for BTC and the chart symbol.
Table Structure:
Each year is split into two halves:
2023 (Jan ~ Jun) and 2023 (Jul ~ Dec) for clarity.
Color Coding:
Green for positive months
Red for negative months
Monthly trend lines and labels drawn in consistent colors
Background shading per month helps track seasonality
Plot Modes:
regular: raw price
percent: relative % change from the start of selected period
normalized: base=1 scaling to compare trends
Time Range Selector:
You can define start time and end time for comparison — all logic, including table, plots, and highlights, will focus only on this window.
🧭 How to Use
Set the time range:
Choose a meaningful window such as the past 3 years or 2018–2021 to study behavior.
Compare Symbol vs BTC:
Load BTCUSD in a separate chart for baseline.
Switch to ETHUSD, SPY, or any altcoin/equity to view overlayed performance.
Analyze Seasonality:
Look for months with repeated strong/weak performance (e.g., BTC strong in October).
Compare how your asset aligns with BTC trends or diverges.
Choose View Mode:
Use percent to adjust Y-axis scaling and directly compare relative movements.
Use normalized to detect trend correlation without caring about price level.
🔍 Why It’s Useful
Spot seasonal alpha and align entries with favorable months
See if a symbol outperforms or underperforms BTC consistently
Get price-to-return context visually, not just via numbers
Quickly compare assets in real scale or normalized scale
📌 Tip
Try publishing this to a layout with multiple tickers (ETH, SOL, AAPL) to instantly switch comparisons.
Pair with volume-based or macro indicators to layer signals.
Bloomberg Financial Conditions Index (Proxy)The Bloomberg Financial Conditions Index (BFCI): A Proxy Implementation
Financial conditions indices (FCIs) have become essential tools for economists, policymakers, and market participants seeking to quantify and monitor the overall state of financial markets. Among these measures, the Bloomberg Financial Conditions Index (BFCI) has emerged as a particularly influential metric. Originally developed by Bloomberg L.P., the BFCI provides a comprehensive assessment of stress or ease in financial markets by aggregating various market-based indicators into a single, standardized value (Hatzius et al., 2010).
The original Bloomberg Financial Conditions Index synthesizes approximately 50 different financial market variables, including money market indicators, bond market spreads, equity market valuations, and volatility measures. These variables are normalized using a Z-score methodology, weighted according to their relative importance to overall financial conditions, and then aggregated to produce a composite index (Carlson et al., 2014). The resulting measure is centered around zero, with positive values indicating accommodative financial conditions and negative values representing tighter conditions relative to historical norms.
As Angelopoulou et al. (2014) note, financial conditions indices like the BFCI serve as forward-looking indicators that can signal potential economic developments before they manifest in traditional macroeconomic data. Research by Adrian et al. (2019) demonstrates that deteriorating financial conditions, as measured by indices such as the BFCI, often precede economic downturns by several months, making these indices valuable tools for predicting changes in economic activity.
Proxy Implementation Approach
The implementation presented in this Pine Script indicator represents a proxy of the original Bloomberg Financial Conditions Index, attempting to capture its essential features while acknowledging several significant constraints. Most critically, while the original BFCI incorporates approximately 50 financial variables, this proxy version utilizes only six key market components due to data accessibility limitations within the TradingView platform.
These components include:
Equity market performance (using SPY as a proxy for S&P 500)
Bond market yields (using TLT as a proxy for 20+ year Treasury yields)
Credit spreads (using the ratio between LQD and HYG as a proxy for investment-grade to high-yield spreads)
Market volatility (using VIX directly)
Short-term liquidity conditions (using SHY relative to equity prices as a proxy)
Each component is transformed into a Z-score based on log returns, weighted according to approximated importance (with weights derived from literature on financial conditions indices by Brave and Butters, 2011), and aggregated into a composite measure.
Differences from the Original BFCI
The methodology employed in this proxy differs from the original BFCI in several important ways. First, the variable selection is necessarily limited compared to Bloomberg's comprehensive approach. Second, the proxy relies on ETFs and publicly available indices rather than direct market rates and spreads used in the original. Third, the weighting scheme, while informed by academic literature, is simplified compared to Bloomberg's proprietary methodology, which may employ more sophisticated statistical techniques such as principal component analysis (Kliesen et al., 2012).
These differences mean that while the proxy BFCI captures the general direction and magnitude of financial conditions, it may not perfectly replicate the precision or sensitivity of the original index. As Aramonte et al. (2013) suggest, simplified proxies of financial conditions indices typically capture broad movements in financial conditions but may miss nuanced shifts in specific market segments that more comprehensive indices detect.
Practical Applications and Limitations
Despite these limitations, research by Arregui et al. (2018) indicates that even simplified financial conditions indices constructed from a limited set of variables can provide valuable signals about market stress and future economic activity. The proxy BFCI implemented here still offers significant insight into the relative ease or tightness of financial conditions, particularly during periods of market stress when correlations among financial variables tend to increase (Rey, 2015).
In practical applications, users should interpret this proxy BFCI as a directional indicator rather than an exact replication of Bloomberg's proprietary index. When the index moves substantially into negative territory, it suggests deteriorating financial conditions that may precede economic weakness. Conversely, strongly positive readings indicate unusually accommodative financial conditions that might support economic expansion but potentially also signal excessive risk-taking behavior in markets (López-Salido et al., 2017).
The visual implementation employs a color gradient system that enhances interpretation, with blue representing neutral conditions, green indicating accommodative conditions, and red signaling tightening conditions—a design choice informed by research on optimal data visualization in financial contexts (Few, 2009).
References
Adrian, T., Boyarchenko, N. and Giannone, D. (2019) 'Vulnerable Growth', American Economic Review, 109(4), pp. 1263-1289.
Angelopoulou, E., Balfoussia, H. and Gibson, H. (2014) 'Building a financial conditions index for the euro area and selected euro area countries: what does it tell us about the crisis?', Economic Modelling, 38, pp. 392-403.
Aramonte, S., Rosen, S. and Schindler, J. (2013) 'Assessing and Combining Financial Conditions Indexes', Finance and Economics Discussion Series, Federal Reserve Board, Washington, D.C.
Arregui, N., Elekdag, S., Gelos, G., Lafarguette, R. and Seneviratne, D. (2018) 'Can Countries Manage Their Financial Conditions Amid Globalization?', IMF Working Paper No. 18/15.
Brave, S. and Butters, R. (2011) 'Monitoring financial stability: A financial conditions index approach', Economic Perspectives, Federal Reserve Bank of Chicago, 35(1), pp. 22-43.
Carlson, M., Lewis, K. and Nelson, W. (2014) 'Using policy intervention to identify financial stress', International Journal of Finance & Economics, 19(1), pp. 59-72.
Few, S. (2009) Now You See It: Simple Visualization Techniques for Quantitative Analysis. Analytics Press, Oakland, CA.
Hatzius, J., Hooper, P., Mishkin, F., Schoenholtz, K. and Watson, M. (2010) 'Financial Conditions Indexes: A Fresh Look after the Financial Crisis', NBER Working Paper No. 16150.
Kliesen, K., Owyang, M. and Vermann, E. (2012) 'Disentangling Diverse Measures: A Survey of Financial Stress Indexes', Federal Reserve Bank of St. Louis Review, 94(5), pp. 369-397.
López-Salido, D., Stein, J. and Zakrajšek, E. (2017) 'Credit-Market Sentiment and the Business Cycle', The Quarterly Journal of Economics, 132(3), pp. 1373-1426.
Rey, H. (2015) 'Dilemma not Trilemma: The Global Financial Cycle and Monetary Policy Independence', NBER Working Paper No. 21162.
VWAP Adaptive (RelVol-Adjusted)This indicator provides an Adaptive VWAP that adjusts volume weighting using RelVol (Relative Volume at Time), offering a more accurate and context-aware price reference during sessions with irregular volume behavior.
Classic VWAP calculates the average price weighted by raw volume, without considering the time of day. This becomes a serious limitation during major market events such as CPI releases, FOMC announcements, NFP, or large-cap earnings. These events often trigger massive volume spikes within one or two candles. As a result, the classic VWAP gets pulled toward those extreme prices and becomes permanently skewed for the rest of the session.
In such conditions, classic VWAP becomes unreliable. It no longer reflects fair value and often misleads traders relying on it for dynamic support, resistance, or reversion signals.
This Adaptive VWAP improves on that by using RelVol, which compares the current volume to the average volume seen at the same time over previous sessions. It gives more weight to price when volume is typical for that moment, and adjusts the influence when volume is statistically abnormal. This reduces the impact of isolated volume spikes and stabilizes the VWAP path, even in high-volatility environments.
For example, on SPY 1-minute or 5-minute charts during a CPI release, a massive spike in volume and price can occur within a single candle. Classic VWAP will immediately anchor itself to that spike. Adaptive VWAP using RelVol softens that effect and maintains a more realistic trajectory.
Key features:
- Adaptive VWAP weighted by time-adjusted Relative Volume (RelVol)
- Designed to maintain VWAP reliability during macroeconomic events
- Flexible anchoring: Session, Week, Month, Quarter, Earnings, etc.
- Optional display of Classic VWAP for comparison
- Up to 3 customizable deviation bands (standard deviation or percentage)
This tool is ideal for intraday traders who need a VWAP that remains usable and unbiased, even in volatile sessions. It adds robustness to VWAP-based strategies by incorporating time-sensitive volume normalization.
Goldman Sachs Risk Appetite ProxyRisk appetite indicators serve as barometers of market psychology, measuring investors' collective willingness to engage in risk-taking behavior. According to Mosley & Singer (2008), "cross-asset risk sentiment indicators provide valuable leading signals for market direction by capturing the underlying psychological state of market participants before it fully manifests in price action."
The GSRAI methodology aligns with modern portfolio theory, which emphasizes the importance of cross-asset correlations during different market regimes. As noted by Ang & Bekaert (2002), "asset correlations tend to increase during market stress, exhibiting asymmetric patterns that can be captured through multi-asset sentiment indicators."
Implementation Methodology
Component Selection
Our implementation follows the core framework outlined by Goldman Sachs research, focusing on four key components:
Credit Spreads (High Yield Credit Spread)
As noted by Duca et al. (2016), "credit spreads provide a market-based assessment of default risk and function as an effective barometer of economic uncertainty." Higher spreads generally indicate deteriorating risk appetite.
Volatility Measures (VIX)
Baker & Wurgler (2006) established that "implied volatility serves as a direct measure of market fear and uncertainty." The VIX, often called the "fear gauge," maintains an inverse relationship with risk appetite.
Equity/Bond Performance Ratio (SPY/IEF)
According to Connolly et al. (2005), "the relative performance of stocks versus bonds offers significant insight into market participants' risk preferences and flight-to-safety behavior."
Commodity Ratio (Oil/Gold)
Baur & McDermott (2010) demonstrated that "gold often functions as a safe haven during market turbulence, while oil typically performs better during risk-on environments, making their ratio an effective risk sentiment indicator."
Standardization Process
Each component undergoes z-score normalization to enable cross-asset comparisons, following the statistical approach advocated by Burdekin & Siklos (2012). The z-score transformation standardizes each variable by subtracting its mean and dividing by its standard deviation: Z = (X - μ) / σ
This approach allows for meaningful aggregation of different market signals regardless of their native scales or volatility characteristics.
Signal Integration
The four standardized components are equally weighted and combined to form a composite score. This democratic weighting approach is supported by Rapach et al. (2010), who found that "simple averaging often outperforms more complex weighting schemes in financial applications due to estimation error in the optimization process."
The final index is scaled to a 0-100 range, with:
Values above 70 indicating "Risk-On" market conditions
Values below 30 indicating "Risk-Off" market conditions
Values between 30-70 representing neutral risk sentiment
Limitations and Differences from Original Implementation
Proprietary Components
The original Goldman Sachs indicator incorporates additional proprietary elements not publicly disclosed. As Goldman Sachs Global Investment Research (2019) notes, "our comprehensive risk appetite framework incorporates proprietary positioning data and internal liquidity metrics that enhance predictive capability."
Technical Limitations
Pine Script v6 imposes certain constraints that prevent full replication:
Structural Limitations: Functions like plot, hline, and bgcolor must be defined in the global scope rather than conditionally, requiring workarounds for dynamic visualization.
Statistical Processing: Advanced statistical methods used in the original model, such as Kalman filtering or regime-switching models described by Ang & Timmermann (2012), cannot be fully implemented within Pine Script's constraints.
Data Availability: As noted by Kilian & Park (2009), "the quality and frequency of market data significantly impacts the effectiveness of sentiment indicators." Our implementation relies on publicly available data sources that may differ from Goldman Sachs' institutional data feeds.
Empirical Performance
While a formal backtest comparison with the original GSRAI is beyond the scope of this implementation, research by Froot & Ramadorai (2005) suggests that "publicly accessible proxies of proprietary sentiment indicators can capture a significant portion of their predictive power, particularly during major market turning points."
References
Ang, A., & Bekaert, G. (2002). "International Asset Allocation with Regime Shifts." Review of Financial Studies, 15(4), 1137-1187.
Ang, A., & Timmermann, A. (2012). "Regime Changes and Financial Markets." Annual Review of Financial Economics, 4(1), 313-337.
Baker, M., & Wurgler, J. (2006). "Investor Sentiment and the Cross-Section of Stock Returns." Journal of Finance, 61(4), 1645-1680.
Baur, D. G., & McDermott, T. K. (2010). "Is Gold a Safe Haven? International Evidence." Journal of Banking & Finance, 34(8), 1886-1898.
Burdekin, R. C., & Siklos, P. L. (2012). "Enter the Dragon: Interactions between Chinese, US and Asia-Pacific Equity Markets, 1995-2010." Pacific-Basin Finance Journal, 20(3), 521-541.
Connolly, R., Stivers, C., & Sun, L. (2005). "Stock Market Uncertainty and the Stock-Bond Return Relation." Journal of Financial and Quantitative Analysis, 40(1), 161-194.
Duca, M. L., Nicoletti, G., & Martinez, A. V. (2016). "Global Corporate Bond Issuance: What Role for US Quantitative Easing?" Journal of International Money and Finance, 60, 114-150.
Froot, K. A., & Ramadorai, T. (2005). "Currency Returns, Intrinsic Value, and Institutional-Investor Flows." Journal of Finance, 60(3), 1535-1566.
Goldman Sachs Global Investment Research (2019). "Risk Appetite Framework: A Practitioner's Guide."
Kilian, L., & Park, C. (2009). "The Impact of Oil Price Shocks on the U.S. Stock Market." International Economic Review, 50(4), 1267-1287.
Mosley, L., & Singer, D. A. (2008). "Taking Stock Seriously: Equity Market Performance, Government Policy, and Financial Globalization." International Studies Quarterly, 52(2), 405-425.
Oppenheimer, P. (2007). "A Framework for Financial Market Risk Appetite." Goldman Sachs Global Economics Paper.
Rapach, D. E., Strauss, J. K., & Zhou, G. (2010). "Out-of-Sample Equity Premium Prediction: Combination Forecasts and Links to the Real Economy." Review of Financial Studies, 23(2), 821-862.