Range: OHLC vs Previous OHLC - Version 2Version 1 here -
This is essentially the same as version 1 with one update. You have the freedom to independently choose OHLC for current candle and prior candle.
To elaborate further, Version 1 had 1 choice. For example, Close; you could only compare the close of prior candle to the current candle.
Version 2; you can compare close of the current candle to the low of the prior candle.
Pesquisar nos scripts por "乌德勒支+VS+赫拉克勒斯"
stock gain% vs index gain %This shows the relative strength or weakness of a stock vs an index on any given candle price movement.
Negative stock candle and relative strength shows accumulation
Positive stock candle and relative weakness shows distribution
accumulation will plot an 'A'
distribution will plot a 'D'
Range: OHLC vs Previous OHLCThis will plot your choice of OHLC (or any of the averaging choices) of the current candle compared to the previous candle.
For example if you choose "high" for the input and set the chart to daily, you'll see the currently daily high vs the previous daily high.
Green candle represent a higher high and the length of the candle represents how much higher.
Red candles represent a lower high than the previous day and the length is by how much lower.
This indicator is pretty straight forward, look for me to build on this with something a little more elaborate in the near future.
200/100 vs 190/80 EMA [jarederaj]Track the 200/100 EMA cross Vs the 180/90 EMA cross. Also, see the dates when these periods start on the chart.
Bitfinex Long vs Short RatiosWas impressed with the 'Longs vs Shorts Ratio' idea from the tweet below so I coded an indicator, enjoy.
twitter.com
Compare - Oscillator vs BTC momentumI've made a simple indicator to compare the momentum of a trading pair against the momentum of BTC to the dollar. I use it to see how a pair is affected by BTC's momentum... I wouldnt use it to trade off alone, but it can be a useful tool alongside other indicators.
The time range can be adjusted, but I wouldnt reccomend setting it to anything over 12M, or under 1W.... as I'm not sure if it would work.
Any feedback is welcome!
This is an idea I had after looking at a wonderful visualisation made by BarclayJames, link below:
www.tradingview.com
비트코인 한국 프리미엄 캔들 차트 (Bithumb vs Bitfinex) by 호재박스 슈퍼스타지표명: 비트코인 한국 프리미엄 캔들 차트 (Bithumb vs Bitfinex)
제작자: 호재박스 슈퍼스타
홈페이지: hozaebox.com
BTCUSD long vs short ratio+rsiJust a script I want to share with friends on a discord
orange/green line : longs vs short ratio (100 = only longs, 0 = only shorts)
purple line : RSI of (longs-shorts)
Bitcoin Exchanges Premium (Incl Int & GBTC) vs GdaxShows the exchange premiums internationally (Hong Kong, Luxembourg, Korea, Japan, China) vs Gdax. Also includes GBTC Trust price (adjusted).
Index Vs Futures v4.0 (dashed edition)Generalized script of
Originally designed for bitcoin, but can be used to compare between futures and index (or any two symbol expressions).
Conventions:
- green background := futures deviates 'way above' index
- red background := futures deviates 'way below' index
VS Score [SpiritualHealer117]An experimental indicator that uses historical prices and readings of technical indicators to give the probability that stock and crypto prices will be in a certain range on the next close. This indicator may be helpful for options traders or for traders who want to see the probability of a move.
It classifies returns into five categories:
Extreme Rise - Over 2 standard deviations above normal returns
Rise - Between 0.5 standard deviations and 2 standard deviations above normal returns
Flat - Falling in the range of +/- 0.5 standard deviations of normal returns
Fall - Between 0.5 standard deviations and 2 standard deviations below normal returns
Extreme Fall - Over 2 standard deviations below normal returns
It is an adaptive probability model, which trains on the previous 1000 data points, and is calculated by creating probability vectors for the current reading of the PPO, MA, volume histogram, and previous return, and combining them into one probability vector.
Market Profile Dominance Analyzer# Market Profile Dominance Analyzer
## 📊 OVERVIEW
**Market Profile Dominance Analyzer** is an advanced multi-factor indicator that combines Market Profile methodology with composite dominance scoring to identify buyer and seller strength across higher timeframes. Unlike traditional volume profile indicators that only show volume distribution, or simple buyer/seller indicators that only compare candle colors, this script integrates six distinct analytical components into a unified dominance measurement system.
This indicator helps traders understand **WHO controls the market** by analyzing price position relative to Market Profile key levels (POC, Value Area) combined with volume distribution, momentum, and trend characteristics.
## 🎯 WHAT MAKES THIS ORIGINAL
### **Hybrid Analytical Approach**
This indicator uniquely combines two separate methodologies that are typically analyzed independently:
1. **Market Profile Analysis** - Calculates Point of Control (POC) and Value Area (VA) using volume distribution across price channels on higher timeframes
2. **Multi-Factor Dominance Scoring** - Weights six independent factors to produce a composite dominance index
### **Six-Factor Composite Analysis**
The dominance score integrates:
- Price position relative to POC (equilibrium assessment)
- Price position relative to Value Area boundaries (acceptance/rejection zones)
- Volume imbalance within Value Area (institutional bias detection)
- Price momentum (directional strength)
- Volume trend comparison (participation analysis)
- Normalized Value Area position (precise location within fair value zone)
### **Adaptive Higher Timeframe Integration**
The script features an intelligent auto-selection system that automatically chooses appropriate higher timeframes based on the current chart period, ensuring optimal Market Profile structure regardless of the trading timeframe being analyzed.
## 💡 HOW IT WORKS
### **Market Profile Construction**
The indicator builds a Market Profile structure on a higher timeframe by:
1. **Session Identification** - Detects new higher timeframe sessions using `request.security()` to ensure accurate period boundaries
2. **Data Accumulation** - Stores high, low, and volume data for all bars within the current higher timeframe session
3. **Channel Distribution** - Divides the session's price range into configurable channels (default: 20 rows)
4. **Volume Mapping** - Distributes each bar's volume proportionally across all price channels it touched
### **Key Level Calculation**
**Point of Control (POC)**
- Identifies the price channel with the highest accumulated volume
- Represents the price level where the most trading activity occurred
- Serves as a magnetic level where price often returns
**Value Area (VA)**
- Starts at POC and expands both upward and downward
- Includes channels until reaching the specified percentage of total volume (default: 70%)
- Expansion algorithm compares adjacent volumes and prioritizes the direction with higher activity
- Defines the "fair value" zone where most market participants agreed to trade
### **Dominance Score Formula**
```
Dominance Score = (price_vs_poc × 10) +
(price_vs_va × 5) +
(volume_imbalance × 0.5) +
(price_momentum × 100) +
(volume_trend × 5) +
(va_position × 15)
```
**Component Breakdown:**
- **price_vs_poc**: +1 if above POC, -1 if below (shows which side of equilibrium)
- **price_vs_va**: +2 if above VAH, -2 if below VAL, 0 if inside VA
- **volume_imbalance**: Percentage difference between upper and lower VA volumes
- **price_momentum**: 5-period SMA of price change (directional acceleration)
- **volume_trend**: Compares 5-period vs 20-period volume averages
- **va_position**: Normalized position within Value Area (-1 to +1)
The composite score is then smoothed using EMA with configurable sensitivity to reduce noise while maintaining responsiveness.
### **Market State Determination**
- **BUYERS Dominant**: Smooth dominance > +10 (bullish control)
- **SELLERS Dominant**: Smooth dominance < -10 (bearish control)
- **NEUTRAL**: Between -10 and +10 (balanced market)
## 📈 HOW TO USE THIS INDICATOR
### **Trend Identification**
- **Green background** indicates buyers are in control - look for long opportunities
- **Red background** indicates sellers are in control - look for short opportunities
- **Gray background** indicates neutral market - consider range-bound strategies
### **Signal Interpretation**
**Buy Signals** (green triangle) appear when:
- Dominance crosses above -10 from oversold conditions
- Previous state was not already bullish
- Suggests shift from seller to buyer control
**Sell Signals** (red triangle) appear when:
- Dominance crosses below +10 from overbought conditions
- Previous state was not already bearish
- Suggests shift from buyer to seller control
### **Value Area Context**
Monitor the information table (top-right) to understand market structure:
- **Price vs POC**: Shows if trading above/below equilibrium
- **Volume Imbalance**: Positive values favor buyers, negative favors sellers
- **Market State**: Current dominant force (BUYERS/SELLERS/NEUTRAL)
### **Multi-Timeframe Strategy**
The auto-timeframe feature analyzes higher timeframe structure:
- On 1-minute charts → analyzes 2-hour structure
- On 5-minute charts → analyzes Daily structure
- On 15-minute charts → analyzes Weekly structure
- On Daily charts → analyzes Yearly structure
This higher timeframe context helps avoid counter-trend trades against the dominant force.
### **Confluence Trading**
Strongest signals occur when multiple factors align:
1. Price above VAH + positive volume imbalance + buyers dominant = Strong bullish setup
2. Price below VAL + negative volume imbalance + sellers dominant = Strong bearish setup
3. Price at POC + neutral state = Potential breakout/breakdown pivot
## ⚙️ INPUT PARAMETERS
- **Higher Time Frame**: Select specific HTF or use 'Auto' for intelligent selection
- **Value Area %**: Percentage of volume contained in VA (default: 70%)
- **Show Buy/Sell Signals**: Toggle signal triangles visibility
- **Show Dominance Histogram**: Toggle histogram display
- **Signal Sensitivity**: EMA period for dominance smoothing (1-20, default: 5)
- **Number of Channels**: Market Profile resolution (10-50, default: 20)
- **Color Settings**: Customize buyer, seller, and neutral colors
## 🎨 VISUAL ELEMENTS
- **Histogram**: Shows smoothed dominance score (green = buyers, red = sellers)
- **Zero Line**: Neutral equilibrium reference
- **Overbought/Oversold Lines**: ±50 levels marking extreme dominance
- **Background Color**: Highlights current market state
- **Information Table**: Displays key metrics (state, dominance, POC relationship, volume imbalance, timeframe, bars in session, total volume)
- **Signal Shapes**: Triangle markers for buy/sell signals
## 🔔 ALERTS
The indicator includes three alert conditions:
1. **Buyers Dominate** - Fires on buy signal crossovers
2. **Sellers Dominate** - Fires on sell signal crossovers
3. **Dominance Shift** - Fires when dominance crosses zero line
## 📊 BEST PRACTICES
### **Timeframe Selection**
- **Scalping (1-5min)**: Focus on 2H-4H dominance shifts
- **Day Trading (15-60min)**: Monitor Daily and Weekly structure
- **Swing Trading (4H-Daily)**: Track Weekly and Monthly dominance
### **Confirmation Strategies**
1. **Trend Following**: Enter in direction of dominance above/below ±20
2. **Reversal Trading**: Fade extreme readings beyond ±50 when diverging with price
3. **Breakout Trading**: Look for dominance expansion beyond ±30 with increasing volume
### **Risk Management**
- Avoid trading during NEUTRAL states (dominance between -10 and +10)
- Use POC levels as logical stop-loss placement
- Consider VAH/VAL as profit targets for mean reversion
## ⚠️ LIMITATIONS & WARNINGS
**Data Requirements**
- Requires sufficient historical data on current chart (minimum 100 bars recommended)
- Lower timeframes may show fewer bars per HTF session initially
- More accurate results after several complete HTF sessions have formed
**Not a Standalone System**
- This indicator analyzes market structure and participant control
- Should be combined with price action, support/resistance, and risk management
- Does not guarantee profitable trades - past dominance does not predict future results
**Repainting Characteristics**
- Higher timeframe levels (POC, VAH, VAL) update as new bars form within the session
- Dominance score recalculates with each new bar
- Historical signals remain fixed, but current session data is developing
**Volume Limitations**
- Uses exchange-provided volume data which varies by instrument type
- Forex and some CFDs use tick volume (not actual transaction volume)
- Most accurate on instruments with reliable volume data (stocks, futures, crypto)
## 🔍 TECHNICAL NOTES
**Performance Optimization**
- Uses `max_bars_back=5000` for extended historical analysis
- Efficient array management prevents memory issues
- Automatic cleanup of session data on new period
**Calculation Method**
- Market Profile uses actual volume distribution, not TPO (Time Price Opportunity)
- Value Area expansion follows traditional Market Profile auction theory
- All calculations occur on the chart's current symbol and timeframe
## 📚 EDUCATIONAL VALUE
This indicator helps traders understand:
- How institutional traders use Market Profile to identify fair value
- The relationship between price, volume, and market acceptance
- Multi-factor analysis techniques for assessing market conditions
- The importance of higher timeframe structure in trade planning
## 🎓 RECOMMENDED READING
To better understand the concepts behind this indicator:
- "Mind Over Markets" by James Dalton (Market Profile foundations)
- "Markets in Profile" by James Dalton (Value Area analysis)
- Volume Profile analysis in institutional trading
## 💬 USAGE TERMS
This indicator is provided as an educational and analytical tool. It does not constitute financial advice, investment recommendations, or trading signals. Users are responsible for their own trading decisions and should conduct their own research and due diligence.
Trading involves substantial risk of loss. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
Gold vs. Dollar Sentiment Map [SB1]🟡 Gold vs Dollar Sentiment Map
The Gold vs Dollar Sentiment Map reveals the direct inverse relationship between Gold Futures (GC) and the U.S. Dollar Index (DXY) — one of the most reliable global risk-sentiment gauges.
It helps traders instantly identify whether capital is flowing into safety (Gold) or into the Dollar (risk assets) during any session or timeframe.
🔍 Core Logic
Risk-Off (Bearish background = Red): DXY ↓ and Gold ↑ → investors seeking safety, rising fear or falling yields.
Risk-On (Bullish background = Green): DXY ↑ and Gold ↓ → investors rotating into risk assets, stronger USD demand.
Neutral (Gray): Mixed signals – no dominant macro driver.
📊 Dashboard
A compact on-chart table displays real-time trend bias for:
Gold (GC) – Bullish / Bearish / Neutral
U.S. Dollar Index (DXY) – Bullish / Bearish / Neutral
Color shading reflects each asset’s intrabar momentum.
⚙️ Visual Features
Adaptive background colors to show sentiment shifts.
Strong candle markers highlighting momentum bars near range extremes.
Alerts for clear Risk-On / Risk-Off alignment.
🧭 How to Use
Red background (Risk-Off): Gold strength + Dollar weakness → favorable environment for long gold setups.
Green background (Risk-On): Dollar strength + Gold weakness → bias toward short gold or avoid long exposure.
Gray background: Stay patient; look for confirmation or wait for alignment.
💡 Ideal For
Gold and Forex traders monitoring macro rotation.
Sentiment confirmation alongside order-flow, VWAP, or volume-delta tools.
Overlaying on intraday or higher-timeframe charts to frame trade bias.
Advanced Correlation Monitor📊 Advanced Correlation Monitor - Pine Script v6
🎯 What does this indicator do?
Monitors real-time correlations between 13 different asset pairs and alerts you when historically strong correlations break, indicating potential trading opportunities or changes in market dynamics.
🚀 Key Features
✨ Multi-Market Monitoring
7 Forex Pairs (GBPUSD/DXY, EURUSD/GBPUSD, etc.)
6 Index/Stock Pairs (SPY/S&P500, DAX/NASDAQ, TSLA/NVDA, etc.)
Fully configurable - change any pair from inputs
📈 Dual Correlation Analysis
Long Period (90 bars): Identifies historically strong correlations
Short Period (6 bars): Detects recent breakdowns
Pearson Correlation using Pine Script v6 native functions
🎨 Intuitive Visualization
Real-time table with 6 information columns
Color coding: Green (correlated), Red (broken), Gray (normal)
Visual states: 🟢 OK, 🔴 BROKEN, ⚫ NORMAL
🚨 Smart Alert System
Only alerts previously correlated pairs (>80% historical)
Detects breakdowns when short correlation <80%
Consolidated alert with all affected pairs
🛠️ Flexible Configuration
Adjustable Parameters:
📅 Periods: Long (30-500), Short (2-50)
🎯 Threshold: 50%-99% (default 80%)
🎨 Table: Configurable position and size
📊 Symbols: All pairs are configurable
Default Pairs:
FOREX: INDICES/STOCKS:
- GBPUSD vs DXY • SPY vs S&P500
- EURUSD vs GBPUSD • DAX vs S&P500
- EURUSD vs DXY • DAX vs NASDAQ
- USDCHF vs DXY • TSLA vs NVDA
- GBPUSD vs USDCHF • MSFT vs NVDA
- EURUSD vs USDCHF • AAPL vs NVDA
- EURUSD vs EURCAD
💡 Practical Use Cases
🔄 Pairs Trading
Detects when strong correlations break for:
Statistical arbitrage
Mean reversion trading
Divergence opportunities
🛡️ Risk Management
Identifies when "safe" assets start moving independently:
Portfolio diversification
Smart hedging
Regime change detection
📊 Market Analysis
Understand underlying market structure:
Forex/DXY correlations
Tech sector rotation
Regional market disconnection
🎓 Results Interpretation
Reading Example:
EURUSD vs DXY: -98.57% → -98.27% | 🟢 OK
└─ Perfect negative correlation maintained (EUR rises when DXY falls)
TSLA vs NVDA: 78.12% → 0% | ⚫ NORMAL
└─ Lost tech correlation (divergence opportunity)
Trading Signals:
🟢 → 🔴: Broken correlation = Possible opportunity
Large difference: Indicates correlation tension
Multiple breaks: Market regime change






















