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.
Wyszukaj w skryptach "乌德勒支+VS+赫拉克勒斯"
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.
oppliger trendfollow📈 Strategy Overview: SMA25 vs SMA200 – Gap Momentum Trend Strategy
This strategy is a trend-following system designed to capture strong, accelerating uptrends while exiting early when momentum begins to fade.
It uses the relationship between two moving averages — the 25-period SMA and the 200-period SMA — and monitors the gap (distance) between them as a measure of trend strength.
🟢 Entry Conditions (Go Long)
A long position is opened only when all of the following conditions are true:
Uptrend confirmation:
The 25-period SMA is above the 200-period SMA
→ confirms a clear upward trend.
Price momentum:
The closing price is above the SMA25 line,
→ showing that the market currently trades with bullish momentum.
Trend acceleration:
The gap between SMA25 and SMA200 has been increasing for the last 5 consecutive bars.
→ mathematically:
gap_t > gap_(t-1) > gap_(t-2) > gap_(t-3) > gap_(t-4)
→ indicates that the short-term trend is pulling away from the long-term trend and accelerating upward.
✅ When all three conditions are met, the strategy enters a long trade at the close of the current candle.
🔴 Exit Conditions (Close Long)
The position is closed when the uptrend starts to lose strength:
Trend deceleration:
The gap between SMA25 and SMA200 has been shrinking for 3 consecutive bars.
→ mathematically:
gap_t < gap_(t-1) < gap_(t-2)
→ signals that the short-term moving average is converging toward the long-term average, showing weakening momentum.
🚪 When this condition is met, the strategy closes the position at market price.
⚙️ Summary of Logic
Phase Condition Meaning
Entry SMA25 > SMA200 Long-term trend is up
Entry Close > SMA25 Short-term momentum is bullish
Entry Gap rising 5 bars Trend is accelerating
Exit Gap falling 3 bars Trend is weakening
💡 Interpretation
This strategy aims to:
Enter only when a strong, accelerating uptrend is confirmed.
Stay in the trade as long as momentum remains intact.
Exit early when the market starts losing strength, before the trend fully reverses.
It works best in trending markets and helps avoid false entries during sideways or weak phases.
RSI ExtremesRSI Extremes — Educational Indicator (Pine v5)
Per-Tick Dual-RSI Extremes · Real-Time Visualization · Cooldown Logic
Overview
RSI Extremes is a real-time educational indicator built to show where the Relative Strength Index (RSI) reaches its most extreme levels during every tick of live price action.
Instead of using only the candle close, it continuously tracks both RSI(low) and RSI(high) to reveal how deeply each bar stretches into demand or supply extremes.
This tool is meant solely for study and visualization, helping you understand how RSI behaves intrabar when price wicks expand. It produces no signals, no alerts, and no trade suggestions — it’s a microscope for momentum pressure.
Core Idea
Standard RSI hides a lot of the wick-based stress in price because it calculates from close values only.
RSI Extremes solves this by splitting the measurement into two perspectives:
RSI of LOW (green) → shows how far momentum falls into potential demand exhaustion.
RSI of HIGH (red) → shows how far momentum extends into potential supply exhaustion.
Seeing both together exposes the full oscillation envelope — what RSI looks like between candle opens and closes, not just after the fact.
What Gets Plotted
RSI (Low) — green line representing intrabar downside pressure.
RSI (High) — red line representing intrabar upside pressure.
RSI Ghost (Smoothed) — gray line for soft context only.
Bands: 30 / 50 / 70 visual guides with a shaded 30–70 region.
Markers:
Enter marker when RSI(low) ≤ levelEnter (default 15).
Exit marker when RSI(high) ≥ levelExit (default 85).
Markers appear in real time as soon as a touch occurs and are locked per bar to avoid duplicates.
Inputs & Educational Purpose
Input Description Learning Focus
Source (for ghost smoother) Data used for the ghost RSI. Observe RSI smoothing lag.
RSI Length Period for both RSI(high) and RSI(low). Shorter = faster reaction; longer = smoother.
RSI-based MA Length (ghost) Smoothing for the ghost line. Compare sharp vs smoothed RSI rhythm.
levelEnter (touch or below) Default 15. Study how deep RSI(low) falls during market stress.
levelExit (touch or above) Default 85. Study how high RSI(high) rises during momentum bursts.
Rest period (bars) Cooldown after any event. Encourages post-event observation and prevents overlap.
Real-Time Behavior
Evaluates conditions per tick, not only at bar close.
Uses both real-time detection and bar-close backup for reliability.
Employs per-bar locks to prevent duplicate markers.
Integrates a cooldown so new markers only appear after the rest period.
The result is a clean, stable display of RSI stress points in live price motion — no flicker, no repaint.
How to Study with RSI Extremes
Watch how Enter markers form during sharp sell wicks — these highlight where intrabar RSI(low) dives into extreme territory.
Watch how Exit markers appear during aggressive tops — these show when RSI(high) surges beyond its upper boundary.
Compare both lines to the gray ghost: if the ghost is rising while Enter markers print, you’re seeing a temporary overshoot within strengthening momentum; if it’s falling while Exit markers print, you’re seeing supply exhaustion in weakening momentum.
Use cooldown spacing to examine how long markets take to recover or consolidate after an extreme tick.
Educational Value
Learn how RSI behaves inside a candle rather than only at its close.
Visualize how volatility affects the amplitude of RSI swings.
Understand that extremes don’t mean reversal — they measure intensity, not direction.
Build intuition for momentum saturation and liquidity hunts.
This indicator turns RSI into a real-time stress monitor rather than a delayed oscillator.
Category & Tags
Category: Indicator → Momentum (or Indicator → Educational / Research)
Tags: indicator, rsi, momentum, extremes, enter-exit, levelenter, levelexit, realtime, educational, research, visualization, pine-v5
Disclaimer
This indicator is intended exclusively for educational and research purposes.
It does not issue trade signals or financial advice.
All market activity carries risk; use this tool to learn, not to predict or execute trades.
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
Crypto Correlation Oscillator# Crypto Correlation Oscillator
**Companion indicator for Tri-Align Crypto Trend**
## Overview
The Crypto Correlation Oscillator helps you identify **alpha opportunities** and **market regime changes** by showing how closely your coin follows Bitcoin and other assets over time. It displays rolling correlations as an oscillator in a separate pane below your price chart.
## What It Does
This indicator calculates **Pearson correlations** between different trading pairs on a rolling window (default: 100 bars). Correlations range from **-1.0** (perfect inverse relationship) to **+1.0** (perfect positive relationship), with **0** meaning no correlation.
### The 5 Correlation Lines
1. **Blue (thick line) - Coin vs BTC**: The most important metric
- **High correlation (>0.7)**: Your coin is just following BTC - no independent movement
- **Low correlation (<0.3)**: Your coin has **alpha** - it's moving independently from BTC
- **Negative correlation**: Your coin moves opposite to BTC (rare but powerful)
2. **Purple - Coin/BTC vs BTC**: Inverse relationship check
- **Negative values**: When BTC rises, your coin weakens relative to BTC
- **Positive values**: When BTC rises, your coin strengthens against BTC
3. **Orange - Coin vs Coin/BTC**: Structural consistency check
- Shows how well the Coin/USDT and Coin/BTC pairs maintain their mathematical relationship
- Unusual values can indicate liquidity issues or market inefficiencies
4. **Light Red - Coin vs USDT.D** (optional): Stablecoin dominance correlation
- Shows how your coin correlates with USDT dominance
- Useful for understanding flight-to-safety dynamics
5. **Light Green - Coin vs BTC.D** (optional): Bitcoin dominance correlation
- Shows how your coin correlates with BTC dominance
- Helps identify altcoin season vs BTC dominance cycles
## How to Read It
### Finding Alpha Opportunities
- **Low blue line (<0.3)**: Your coin is decoupled from BTC → potential alpha
- **Blue line dropping**: Coin is gaining independence from BTC
- **Blue line spiking to >0.9**: Coin is a "BTC clone" with no independent movement
### Regime Change Detection
- **Blue line crossing 0.5**: Major shift in correlation behavior
- **Purple line turning negative**: Coin starting to weaken when BTC rises (warning sign)
- **Sharp correlation changes**: Market structure is shifting - adjust strategy
### Visual Zones
- **Blue background**: High correlation zone (>0.7) - coin just following BTC
- **Red background**: Inverse correlation zone (<-0.5) - coin moving opposite to BTC
### Reference Lines
- **+1.0 / -1.0**: Perfect correlation boundaries (dotted gray)
- **+0.5 / -0.5**: Moderate correlation thresholds (dotted gray)
- **0.0**: Zero correlation line (solid gray)
## Dynamic Legend
The legend table (top-right) automatically shows the actual symbol names based on your chart:
- **Example on SOLUSDT**: Shows "SOL vs BTC", "SOL/BTC vs BTC", "SOL vs SOL/BTC", etc.
- **Color boxes**: Match the plot colors for easy identification
- **Live values**: Current correlation numbers update in real-time
- **Tooltips**: Hover over labels for interpretation guidance
## Configuration
### Key Inputs
- **Correlation Lookback** (default: 100): Number of bars for rolling correlation window
- Shorter = more reactive, noisier
- Longer = smoother, slower to detect changes
- **Correlation Smoothing** (default: 5): EMA smoothing period for raw correlations
- Reduces noise while preserving trends
- **Symbol Detection**: Auto-detects symbols from your chart, or use manual overrides
- **Dominance Pairs**: Toggle USDT.D and BTC.D correlations on/off
## Usage Tips
1. **Combine with main Tri-Align indicator**: Use correlation for context, Tri-Align for entry/exit signals
2. **Watch for divergences**: Correlation changing while price moves in sync can signal upcoming shift
3. **Adjust lookback period**: Use shorter (50-70) for day trading, longer (150-200) for position trading
4. **Focus on the blue line**: It's your primary alpha indicator
## Technical Details
- **Calculation**: Pearson correlation coefficient with EMA smoothing
- **Data source**: Close prices from `request.security()` (multi-timeframe capable)
- **Update frequency**: Every bar on your selected timeframe
- **Overlay**: False (displays in separate pane)
## Quick Interpretation Guide
| Blue Line Value | Interpretation | Action |
|----------------|----------------|--------|
| > 0.9 | Coin is a BTC clone | Avoid - no alpha opportunity |
| 0.7 - 0.9 | High correlation | Standard altcoin behavior |
| 0.3 - 0.7 | Moderate correlation | Some independence emerging |
| < 0.3 | Low correlation | **Strong alpha opportunity** |
| < 0 | Inverse correlation | Rare - potential hedge asset |
| Purple Line | Interpretation |
|-------------|----------------|
| Strongly negative | Coin weakens when BTC rises - risky |
| Near zero | Coin/BTC pair moves independently of BTC |
| Positive | Coin strengthens with BTC - ideal |
## Version History
### v1.0 (Initial Release)
- Pearson correlation calculation with configurable lookback
- 5 correlation pairs: Coin vs BTC, Coin/BTC vs BTC, Coin vs Coin/BTC, USDT.D, BTC.D
- EMA smoothing to reduce noise
- Visual zones for high/inverse correlation
- Dynamic legend with symbol name extraction
- Auto-symbol detection matching main Tri-Align indicator
Super EMA PrismThis script implements the Binary Trade Logic (BTL) algorithm to calculate two distinct scores that range from 0 to 7. One score is calculated assigning a power of 2 weight to the positive sign of 3 Phi^3 distant Moving Average (MA) slopes. The other score is calculated assigning a power of 2 weight to the sign of the difference between the price and the value of 3 Phi^3 distant Moving Average (MA).
For the first score, hereafter called as the angle score (AS), the largest MA slope positive sign receives weight 4, the middle length MA slope positive sign receives weight 2 and the shortest MA slope positive sign receives weight 1. The positive sign of an MA is defined as 1 if the slope of the MA is positive and 0, otherwise. Therefore, for MAs 305, 72 and 17, if slope(MA305) > 0, slope(MA72) < 0 and slope(MA17) > 0, then score will be 4*1 + 2*0 + 1*1 = 5. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
For the second score, hereafter called as the value score (VS), if the price > largest MA, it receives weight 4. If the price > the middle length MA, it receives weight 2 and if the price > the the shortest MA, it receives weight 1. Therefore, for MAs 305, 72 and 17, if price < MA305, price > MA72 and price > MA17, then score will be 4*0 + 2*1 + 1*1 = 3. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
Both AS and VS are calculated for Phi^3 lengths (610, 144, 34) and for Phi^3/2 lengths (305, 72, 17). The scores of the same kind calculated for each set of length are combined multiplying the Phi^3 length score by 10 and adding with with the Phi^3/2 score, therefore providing a 2 digit score ranging from 0 to 77. For instance, if we have AS(610, 144, 34) = 7 and AS(305, 72, 17) = 5, we have AS=75. At the same time, if we have VS(610, 144, 34) = 6 and VS(305, 72, 17) = 4, we have VS=64.
VS score is plotted by default in black, but it can be on white for dark themes. AS is plotted with the color of the longest MA used.
Chart background is colored according to the range of values for AS and VS, checked in the following order:
if AS >= 13 and VS <= 13 then back color = red
if AS >= 13 or VS <= 13 then back color = orange
if AS >= 64 and VS >= 64 then back color = green
if AS >= 64 or VS >= 64 then back color = blue
otherwise back color = none (white o black)






















