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.
ابحث في النصوص البرمجية عن "西班牙人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.
Dynamic 9 EMAWhat this script does
**Dynamic 9 EMA State by 20 EMA & MACD** is a visual trend and momentum tool built around a single idea:
> Turn the classic 9 EMA into a **three-state engine** (Bullish / Bearish / Neutral) by requiring agreement between the **9 vs 20 EMA trend** and a **MACD signal filter**, then display that state directly on price with one clean, readable overlay.
Instead of stacking multiple separate indicators, this script fuses them into one decision layer that is easy to see at a glance.
---
Core Logic
This script is not a random mashup. Each component has a specific role in a single, unified model:
1. **Trend Backbone: 9 EMA vs 20 EMA**
- When `9 EMA > 20 EMA`, price is in a short-term bullish environment.
- When `9 EMA < 20 EMA`, price is in a short-term bearish environment.
- The 20 EMA is treated as the reference bias; the 9 EMA tracks short-term behaviour.
2. **Momentum Filter: MACD Line vs Signal Line**
- MACD is calculated from user-defined lengths.
- When `MACD line > Signal line`, momentum confirms bullish pressure.
- When `MACD line < Signal line`, momentum confirms bearish pressure.
3. **Three-State Engine**
- **Bullish State (Green)**:
`9 EMA > 20 EMA` **and** `MACD line > Signal line`.
-> Short-term trend and momentum are aligned up.
- **Bearish State (Red)**:
`9 EMA < 20 EMA` **and** `MACD line < Signal line`.
-> Short-term trend and momentum are aligned down.
- **Neutral / Caution State (Yellow)**:
Any situation where EMAs and MACD **do not agree**.
-> Potential transition, chop, or indecision.
The color of the **9 EMA line** reflects this state in real time.
---
Visual Design and Why It Matters
All visuals are built to make the state engine intuitive and clean:
- **Dynamic 9 EMA line**
- Changes color (Bullish / Bearish / Neutral) based on the combined EMA + MACD logic.
- This is the core signal; you don’t need extra subwindows to interpret it.
- **Optional 20 EMA**
- Plotted as a simple reference trend line.
- Can be hidden if you only want the state color and glow.
- **Glow Effect (optional)**
- Multiple soft layers drawn around the 9 EMA.
- Uses the same state color to emphasize regime changes without adding extra indicators.
- Purely visual; no separate signals.
- **Cross Markers (optional)**
- Marks when the 9 EMA crosses the 20 EMA.
- Helps visually confirm where state bias may start to shift.
- Fully optional and configurable in size.
No unrelated scripts are required. The chart is meant to be published **clean**, with this indicator as the primary visual element.
---
How to Use It
1. **Trend Confirmation**
- Focus on the line color:
- Green: Look for long setups only (or manage shorts aggressively).
- Red: Look for short setups only (or manage longs defensively).
- Yellow: Be cautious; conditions are conflicting or transitioning.
2. **Regime Shifts via Alerts**
- Built-in alerts trigger **only when the state changes**:
- Bullish → Bearish
- Bearish → Bullish
- Any → Neutral / Caution
- This lets you track market regime shifts without staring at every candle.
3. **Multi-Timeframe Adaptation**
- Works on any symbol and timeframe supported by TradingView.
- You can tune:
- EMA lengths (9/20 by default),
- MACD parameters,
- Colors, glow, and cross markers,
- To fit scalping, intraday, or swing workflows.
---
Originality & Publication Notes
- This script:
- Uses standard components (EMA, MACD), but
- Combines them into a **structured, three-state regime model** directly encoded into a single EMA line + visual layer.
- Provides **state-based alerts** focused on regime transitions, not just raw indicator values.
- It is **not** a one-click clone of an existing public script.
- It is designed as a single, self-contained tool that replaces the need to stack separate 9 EMA, 20 EMA, and MACD panels just to answer one question:
- “Is the short-term trend and momentum aligned, and in which direction?”
For best compliance with House Rules:
- Publish with a **clean chart** showing only:
- This indicator,
- Candles,
- And any drawings strictly needed to demonstrate usage (or none).
- Avoid emojis in the **title**; they are fine in the description if used sparingly and not as decoration only.
On-Chart Buy, Sell, Caution, Resume Indicator## What this script does
**On-Chart BUY, SELL, RESUME & CAUTION (EMA 9/20 + MACD)** marks key decision points directly on your candles using a simple, transparent rule set:
This tool is designed to be used on the **timeframe where you actually plan your entries and exits.**
- **BUY** – Bullish EMA crossover (EMA 9 crossing above EMA 20).
- **SELL** – Bearish EMA crossover (EMA 9 crossing below EMA 20).
- **CAUTION** – Trend still intact, but MACD turns against it.
- **RESUME** – MACD turns back in favor of the trend after CAUTION.
All signals are based on **EMA 9/20 trend structure** and the **MACD line vs signal** relationship on the **current chart timeframe**.
The visual layout (circles + thin connectors) is ATR-based, so labels stay clean above wicks and EMAs without covering price action.
---
## Very important: timeframe usage
This tool is designed to be used on the **timeframe where you actually plan your entries and exits.**
- Every signal is calculated from the **current chart timeframe**:
- A BUY on the 1-minute chart is **not** the same signal as a BUY on the 5-minute or 15-minute chart.
- If you change timeframe, the historical signals will change accordingly, because the EMAs and MACD are different.
- Recommended usage:
- Choose your execution/decision timeframe (e.g., 1m, 3m, 5m, 15m, etc.).
- Apply this indicator there.
- Use higher timeframes with your own tools (or your MTF dashboard) for context, **not** by stacking multiple versions of this script.
This clarification is intentional to avoid confusion: it is **not** a multi-timeframe signal engine. It is a clean on-chart signaling layer for the timeframe you trade.
---
## Signal logic
1. **Trend backbone: EMA 9 vs EMA 20**
- `EMA 9 > EMA 20` → bullish structure.
- `EMA 9 < EMA 20` → bearish structure.
2. **BUY / SELL**
- **BUY**: A confirmed crossover of EMA 9 above EMA 20.
- **SELL**: A confirmed crossunder of EMA 9 below EMA 20.
- Optional setting `Wait for candle close` controls whether signals only print on confirmed bars (non-repainting) or can appear intrabar.
3. **CAUTION**
- When trend and MACD temporarily disagree:
- Bull trend (EMA 9 > EMA 20) but **MACD crosses down** → CAUTION for longs.
- Bear trend (EMA 9 < EMA 20) but **MACD crosses up** → CAUTION for shorts.
- CAUTION means: “Trend is still in place, but momentum just fired a warning.”
4. **RESUME**
- After a CAUTION, if MACD crosses back in favor of the prevailing trend:
- In a bull trend after CAUTION → **RESUME** (green).
- In a bear trend after CAUTION → **RESUME** (red).
- This marks a potential continuation after a pause, not a brand-new crossover.
5. **Visual design**
- EMAs can be shown or hidden.
- Signals are drawn **above** price and EMAs using ATR-based spacing:
- Thin vertical connector (optional)
- Arrow
- Circle with the text: BUY, SELL, CAUTION, or RESUME
- This keeps the price area uncluttered and makes each event easy to see.
6. **Alerts**
- Each event type has its own `alertcondition` with a structured message,
allowing integration with webhooks, bots, or external tools.
---
## Originality & compliance notes
- The script is a **single, coherent tool**:
- It implements a clear 4-state model (BUY / SELL / CAUTION / RESUME) from EMA 9/20 + MACD.
- It includes explicit CAUTION and RESUME behavior, which goes beyond a basic crossover indicator.
- Visual placement is calculated (ATR-based) to be usable in live trading.
- All logic is visible and explained; this is not a closed, black-box mashup.
- For publishing:
- Use a **clean chart** for the public example:
- Candles + this indicator (and only minimal extras if needed to illustrate usage).
- Title is ASCII only and the description explains:
- What it does,
- How it works,
- How and where it should be used,
- Why it produces different signals on different timeframes.
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






















