Futures Correlation Dashboard# 📊 Futures Correlation Dashboard
## Track Multiple Market Indicators in One View
Monitor ES, NQ, YM, VIX, USI:ADD , and USI:TICK simultaneously to see how the futures markets are moving together in real-time.
---
## 🎯 What's Included
**6 Market Instruments:**
- **ES** - S&P 500 Futures
- **NQ** - Nasdaq 100 Futures
- **YM** - Dow Jones Futures
- **VIX** - Volatility Index
- ** USI:ADD ** - NYSE Advance-Decline Line
- ** USI:TICK ** - NYSE Tick Index
**Live Data Table:**
- Current prices and percentage changes
- Real-time status indicators
- Market sentiment overview
---
## 📈 Features
✅ Multi-panel layout showing all 6 instruments simultaneously
✅ Customizable alert thresholds for USI:ADD and USI:TICK
✅ Color-coded visual indicators
✅ Works on any timeframe
✅ Live updates with market data
---
## 🔔 Alert Conditions
Set alerts for:
- USI:ADD crossing your custom thresholds
- USI:TICK extreme readings
- VIX movement patterns
- Confluence between multiple indicators
*Configure alert levels in the indicator settings.*
---
## ⚙️ Customizable Settings
Adjust thresholds for:
- USI:ADD bullish/bearish levels
- USI:TICK bullish/bearish levels
- USI:TICK extreme readings
- Display options for each instrument
---
## 💡 Use Cases
**Monitoring Market Activity:**
See multiple futures contracts and market internals without switching between charts.
**Correlation Analysis:**
Watch how different instruments move relative to each other throughout the trading session.
**Data Aggregation:**
Consolidate key market data into a single, organized view for faster decision-making.
---
## ⚠️ Requirements
- TradingView Premium or higher (for real-time multi-symbol data)
- Data subscriptions for: CME futures, CBOE VIX, and NYSE internals ( USI:ADD , USI:TICK )
- Compatible with all timeframes
---
## 📊 Who Is This For?
- Futures traders wanting consolidated market data
- Day traders monitoring multiple instruments
- Anyone interested in tracking market breadth alongside price action
- Traders who want to see correlations between ES, NQ, YM and market internals
---
## Technical Specifications
- Built with Pine Script v5
- Uses `request.security()` for multi-symbol data
- Real-time calculations and updates
- Minimal chart space usage with organized panel layout
---
*This indicator displays market data and calculated values. It does not provide trading signals or recommendations. Use at your own risk and always practice proper risk management.*
廣量指標
Quanloki v6OANDA:XAUUSD based on qqe trading on m15 or m10 is fine. Quick and concise trading with 6-10 prices with xauusd is too simple. Korean guys who need any code, just message me Quanloki xomgakorea
King Amun KING XAUUSD Pro Key Features of the Integrated Indicator:
1. Enhanced Moving Average System
EMA and SMA with Dynamic Colors
Buy/Sell Signals Based on Crossovers
Clear Visual Indicators
2. Advanced Kalman Filter
Advanced Noise Reduction
Multiple Models (Standard, Volume-Adjusted, Parkinson's Average)
Trend Strength with Color Gradient
3. Global Trading Sessions
Tokyo, London, New York Sessions
Open, Close, and Average Lines
Moving Range for Each Session
4. Smart Integration
All Signals Work in Harmony
Consistent Colors Across All Components
Unified Alerts
5. Ease of Use
Settings Organized into Groups
Helpful Hints
Flexible Customization
This integrated indicator provides a comprehensive trading system that can help you make more accurate decisions based on a multidimensional market analysis.
Daily High/Low/Mid (Prev Day Mid-vs-Next-Mid BG)it gives background depending upon previous day and next day midline.
Daily High/Low/Mid (Prev Day Extended Split + VWAP BG) it will tell you market bias with the help of vwap and previous day middle line
10/21 EMA + 50/200 Daily SMAAll four relevant moving averages in one script to allow you to add move indicators.
SHALOM TRADING HUB – CPR Camarilla & MASHALOM TRADING HUB – CPR Camarilla & MA (v4)
All-in-One Intraday & Swing Toolkit
Daily CPR (Prev Day), Weekly/Monthly Pivots, Prev Day/Week/Month High–Low, EMA/SMA pack, and Camarilla (H1–H4 & L1–L4). Plus Tomorrow CPR preview for next-session planning. 🔥
Features
Daily CPR: TC / PP / BC from previous day (value area & bias).
Floor Pivots: Daily/Weekly/Monthly R1–R4, S1–S4.
Previous High/Low: PDH/PDL, PWH/PWL, PMH/PML lines for breakout/mean-revert reads.
Camarilla Levels: H1–H4 & L1–L4 (popular 1.1 factor variant).
Moving Averages: EMA(9/20/50/100/200) & SMA(9/20/50/100/200) toggles.
Tomorrow CPR (Preview): Next session Pivot / BC / TC / R1 / S1 (D/W/M selectable).
Inputs (Settings)
Number of Daily/Weekly/Monthly pivots – show last N periods.
Show toggles – Daily CPR, Weekly/Monthly pivots, Prev H/L, Camarilla, Inner Camarilla, EMA/SMA.
Tomorrow CPR Type – D / W / M.
MA Lengths – fully customizable.
How to Use (Quick)
Trend bias: Price vs. CPR band & 20/50/200 MA stack.
Value zone: Inside TC–BC → balance; clean break & hold outside → trend continuation.
Reaction zones: Camarilla H3/L3 = bounce areas; H4/L4 = breakout/ breakdown lines.
Higher timeframe confluence: Add Weekly/Monthly pivots for swing levels.
Best Practices
Works on any timeframe; intraday (3–15m) recommended for CPR action.
Lines are derived using security(..., lookahead_on) on previous completed period → no forward repainting of those levels.
If too many lines: reduce “Number of … pivots” or turn off inner Camarilla/extra S/R.
Aidous IndicatorAidous Indicator – Multi-Framework Trend & Liquidity Suite
The Aidous Indicator is a comprehensive, multi-layered technical analysis tool built for traders seeking precision, adaptability, and clarity across all timeframes. It combines several advanced methodologies into a single, cohesive framework that dynamically adjusts to market conditions.
🔧 Key Features
Adaptive Trend Detection
Utilizes a custom momentum-weighted smoothing algorithm enhanced by volatility and strength filters (ATR, ADX) to identify reliable trend shifts.
Trade Management System
Automatically plots entry, stop-loss, and five take-profit levels based on dynamic volatility metrics, with real-time updates and visual cues.
Liquidity Line Extension
Tracks volume at key price levels and extends lines when price interacts with previously identified zones, helping visualize market interest.
Support & Resistance Zones
Detects swing highs/lows and plots non-overlapping zones with optional bilingual labeling for broader accessibility.
Fibonacci Projection Tool
Integrates ZigZag pivots to project Fibonacci levels with customizable display options, including value and percentage formats.
Linear Regression Channel
Automatically adjusts lookback periods based on timeframe and plots trend channels with breakout detection and directional labeling.
Parabolic SAR Overlay
Optional PSAR component for additional trend confirmation, plotted with intuitive color coding.
Secondary Buy/Sell Signal Engine
A custom supertrend logic enhanced by EMA crossover validation to highlight high-probability trade entries.
🧠 How It Works
The indicator is built using modular logic and timeframe-aware parameters. It leverages:
Custom smoothing and momentum calculations
Volatility and volume filters
Dynamic plotting of trade zones and trend signals
Visual enhancements for clarity and usability
Real-time alerts for actionable signals
This tool is suitable for scalping, intraday, swing, and long-term strategies, offering traders a versatile and visually rich experience.
High volume bar by VibieHigh Volume Bar with Extended vPOC (Aggregation Enabled)
🧠 Concept
This indicator is designed to detect institutional activity and large traders by using statistical volume analysis and identifying key intrabar liquidity levels.
It applies Z-Score volume analysis to highlight unusually high volume candles and marks the Volume Point of Control (vPOC) inside each detected bar — the price level where the most volume was transacted.
⸻
⚙️ How It Works
1. Z-Score Volume Analysis
• The indicator calculates how far current volume deviates from its historical average using standard deviations (Z-Score).
• When the Z-Score exceeds the user-defined threshold, the candle is flagged as a High Volume Bar (HVB).
2. Multi-Exchange Aggregation
• Volumes from Binance, Bybit, and Coinbase can be aggregated into a composite volume metric.
• This provides a broader and more accurate market perspective, minimizing anomalies from individual exchanges.
3. Candle Coloring
• Bullish HVB → entire candle (body + wicks) is colored blue.
• Bearish HVB → entire candle is colored red.
• This makes large volume events immediately visible on the chart.
4. vPOC Detection
• The script examines a lower timeframe (e.g., 1 minute) within the HVB to find the price level with the highest traded volume.
• A horizontal line is drawn at that price and can be extended for multiple bars, marking a short-term liquidity zone that often acts as support or resistance.
⸻
🧭 How to Use
• vPOC levels frequently act as liquidity magnets and are often retested after the HVB appears.
• Bullish HVB + vPOC below current price = potential long entry zone.
• Bearish HVB + vPOC above price = potential short entry zone.
• Useful for identifying institutional absorption, stop runs, or hidden accumulation/distribution.
⸻
🌟 Why It’s Original and Useful
• Combines statistical volume analysis (Z-Score) with intrabar volume profiling.
• Aggregates multiple exchanges for broader accuracy.
• Offers precise liquidity levels that classic indicators don’t provide.
• Especially valuable for advanced traders looking for institutional footprints.
f.aYou can use it for Dow Jones as well. For gold at the 4:30 timeframe, you can occasionally enter with confirmation from liquidity and numeric signals—just follow the bars until you reach the target.
Euro Area vs US10YThe Euro Area GDP-Weighted Yield vs US10Y Spread is a macroeconomic indicator designed for forex traders and institutional investors who want to monitor the fundamental interest rate differential between the Eurozone and the United States. This tool aggregates sovereign bond yields from the major Eurozone member states using a weighted methodology based on outstanding government debt, providing a comprehensive view of the Euro Area’s fixed income market dynamics.
This indicator calculates a composite 10-year government bond yield for the Eurozone by combining data from seven major member countries: Germany, France, Italy, Spain, Netherlands, Belgium, and Austria. The weights are based on the proportion of government debt outstanding in each country, reflecting the actual composition of the European sovereign bond market rather than just GDP size.
The indicator then compares this Euro Area weighted yield against the US 10-Year Treasury yield (US10Y), producing a yield spread that serves as a powerful leading indicator for EUR/USD price movements.
9:30 USA OPENEasy if it go up it will turn green and you can lng if it goes down it will turn red and you can short
MACD / AO Alineación (V21) PublicA long or short indicator for any timeframe. It's important to consider volatility and ADX to find the most appropriate momentum. There are also other details to consider.
Volume Aggregated Spot & Futures -- Crypto (by plyst & more)📊 Volume Aggregated Spot & Futures - Enhanced Edition
🎯 Overview
Advanced volume aggregation indicator that combines spot and perpetual futures volume across the top 10 cryptocurrency exchanges. This enhanced version builds upon the original work by @HALDRO Project with optimized calculations and expanded functionality.
✨ Key Features
- 📈 Real-time aggregated volume from 10 major exchanges (Binance, Bybit, OKX, Coinbase, Bitget, KuCoin, Kraken, MEXC, Gate.io, HTX)
- 🔄 Multiple visualization modes: Volume, Delta, Cumulative Delta, Spot vs Perp analysis, Liquidations, OBV, and MFI
- 💱 Multi-currency support: Display volume in COIN, USD, or EUR
- 🎨 Clean, single-color bar chart showing total cumulative volume
- 📊 Multiple calculation methods: SUM, AVG, MEDIAN, VARIANCE
- 🎯 Separate spot (USDT, USD, USDC, etc.) and perpetual futures (.P contracts) tracking
🔧 Technical Improvements
✓ Corrected MFI formula for accurate money flow calculations
✓ Optimized volume aggregation logic with proper NA handling
✓ Support for 10 exchanges (up from 9)
✓ Streamlined codebase for better performance
✓ Updated perpetual contract naming conventions (.P format)
📖 Usage
Perfect for analyzing total market volume, identifying liquidation events, tracking buyer/seller pressure through delta analysis, and understanding the spot vs futures market dynamics.
🙏 Credits
Original concept and framework by @HALDRO Project. This version includes mathematical corrections, code optimizations, and expanded exchange support.
⚠️ Note
Aggregated volume is calculated from external exchange data using request.security(). Ensure your plan supports the necessary security calls for optimal performance.
Secret strategy[Smartalgo]We are revealing our secret trading strategy through Tradingview indicator
FEATURES
Trend Detection: Automatically identifies trend direction using a smoothed Supertrend (WMA + EMA), with shape markers on trend shifts and color-coded bars for clarity.
snapshot
Rejection Signals: Detects price rejections at the trend line after a user-defined number of consolidation bars; plots ▲/▼ icons to highlight strong continuation setups.
snapshot
Target Projection: On trend confirmation, plots entry, stop-loss (ATR-based), and three dynamic take-profit levels based on customizable
snapshot
multiples.
Dynamic Updates: All levels (entry, SL, TP1–TP3) auto-adjust based on volatility and are labeled in real time on the chart.
Customization: Users can tweak trend parameters, rejection confirmation count, SL/TP ratios, smoothing lengths, and appearance settings.
Alerts: Built-in alerts for trend changes, rejection events, and when TP1, TP2, or TP3 are reached.
Chart Overlay: Plots directly on price chart with minimal clutter and clearly labeled levels for easy trading.
Candle Pattern Detector SMC with Alerts @AshokTrendJust Follow Hammer, Inverted Hammer, Hanging Man, Engulfing, volume adn smc consideration,
Trading the candlestick patterns (Hammer, Inverted Hammer, Hanging Man, Bullish/Bearish Engulfing) with volume confirmation adds an important layer of validation, helping to filter false signals and improve trade success. Here’s how to integrate volume into your strategy:
***
### How to Trade Candlestick Patterns with Volume Confirmation
#### 1. Understand Volume Role
- Volume shows the strength behind price moves:
- Higher volume on a pattern (compared to recent average) indicates strong participation, increasing the pattern’s reliability.
- Low volume may mean weak conviction and higher risk of failure.
#### 2. Volume Confirmation Rules
- Define a volume threshold, for example:
- Current candle’s volume > average volume of last 10 or 20 candles (or a fixed multiplier, e.g., 1.2× average).
- For bullish patterns (Hammer, Inverted Hammer, Bullish Engulfing): confirm with rising volume on pattern candle or next candle.
- For bearish patterns (Hanging Man, Bearish Engulfing): confirm with higher volume on pattern candle indicating strong selling.
#### 3. Entry Signals with Volume
- **Bullish Entry:**
- Signal candle (Hammer, Bullish Engulfing, etc.) appears near support or order block.
- Volume on the signal candle or immediate next candle is higher than average.
- Enter long on confirmation candle or close of signal candle.
- **Bearish Entry:**
- Signal candle (Hanging Man, Bearish Engulfing, etc.) appears near resistance or supply zone.
- Volume on the signal candle or immediate next candle exceeds average.
- Enter short on confirmation candle or close of signal candle.
#### 4. Stop Loss & Targets
- Place stop loss just below (for longs) or above (for shorts) the low/high wick of the signal candle or the order block zone.
- Set take profit based on nearby support/resistance, risk-reward ratio, or a fixed number of candle closes.
#### 5. Avoid Trading Without Volume Confirmation
- Reject candles if volume is below threshold to reduce false signals.
### Summary
Trading candlestick patterns combined with volume confirmation ensures only well-supported setups are taken, improving win rates and reducing noisy or fake signals. Volume adds a critical dimension to the SMC candle patterns for binary or any form of trading.
Would you like me to generate a full Pine Script that integrates volume confirmation with the patterns you requested?
my_strategy_2.0Overview:
This is a high-speed scalping strategy optimized for volatile crypto assets (BTC, ETH, etc.) on timeframes 1m–5m. It combines trend-following SuperTrend with confirmations from MACD, RSI, Bollinger Bands, and volume spikes for precise entries. Focus on quick profits (1–3 ATR) with strict risk control: partial take-profits, stop-loss, and trailing breakeven after the first TP.
Key Signals:
Long: SuperTrend flip up + MACD crossover up + RSI >50 + BB Upper breakout + volume spike + volatility filter (ATR >0.5%).
Short: Similar but downward.
Exits and Risks:
TP: 33% at +1 ATR, 33% at +2 ATR, 34% at +3 ATR (customizable).
SL: Initial at -1 ATR, after TP1 — to breakeven with trailing on BB midline (optional).
Filters: Minimum ATR to avoid flat markets; realistic commissions in backtests.
Recommendations:
Test on 2020–2025 data (out-of-sample 2024+). Expected Win Rate ~55%, Profit Factor >1.8, Drawdown <10%. Ideal for 1–2% risk per trade. Not for beginners — use paper trading.
Disclaimer: Past results do not guarantee future performance. Trade at your own risk.
(Pine v6 code, ready for publication. Author: gopog777 with expert fixes.)
Nemesis Strategy MLWinning That's all I know
Years of research been done to this strategy It's based on algorithm that detects where the markets are going Works on crypto this strategy his excellent indicators and it can generate a lot of money if you know what you are doing and depending on the fees of the exchanges as well So be smart and be kind God bless you all
BIF ASK WITH TREND Price Trend with PercentageBID ASK WITH TREND Price Trend with Percentage SHOW MARKET TREND AND MARKET VOLLUME
king amun king gold**Features:**
- ✓ Ability to enable/disable each indicator individually
- ✓ Colors that change depending on the indicator's direction
- ✓ Different line thicknesses (EMA: thick, SMA: thin)
- ✓ Fully customizable settings
SM OTC style Supply/Demand Zones Lite+//@version=6
indicator("OTC SD MTF Lite+", "OTCSDmtf+", overlay=true, max_boxes_count=200, max_labels_count=200)
// ================= Inputs =================
useH4 = input.bool(true, "Show 4H zones")
useD1 = input.bool(true, "Show 1D zones")
useW1 = input.bool(true, "Show 1W zones")
useM1 = input.bool(false, "Show 1M zones")
baseLen = input.int(2, "Base length (HTF bars)", 1, 5)
wickPctMax = input.float(35.0, "Max wick % in base", 0, 100)
impulseX = input.float(1.5, "Departure body vs ATR (x)", 0.5, 5.0)
atrLen = input.int(14, "ATR length (HTF)")
extendBars = input.int(2000, "Extend bars on chart", 200, 10000)
maxPerTF = input.int(12, "Max zones per TF", 3, 30)
showLegend = input.bool(true, "Show tiny legend (4H/1D/1W/1M)")
onlyNearest = input.bool(false, "Show ONLY nearest zone above/below")
hideOverlapTF = input.bool(true, "Hide overlapping zones within each TF (keep newest)")
showNearestLabels = input.bool(false, "Show distance labels to nearest above/below")
// --- Hard cap for future drawing with xloc.bar_index ---
FUTURE_CAP = 500
// Colors (Demand hues per TF). Supply uses red for contrast.
colH4 = color.new(color.teal, 78)
colD1 = color.new(color.blue, 78)
colW1 = color.new(color.orange, 78)
colM1 = color.new(color.purple, 78)
colSup= color.new(color.red, 78)
// ================= Helpers =================
wickiness(h, l, o, c) =>
rng = math.max(h - l, syminfo.mintick)
topW = h - math.max(o, c)
botW = math.min(o, c) - l
100.0 * (topW + botW) / rng
// Returns: (dTrig, dProx, dDist, sTrig, sProx, sDist)
f_htfSignals(baseBars, wickMax, xImpulse, aLen) =>
float _o = open
float _h = high
float _l = low
float _c = close
float _atr = ta.atr(aLen)
bool ok = true
for i = 1 to baseBars
ok := ok and (wickiness(_h , _l , _o , _c ) <= wickMax)
bool bullDepart = _c > _o and (_c - _o) > xImpulse * _atr
bool bearDepart = _c < _o and (_o - _c) > xImpulse * _atr
float dTrig = 0.0
float dProx = na
float dDist = na
float sTrig = 0.0
float sProx = na
float sDist = na
if ok and bullDepart
float hi = ta.highest(_h, baseBars)
float lo = ta.lowest(_l, baseBars)
dTrig := 1.0
dProx := lo
dDist := hi
if ok and bearDepart
float hi2 = ta.highest(_h, baseBars)
float lo2 = ta.lowest(_l, baseBars)
sTrig := 1.0
sProx := hi2
sDist := lo2
// ================= Pull HTF signals =================
= request.security(syminfo.tickerid, "240", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
= request.security(syminfo.tickerid, "D", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
= request.security(syminfo.tickerid, "W", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
= request.security(syminfo.tickerid, "M", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
// ================= Storage per TF =================
var zH4 = array.new_box()
var aH4 = array.new_bool()
var lH4 = array.new_label()
var sH4 = array.new_int() // 1 = Demand, -1 = Supply
var zD1 = array.new_box()
var aD1 = array.new_bool()
var lD1 = array.new_label()
var sD1 = array.new_int()
var zW1 = array.new_box()
var aW1 = array.new_bool()
var lW1 = array.new_label()
var sW1 = array.new_int()
var zM1 = array.new_box()
var aM1 = array.new_bool()
var lM1 = array.new_label()
var sM1 = array.new_int()
// ================= Overlap utils =================
overlap(topA, botA, topB, botB) =>
not (topA < botB or botA > topB)
purgeOverlaps(arrB, arrA, arrL, newTop, newBot) =>
if hideOverlapTF and array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box bOld = array.get(arrB, i)
float t = box.get_top(bOld)
float btm = box.get_bottom(bOld)
if overlap(newTop, newBot, t, btm)
box.delete(bOld)
label.delete(array.get(arrL, i))
array.set(arrA, i, false)
// ================= Add zone =================
addZone(arrB, arrA, arrL, arrS, topV, botV, baseColor, isDemand) =>
purgeOverlaps(arrB, arrA, arrL, topV, botV)
int leftX = bar_index - 1
int rightX = bar_index + math.min(extendBars, FUTURE_CAP) // respect +500 cap
box b = box.new(leftX, topV, rightX, botV, xloc=xloc.bar_index, bgcolor=baseColor, border_color=color.new(color.black, 0))
float ly = isDemand == 1 ? topV : botV
st = isDemand == 1 ? label.style_label_down : label.style_label_up
string tagTxt = isDemand == 1 ? "Demand" : "Supply"
label l = label.new(leftX, ly, tagTxt, xloc=xloc.bar_index, style=st, textcolor=color.white, color=color.new(color.black, 0), size=size.tiny)
array.push(arrB, b)
array.push(arrA, true)
array.push(arrL, l)
array.push(arrS, isDemand)
if array.size(arrB) > maxPerTF
box.delete(array.shift(arrB))
array.shift(arrA)
label.delete(array.shift(arrL))
array.shift(arrS)
// ================= Maintain / Invalidate =================
extendAll(arrB, arrA) =>
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box.set_right(array.get(arrB, i), bar_index + math.min(extendBars, FUTURE_CAP)) // respect +500 cap
invalidate(arrB, arrA, arrL) =>
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box b = array.get(arrB, i)
float t = box.get_top(b)
float btm = box.get_bottom(b)
// Close outside band → remove
if close > t or close < btm
box.delete(b)
label.delete(array.get(arrL, i))
array.set(arrA, i, false)
// ================= New HTF bar flags (strict booleans) =================
int chH4 = ta.change(time("240"))
int chD1 = ta.change(time("D"))
int chW1 = ta.change(time("W"))
int chM1 = ta.change(time("M"))
bool newBarH4 = useH4 and (not na(chH4)) and (chH4 != 0)
bool newBarD1 = useD1 and (not na(chD1)) and (chD1 != 0)
bool newBarW1 = useW1 and (not na(chW1)) and (chW1 != 0)
bool newBarM1 = useM1 and (not na(chM1)) and (chM1 != 0)
// ================= Create zones on new HTF bar =================
if newBarH4
if d4t > 0 and not na(d4p) and not na(d4d)
addZone(zH4, aH4, lH4, sH4, d4d, d4p, colH4, 1)
if s4t > 0 and not na(s4p) and not na(s4d)
addZone(zH4, aH4, lH4, sH4, s4p, s4d, colSup, -1)
if newBarD1
if d1t > 0 and not na(d1p) and not na(d1d)
addZone(zD1, aD1, lD1, sD1, d1d, d1p, colD1, 1)
if s1t > 0 and not na(s1p) and not na(s1d)
addZone(zD1, aD1, lD1, sD1, s1p, s1d, colSup, -1)
if newBarW1
if w1t > 0 and not na(w1p) and not na(w1d)
addZone(zW1, aW1, lW1, sW1, w1d, w1p, colW1, 1)
if swt > 0 and not na(swp) and not na(swd)
addZone(zW1, aW1, lW1, sW1, swp, swd, colSup, -1)
if newBarM1
if m1t > 0 and not na(m1p) and not na(m1d)
addZone(zM1, aM1, lM1, sM1, m1d, m1p, colM1, 1)
if smt > 0 and not na(smp) and not na(smd)
addZone(zM1, aM1, lM1, sM1, smp, smd, colSup, -1)
// ================= Maintain & Invalidate (every bar) =================
extendAll(zH4, aH4)
extendAll(zD1, aD1)
extendAll(zW1, aW1)
extendAll(zM1, aM1)
invalidate(zH4, aH4, lH4)
invalidate(zD1, aD1, lD1)
invalidate(zW1, aW1, lW1)
invalidate(zM1, aM1, lM1)
// ================= Nearest across all TFs =================
tfNearest(arrB, arrA) =>
int upIdx = -1
int dnIdx = -1
float upDist = 1e10
float dnDist = 1e10
float upBtm = na
float dnTop = na
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box b = array.get(arrB, i)
float t = box.get_top(b)
float btm = box.get_bottom(b)
if btm >= close
float d = btm - close
if d < upDist
upDist := d
upIdx := i
upBtm := btm
if t <= close
float d2 = close - t
if d2 < dnDist
dnDist := d2
dnIdx := i
dnTop := t
= tfNearest(zH4, aH4)
= tfNearest(zD1, aD1)
= tfNearest(zW1, aW1)
= tfNearest(zM1, aM1)
float upBest = 1e10, dnBest = 1e10
int upArr = -1, upIdxSel = -1, dnArr = -1, dnIdxSel = -1
color upColor = color.new(color.white, 100), dnColor = color.new(color.white, 100)
if (not na(uh4y)) and uh4d < upBest
upBest := uh4d, upArr := 0, upIdxSel := uh4i, upColor := colH4
if (not na(ud1y)) and ud1d < upBest
upBest := ud1d, upArr := 1, upIdxSel := ud1i, upColor := colD1
if (not na(uw1y)) and uw1d < upBest
upBest := uw1d, upArr := 2, upIdxSel := uw1i, upColor := colW1
if (not na(um1y)) and um1d < upBest
upBest := um1d, upArr := 3, upIdxSel := um1i, upColor := colM1
if (not na(dh4y)) and dh4d < dnBest
dnBest := dh4d, dnArr := 0, dnIdxSel := dh4i, dnColor := colH4
if (not na(dd1y)) and dd1d < dnBest
dnBest := dd1d, dnArr := 1, dnIdxSel := dd1i, dnColor := colD1
if (not na(dw1y)) and dw1d < dnBest
dnBest := dw1d, dnArr := 2, dnIdxSel := dw1i, dnColor := colW1
if (not na(dm1y)) and dm1d < dnBest
dnBest := dm1d, dnArr := 3, dnIdxSel := dm1i, dnColor := colM1
// ================= Nearest-only visibility (optional) =================
hideAll(arrB, arrA) =>
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box.set_bgcolor(array.get(arrB, i), color.new(color.white, 100))
box.set_border_color(array.get(arrB, i), color.new(color.white, 100))
showOne(arrB, arrA, arrS, idx, demColor) =>
if idx >= 0 and idx < array.size(arrB)
if array.get(arrA, idx)
bool isDemand = array.get(arrS, idx) == 1
color c = isDemand ? demColor : colSup
box.set_bgcolor(array.get(arrB, idx), c)
box.set_border_color(array.get(arrB, idx), color.new(color.black, 0))
if onlyNearest
hideAll(zH4, aH4), hideAll(zD1, aD1), hideAll(zW1, aW1), hideAll(zM1, aM1)
if upArr == 0
showOne(zH4, aH4, sH4, upIdxSel, upColor)
if upArr == 1
showOne(zD1, aD1, sD1, upIdxSel, upColor)
if upArr == 2
showOne(zW1, aW1, sW1, upIdxSel, upColor)
if upArr == 3
showOne(zM1, aM1, sM1, upIdxSel, upColor)
if dnArr == 0
showOne(zH4, aH4, sH4, dnIdxSel, dnColor)
if dnArr == 1
showOne(zD1, aD1, sD1, dnIdxSel, dnColor)
if dnArr == 2
showOne(zW1, aW1, sW1, dnIdxSel, dnColor)
if dnArr == 3
showOne(zM1, aM1, sM1, dnIdxSel, dnColor)
// ================= Nearest distance labels (optional) =================
var label nearUp = na
var label nearDn = na
makeNearLabel(y, txt) =>
label.new(bar_index, y, txt, xloc=xloc.bar_index, style=label.style_label_left, color=color.new(color.black, 0), textcolor=color.white, size=size.tiny)
if showNearestLabels
if not na(nearUp)
label.delete(nearUp)
if not na(nearDn)
label.delete(nearDn)
if upArr != -1
box bUp = upArr == 0 ? array.get(zH4, upIdxSel) : upArr == 1 ? array.get(zD1, upIdxSel) : upArr == 2 ? array.get(zW1, upIdxSel) : array.get(zM1, upIdxSel)
float upBtm = box.get_bottom(bUp)
float pctUp = math.round(10000.0 * (upBtm - close) / close) / 100.0
nearUp := makeNearLabel(upBtm, "Nearest Above ~ " + str.tostring(pctUp) + "%")
if dnArr != -1
box bDn = dnArr == 0 ? array.get(zH4, dnIdxSel) : dnArr == 1 ? array.get(zD1, dnIdxSel) : dnArr == 2 ? array.get(zW1, dnIdxSel) : array.get(zM1, dnIdxSel)
float dnTop = box.get_top(bDn)
float pctDn = math.round(10000.0 * (close - dnTop) / close) / 100.0
nearDn := makeNearLabel(dnTop, "Nearest Below ~ " + str.tostring(pctDn) + "%")
// ================= Tiny legend (dots) =================
var table legend = na
if showLegend and na(legend)
legend := table.new(position.top_left, 4, 1)
if showLegend and not na(legend)
table.cell(legend, 0, 0, "● 4H", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(legend, 1, 0, "● 1D", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(legend, 2, 0, "● 1W", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(legend, 3, 0, "● 1M", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell_set_bgcolor(legend, 0, 0, color.new(color.teal, 70))
table.cell_set_bgcolor(legend, 1, 0, color.new(color.blue, 70))
table.cell_set_bgcolor(legend, 2, 0, color.new(color.orange, 70))
table.cell_set_bgcolor(legend, 3, 0, color.new(color.purple, 70))
Rudra ChakraA readymade template. Helps you to identify trend, momentum at a glance.
Blue dots for +momentum and red for -momentum.
Also the background Green, orange and red indicate the shift in trend. Buy signals indicate more than avg buying in some timeframe.
ATH Line with Date (Editable)Overview:
This indicator draws a continuous horizontal line at the instrument’s All-Time High (ATH) and annotates it with a label that shows the date the ATH was set in dd-mmm-yyyy format. The label is fully configurable (text prefix, side, position, colors, vertical offset), and you can optionally append the ATH price formatted as $ 1.234,56. Built for Pine Script™ v6 and works on any symbol or timeframe.
How it works
• Maintains a running maximum of high.
• Detects the bar where the current ATH occurred and extracts its date.
• Renders a horizontal line extended both sides at the ATH level.
• Places an optional label on the last bar or on the ATH bar.
• Triggers an optional alert when a new ATH is printed.
Inputs
• Line color / width / style – customize the ATH line appearance.
• Show label – toggle label on/off.
• Label text (prefix) – default ATH ►.
• Label text color / background – visual customization for the tag.
• Label side – left or right-anchored label.
• X location – Last bar or ATH bar.
• Label vertical offset (%) – moves the label above/below the line.
• Show price – appends the ATH price in the format $ 1.234,56
Notes & behavior:
• Repainting: The ATH level is stable until a higher high appears. When a new ATH is set, the line and date update accordingly—this is expected behavior.
• The ATH is computed from the chart’s current timeframe/history. If the symbol has limited history on your chart, the ATH reflects only the available data.
• No external libraries; no user data is collected.
Alerts:
• Includes New ATH alert condition. Fire it to be notified when price sets a new all-time high.
Tips:
• Use Last bar placement to keep the label visible at the right edge while scrolling.
• If the label overlaps candles or drawings, add a small positive vertical offset.
Version:
• Pine Script™ v6. Indicator only; no trading signals or orders.
Disclaimer:
For educational purposes only. This script does not constitute financial advice or a recommendation to buy or sell any security. Always do your own research and manage risk appropriately.