Confluence Signal Intelligence (CSI)CSI - Confluence Signal Intelligence is a professional-grade analytical overlay that evaluates market conditions across multiple dimensions simultaneously. Rather than relying on a single indicator, CSI synthesizes multiple evidence factors and classification models into unified BUY/SELL signals with confidence classifications.
What It Does
CSI identifies potential reversal zones by detecting when multiple independent analytical components align in the same direction. Each signal displays a confidence classification:
HIGH - Strong multi-factor alignment (Gold labels)
MEDIUM - Moderate factor alignment
LOW - Limited factor alignment
Important : The confidence level measures analytical consensus—not a prediction of trade outcome. A HIGH reading means multiple components agree on directional bias at that moment, not that the trade will be profitable.
Multi-Factor Analysis
The classification system evaluates conditions across several categories:
Statistical Extremes - Normalized price transforms that identify stretched conditions
Momentum Indicators - Multiple oscillators confirming oversold/overbought states
Cycle Analysis - Gauges measuring exhaustion and potential turning points
Trend Alignment - Multi-timeframe directional agreement
Market Structure - Break of Structure events and swing point analysis
Pattern Classification - Models comparing current conditions to historical setups
Volume Analysis - Confirming directional moves with participation
Divergence Detection - Price/momentum disagreements across multiple oscillators
Classification Components
CSI incorporates multiple classification models (KNN, gradient boosting approximation, perceptron) that analyze current market conditions against historical patterns. These models contribute to the overall confidence assessment by identifying setups with characteristics similar to past formations.
Smart Money Concepts
The indicator includes institutional trading concepts:
Break of Structure (BOS) - Markers when price violates significant swing points
Order Blocks - Potential support/resistance zones based on price structure
Fair Value Gaps (FVG) - Price imbalances that may act as future reference points
Regime Detection - Background coloring distinguishing trending vs. ranging conditions
Key Features
Non-Repainting Mode - Optional bar-close confirmation prevents signal changes on the current bar
Adaptive Thresholds - Automatically adjusts sensitivity based on market volatility
Signal Filtering - Option to hide LOW confidence signals to reduce noise
Configurable Cooldown - Minimum bars between signals to prevent overtrading
Comprehensive Dashboard - Real-time display of key metrics and states
Trend EMAs - 20/50/200 period moving averages for context
Extensive Alerts - Conditions for signals, structure breaks, divergences, and more
Intended Use
CSI is designed as a decision-support tool for traders conducting their own analysis. It identifies moments of technical alignment that may warrant further investigation—it does not guarantee profitable outcomes. Market results depend on numerous variables beyond any single analytical tool.
The indicator works across all markets and timeframes.
Companion Indicator
CSI - Confluence Signal Intelligence is published separately and displays the underlying oscillators in their own pane:
CEI (Cycle Exhaustion Index) - Cycle position and momentum depletion measurement
PRG (PDF Reversal Gauge) - Statistical deviation scoring
When used together, the main CSI overlay provides signals on the chart while the oscillator pane offers visibility into the cycle and reversal dynamics contributing to those signals.
Risk Disclosure
This indicator is an analytical tool—not financial advice. Past performance does not guarantee future results. All trading involves substantial risk of loss. Confidence levels reflect internal model agreement only and should be considered alongside broader market context, your own analysis, and sound risk management practices. No indicator can predict future price movements with certainty.
---
## AUTHOR'S INSTRUCTIONS:
```
To request access to CSI - Confluence Signal Intelligence, please visit frontieralgo.com/tradingview or send a private message.
Chỉ báo và chiến lược
Warpath Structure + Liquidity Tool (Updated - V3)Warpath visually organizes the key elements required to trade Gold professionally:
1. Market Structure Clarity
Automatically labels HH / HL / LH / LL on major pivot points (current chart timeframe). Makes directional bias immediately obvious. Helps prevent counter-trend trading in strong expansions.
2. Liquidity Sweep Detection (Wick-Only)
Highlights true liquidity sweeps using wick behavior (no breakout guessing). Marks the sweep wick with user-defined colors. Draws a swept-zone box that extends forward to show where liquidity was taken. Designed to identify fuel vs reversal behavior in trends.
3. Key Session Levels
Automatically plots:
Asian High / Low
Previous Day High / Low
Equal Highs / Equal Lows from current timeframe and higher timeframes (1H / 4H / Daily)
These levels represent where price is likely to react, not where trades should be forced.
4. Multi-Confluence HTF Bias Dashboard
Small dashboard showing bias for 15M, 1H, 4H, and Daily timeframes. Each timeframe bias is calculated using four confluence factors:
EMA Stack: 8/21/50 alignment and price position relative to EMAs
Structure: Recent HH/HL vs LH/LL pivot behavior
Price Patterns: Engulfing candles, hammers, double bottoms/tops, break of structure
Momentum: Recent candle direction and close trend
Displays a confluence score (e.g., "BULLS (4)") so you can see signal strength, not just direction. Overall bias weights higher timeframes more heavily for smarter alignment.
5. Trade Positioning Dashboard
Replaces basic overbought/oversold readings with actionable positioning context:
Range Position: Shows exactly where price sits within the selected range (Previous Session, Previous Day, or Weekly) as a percentage. Zones include Deep Discount (0-25%), Discount (25-40%), Equilibrium (40-60%), Premium (60-75%), and Deep Premium (75-100%).
VWAP Deviation: Displays distance from VWAP in standard deviations (σ). Readings beyond ±1.5σ indicate meaningful extension. Readings beyond ±2σ suggest caution on continuation and potential mean reversion.
Trade Favor: Combines HTF bias alignment, range position, and VWAP deviation into a single directional score. Displays as "LONGS ●●●○" or "SHORTS ●●○○" so you know at a glance whether conditions favor continuation or reversal.
6. Continuation Reload Awareness (Strong Trend Environments)
Built to handle markets that:
Remain overbought
Stay in premium
Sweep buy-side liquidity repeatedly
The multi-confluence scoring system catches trend continuation setups (like higher lows forming with bullish momentum) even before swing structure fully confirms. Supports compression → expansion continuation behavior. Prevents missed participation during multi-day trends without abandoning discipline.
Multi-Confirmation Fib Zones This indicator combines **dynamic Fibonacci-style price zones** with a **multi-signal confirmation layer** to highlight areas where reactions are more likely to matter.
Core purpose
* Map out **contextual price areas** derived from recent market ranges.
* Provide a structured way to read potential **reaction / continuation zones** without relying on a single input.
Zone framework
* The tool continuously tracks the market’s recent extremes and builds **adaptive reference zones** around them.
* It can display both **bullish-context** and **bearish-context** zones, depending on the current market behavior.
Confirmation layer (confluence concept)
Instead of treating any zone touch as a signal, it evaluates **multiple market perspectives**, such as:
* momentum pressure,
* momentum shifts,
* short-term oscillation balance,
* participation / activity confirmation.
Signals are intended to be interpreted only when **several views align**, helping reduce false positives.
Practical use
* Useful for traders who want **structured levels + confirmation** in one visual workflow.
* Can support both **trend continuation** and **reaction-based setups**, depending on broader context.
* Best treated as a **decision support system** (a “dashboard”), not a standalone trade trigger.
Best conditions
* Works best when markets are **respecting ranges and reacting at obvious areas**.
* In extremely noisy, thin, or news-driven spikes, confirmations may desync and require more discretion.
*For educational and analytical purposes only. Always validate across different instruments and timeframes.*
Dual Momentum Confluence Oscillator MACD + RSIThis indicator is built around the **simultaneous use of two complementary momentum perspectives**, designed to be read **together**, not in isolation.
### Core purpose
* Highlight moments where **momentum agreement** or **momentum imbalance** becomes visually evident.
* Help distinguish between **healthy movement**, **loss of strength**, and **potential transition phases**.
### Combined reading approach
* One component focuses on **momentum flow and acceleration**, showing how force develops or fades.
* The other evaluates **relative pressure within recent price action**, adding context to whether momentum is stretched or still balanced.
* Signals are meant to be interpreted when **both perspectives are considered at the same time**, reinforcing or filtering each other.
### Practical use
* Particularly useful as a **confirmation layer** for directional strategies.
* Helps avoid decisions based on a single momentum measure by requiring **contextual alignment**.
* Can also support timing refinement in both continuation and pullback scenarios.
### Visual structure
* Everything is displayed in **one compact pane**, allowing quick cross-market scanning without overloading the chart.
* Visual contrast makes changes in momentum state easy to spot at a glance.
### Best conditions
* Most effective in markets with **clear participation and readable momentum shifts**.
* Less informative during flat, low-energy phases.
*For educational and analytical purposes only. Always test across multiple markets and timeframes.*
---
Così è chiaro che **RSI e MACD lavorano insieme**, ma **nessuno può risalire a come**.
Engulfing Cycle 2.0## Cycle-Phased Price Action Tool — Overview
This indicator highlights **high-impact moments** in price action by combining a **candlestick-based trigger** with a **cycle-phase timing approach** and broad context filters.
### What it aims to do
* Emphasize situations where price shows a **clear shift in control** between buyers and sellers.
* Reduce noise by focusing on signals that occur in **more meaningful timing windows** within a repeating market rhythm.
### Context & quality checks
* Signals are conditioned by a general **directional environment** filter, so they’re less likely to appear against unstable conditions.
* A momentum “sanity check” helps avoid entries when price looks **too stretched**.
* Activity/participation can be used as confirmation to prioritize **stronger reactions**.
### Cycle timing logic
* The indicator tracks market swings and assigns each moment to a **phase** of the current move.
* It prioritizes two key phases:
* an **early phase**, where new movement often starts to form,
* a **mid phase**, where continuation or decisive turning behavior is more likely to show up.
### How it’s used
* Treat signals as **attention markers**, not automatic entries.
* It works best when combined with basic structure reading (levels, ranges, and obvious swing areas).
### Best conditions
* Markets with **clean swings** and repeatable movement patterns.
* Less effective in extremely choppy, compressed ranges where timing signals can cluster.
*For educational use only. Always test across symbols and timeframes before relying on it.*
Kinetic RSI [Vel + Accel] + AlertsThe Problem with Standard RSI
Most traders use the Relative Strength Index (RSI) to see if a market is "Overbought" (above 70) or "Oversold" (below 30). The problem? A strong trend can stay overbought for days, burning short sellers, or an asset can stay oversold while price continues to crash. Standard RSI tells you where the price is, but it doesn't tell you how hard it is moving.
The Solution: Kinetic RSI
This script reimagines RSI by applying basic physics concepts: Velocity and Acceleration.
Instead of asking "Is RSI below 30?", this indicator asks: "Is RSI below 35 AND did it just make a violent, high-speed turn upwards?"
It filters out lazy, drifting price action and only signals when momentum is accelerating in a new direction.
How It Works (The Math)
Velocity: We calculate the speed of the RSI change (Current RSI - Previous RSI).
Acceleration: We calculate if that speed is increasing (Current Velocity - Previous Velocity).
The Trigger: A signal is only generated if the RSI is in an extreme zone (<35 or >65) AND it has high Velocity AND positive Acceleration.
How to Trade It
1. The "Kick" Signals (Background Highlights)
🟢 Green Background (Bullish Kick): The RSI was low, but buyers stepped in aggressively. The momentum is not just positive; it is accelerating upward. This is often a "V-Bottom" catch.
🔴 Red Background (Bearish Kick): The RSI was high, but sellers slammed the price down. Momentum is accelerating downward.
2. The Line Color
Lime Line: Velocity is positive (Momentum is rising).
Fuchsia Line: Velocity is negative (Momentum is falling).
Usage: If the background flashes Green (Buy Signal), but the line turns back to Fuchsia (Red) a few bars later, the move has failed—exit the trade.
Settings & Alerts
RSI Length: Standard 14 (Adjustable).
Velocity Threshold: Controls sensitivity.
Lower (e.g., 2-3): More signals, catches smaller reversals.
Higher (e.g., 5+): Fewer signals, catches only massive "shocks" to the price.
Alerts Included: You can set alerts for "Bullish Kick," "Bearish Kick," or "Any Kick" to get notified of volatility spikes.
Best Practices
Wait for the Close: This indicator measures the closing velocity. Always wait for the bar to close to confirm the background color signal.
Trend Filtering: This works best as a "Reversal" indicator. If the market is in a super-strong uptrend, ignore the Bearish (Red) signals and only take the Bullish (Green) dips.
MP SESSIONS, DST, OTTHere’s a clear description you can use for this script (for yourself or as a TradingView “Indicator Description”):
---
### MP SESSIONS, DST, OTT – What this indicator does
This script is a **multi-session market timing tool** that:
1. **Draws full trading sessions on the chart** (Asia, Sydney, Tokyo, Shanghai, Europe, London, New York, NYSE)
2. **Automatically adjusts for Daylight Saving Time (DST)** for Sydney, London, and New York
3. **Shows a live info table** with session times, DST status, and whether each session is currently open or closed
4. **Adds optional custom “OTT” vertical lines** at user-defined intraday times (for your own models, killzones, or time blocks)
---
### Main Features (high level)
#### 1. Market mode & time zone handling
* **Market Mode**:
* `Forex`
* `Stock`
* `User Custom` (you type your own session ranges)
* `TFlab suggestion` (predefined “optimized” session times)
* **Time Zone Mode**:
* `UTC`
* `Session Local Time` (local exchange time: Sydney, Tokyo, London, New York etc.)
* `Your Time Zone` (converts to the user-selected TZ, e.g. `UTC-4:00`)
* Handles separate time zones for:
* Asia, Sydney, Tokyo, Shanghai, Europe, London, New York, NYSE
* Has logic to **recalculate session start/end depending on DST** and the chosen mode.
---
#### 2. Daylight Saving Time (DST) engine
The function `DST_Detector`:
* Calculates when DST **starts and ends** for:
* `Australia/Sydney`
* `Europe/London`
* `America/New_York`
* Detects the correct Sunday (2nd, 4th, etc.) for start/end using day-of-week and week counts.
* Returns `'Active'` or `'Inactive'` for each region.
* These values are then used to **shift the sessions** (e.g. New York 13:00–21:00 vs 12:00–20:00 in UTC).
The script can also **draw vertical lines** on the chart when DST starts/ends and label them:
* “Sydney DST Started / Ended”
* “London DST Started / Ended”
* “New York DST Started / Ended”
---
#### 3. Session timing & sessions on the chart
The function `Market_TimeZone_Calculator`:
* Based on **Market Mode** + **Time Zone Mode** + **DST state**, it returns:
* Time ranges for: Sydney, Tokyo, Shanghai, Asia (combined), Europe, London, New York, NYSE
* These ranges are in `"HHMM-HHMM"` format.
Then the script:
* Converts these to `time()` conditions using the proper time zone
* Creates boolean series like `On_sesAsia`, `On_sesEurope`, `On_sesNewYork`, etc., which are **1 when the session is open and 0 when closed**.
---
#### 4. Session high/low boxes & labels
The function `LowHighSessionDetector`:
* Tracks **high and low of each session** while it’s active.
* When a new session starts:
* Resets and starts recording the session high/low.
* While session is active:
* Updates `High` with the max of current bar high and previous session high.
* Updates `Low` with the min of current bar low and previous session low.
* When the session is "on":
* Draws a **box** from session low to high (`box.new`) and extends it to the right as long as the session continues.
* Places a **label with session name** (Asia, London, New York, etc.) near the high:
* Style depends on the session (down/right/left).
You have visibility toggles per session:
* `Asia Session`, `Sydney Session`, `Tokyo Session`, `Shanghai Session`, `Europe Session`, `London Session`, `New York Session`, `NYSE` (for TFlab mode).
So you visually see:
* A shaded box for each session
* The full H/L range for that session
* A text label with the session name.
---
#### 5. Info table
The indicator builds a **table in a corner of the chart** showing:
* Header:
* “FOREX Session”, “Stock Market Trading Hours”, “User Custom Session”, or “TFlab suggestion” depending on mode.
* Columns:
1. Session name (Asia, Sydney, Tokyo, Shanghai, Europe, London, New York, NYSE)
2. DST status for that region (“Active 🌞 / Inactive 🍂 / Not Observed”)
3. Session **start time**
4. Session **end time**
5. Current **status** (“Open / Closed”, with green/red background)
The function `SplitFunction`:
* Parses the `"HHMM-HHMM"` strings for each session.
* Converts them into:
* Either raw times (if viewing in UTC/session local)
* Or converted times in **Your Time Zone** using `timestamp` and `hour/ minute` with `YourTZ`.
* Returns formatted `Start` and `End` strings like `9:30`, `13:00`, etc.
So the table is effectively a **live session schedule** that:
* Auto-adjusts to DST
* Can show times in your own time zone
* Shows which session is open right now.
---
#### 6. OTT vertical lines (custom intraday markers)
At the bottom, there is an **OTT section** which lets you draw up to **three sets of vertical lines** at specific times:
* Each OTT block has:
* Enable toggle (`Enable OTT 1/2/3`)
* Start hour & minute
* End hour & minute
* Color
* Global OTT settings:
* Line style: `Solid / Dashed / Dotted`
* Line width
* Toggle: “Show OTT Labels?”
Logic:
* `is_ott_time()` checks if current bar’s `hour` and `minute` match the OTT input time.
* `draw_ott()`:
* When the bar time matches, draws a **vertical line** through the candle from low to high (`extend.both`).
* Optionally adds a label above the bar, like `"OTT1 Start"`, `"OTT1 End"`, etc.
Use cases:
* Marking **open/close of your trading session**
* Defining **killzones**, news times, or custom model windows
* Visual anchors for your intraday routine (NY open, 10 AM candle, etc.)
---
### TL;DR
This indicator is a **session toolkit + DST engine + time markers**:
* **Visually paints the main global sessions** with boxes and labels.
* **Handles DST automatically** for Sydney, London, New York.
* **Shows a live table** with session times, DST status, and open/closed status in your time zone.
* **Adds up to three configurable vertical time markers (OTT)** for custom session windows or key times.
If you want, I can also write a **short version** (2–3 sentences) for the TradingView “Description” field.
Delta Price Range BandsThis indicator uses the historical price delta range analysis method, perhaps known to some as HPDR thanks to YouTuber Krown.
To test the method and it's usability, I programmed my own version and put some more features into it, like a preview median price feature.
trendY - Trend Signals & Smart Trailing Bands (OverltrendY is a clean, responsive trend-following overlay built around ATR (Average True Range) - so it adapts automatically to changing volatility instead of using fixed, one-size-fits-none” levels. It plots dynamic trend bands directly on your chart, highlights directional shifts, and prints Buy / Sell labels exactly when the trend flips - making it easy to spot momentum transitions and manage trades with a logical trailing structure.
What it does
Builds volatility-adjusted trend bands using ATR.
Locks bands in the trend direction (reduces noise and whipsaws compared to naive channels).
Detects trend reversals and prints clear Buy (trend turns up) / Sell (trend turns down) signals.
Includes ready-to-use alerts for automation and fast execution.
Key features
Adaptive to market conditions: ATR-based logic expands/contract bands as volatility changes.
Clear trend visualization: Green band for uptrends, red band for downtrends.
Flip-based signals: Labels only appear when direction changes, not on every candle.
Works on any market & timeframe: Crypto, forex, stocks, indices - scalping to swing.
Customizable: Adjust ATR Period and ATR Multiplier to fit your instrument and style.
Alerts included: Buy, Sell, and Direction Change alerts supported.
How to use it effectively
Treat trend flips as directional bias shifts (not magic). Many traders use:
Buy = trend turns up → look for longs (especially with confirmation).
Sell = trend turns down → look for shorts / exits.
Use the plotted band as a dynamic trailing stop guide or trend invalidation” level.
For higher-quality setups, combine trendY with:
Structure (break of recent swing, support/resistance)
Volume or VWAP
A higher timeframe trend filter
Settings guide
ATR Period: Higher = smoother, fewer signals. Lower = faster, more signals.
ATR Multiplier: Higher = wider bands, fewer flips. Lower = tighter bands, more flips.
Alerts
Long Trend
Short Trend
Direction Change
Important note (read before trading real money)
This indicator is a decision-support tool, not a guarantee of profit. Markets can and will fake out trend systems - especially during ranging conditions or news spikes. Always use proper risk management and test settings on your instrument before relying on signals.
ADX CornerShows the current ADX value along with the average ADX over the last N candles in a small table on the chart.
It’s meant as a quick reference to see whether the market is generally trending or stuck in chop, without needing a separate indicator pane.
Premarket, Previous Day, Current Day high/lowHighs and lows for premarket, previous day, and current day
NeuraLine v1Neuraline is a daily market-regime indicator designed to help traders stay aligned with the dominant trend while avoiding noise, false flips, and emotional overtrading.
Instead of reacting to every small move, Neuraline focuses on structural trend confirmation, combining trend strength, regime persistence, and higher-timeframe context into one clean visual layer.
1. Anti-Flip Trend Logic
Neuraline uses a buffered EMA regime system with built-in hysteresis.
This means the indicator does not flip trend on every minor crossover, but only when price confirms a meaningful shift.
Result: fewer false signals, more stability.
2. Market Strength Filter (ADX)
Trend changes are only validated when market strength confirms the move.
This prevents signals during low-volatility, choppy conditions where most indicators fail.
3. Clear Market Regime: Bullish or Bearish
Neuraline always operates in one of two states:
• Bullish regime
• Bearish regime
No confusion. No over-analysis.
Every signal is contextualized within the current regime.
4. Higher-Timeframe Structure via 50 / 200 Moving Averages
The integrated 50 & 200 day moving averages provide long-term market context:
• MA lines automatically adapt their color based on bullish or bearish alignment
• A subtle ribbon highlights the structural zone between them
This makes it instantly clear whether price action is occurring within a healthy trend or against macro structure.
5. Minimal, Emotion-Free Signals
Buy and sell signals are only triggered on confirmed regime transitions, not on every fluctuation. Signals are displayed as clean, non-intrusive icons directly on the chart — no clutter, no noise.
6. Designed for Daily & Swing Traders
Neuraline is optimized for:
• Daily charts
• Swing trading
• Position management
• Market bias confirmation
It is not a scalping tool.
It is a decision-filter.
PDI / MMXM Execution OverlayCreates FVG's on lower time frames automatically. Helps with charting live.
NY 8:00 8:15 Candle High & LowThis indicator plots the high and low of the New York 8:00–8:15 AM (EST) 15-minute candle and extends those levels horizontally for the rest of the trading day
The levels are **anchored to the 15-minute timeframe
Designed for **session-based trading, liquidity sweeps, ICT-style models, and NY Open strategies.
Lines automatically reset each trading day at the NY open window.
Clean, lightweight, and non-repainting.
This script is ideal for traders who want consistent, reliable session levels without recalculation or timeframe distortion.
Custom versions available
If you’d like:
- Different sessions (London, Asia, custom hours)
- Multiple session ranges
- Labels, alerts, or strategy logic
- A full strategy version with entries, SL/TP, and risk rules
Feel free to reach out — happy to build custom tools to fit your trading model.
Trade Assistant by thedatalayers.comThe Trade Assistant by DataLayers.com is designed to bridge the gap between futures-based trade ideas and their precise execution on CFD instruments.
Many traders identify high-quality setups on futures markets but execute their trades on CFDs due to broker access, margin efficiency, or position sizing flexibility.
This tool ensures that the price levels, risk parameters, and position sizing from the futures contract are translated accurately to the selected CFD.
The indicator supports inverted instruments and differing quote conventions.
For example, it can accurately convert trades from a futures contract such as USD/CAD Future to an inverted CFD like CAD/USD, even when price scales and quotation formats differ.
Users can define custom scaling factors to ensure correct price mapping across instruments with different decimal structures or broker-specific pricing models.
Multi-TF EMA Alignment - Safe 3/4 Above EMA50 + ATR Pullbackthis script only triggers when your context, Validation, and entry time frames EMA's align for long positions
Killshotcopy// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
//@version=5
indicator("Killshot", overlay=true, format = format.price, max_labels_count=500, max_lines_count=500)
max_bars_back(time, 5000)
////////////////////////////////////////////////////////////////////////////
///// /////
///// Input Block /////
///// /////
////////////////////////////////////////////////////////////////////////////
// Color inputs for EMAs
short_color = input.color(defval=color.blue, title="Fast EMA Color", group="EMA Settings")
medium_color = input.color(defval=color.orange, title="Slow EMA Color", group="EMA Settings")
long_color = input.color(defval=color.red, title="Long EMA Color", group="EMA Settings")
// EMA period inputs
fastEMA = input.int(defval=20, title="Fast EMA", group="EMA Settings")
slowEMA = input.int(defval=50, title="Slow EMA", group="EMA Settings")
longEMA = input.int(defval=238, title="Long EMA", group="EMA Settings")
//Support & Resistance
showSR = input.bool(title="Display Support and Resistance", defval=true, group="S&R; Settings")
atrMovement = input.float(title="ATR Movement Required", defval=1.0, step=0.5, tooltip="Minimum ATR distance price must move to consider a pivot zone to be 'major'")
lookback = input.int(title="High/Low Lookback", defval=25, step=5, tooltip="Lookback period for detecting swing highs/lows")
maxZoneSize = input.float(title="Max Zone Size (Compared to ATR)", defval=2.5, step=0.5, tooltip="If a zone is larger than the current ATR multiplied by this, it is considered too large and ignored")
newStructureReset = input.int(title="Zone Update Count Before Reset", defval=25, step=5, tooltip="The script draws two zones until they're violated - if the first zone is updated this many times, the second zone is reset")
drawPreviousStructure = input.bool(title="Draw Previous Structure", defval=true, tooltip="This turns on/off drawing 'support-turned-resistance' and 'resistance-turned-support'")
displayStars = input.bool(title="Display Stars", defval=true, group="Star Settings")
////////////////////////////////////////////////////////////////////////////
///// /////
///// EMA Cross Plot Block /////
///// /////
////////////////////////////////////////////////////////////////////////////
short = ta.ema(close, fastEMA)
medium = ta.ema(close, slowEMA)
long = ta.ema(close, longEMA)
plot(short, color=short_color, linewidth=1)
plot(medium, color=medium_color, linewidth=1)
plot(long, color=long_color, linewidth=1)
//Show the directional arrows
plotshape(ta.cross(short,medium) and short>medium ? short : na, style=shape.triangleup, color=color.blue, size=size.small, location=location.belowbar)
plotshape(ta.cross(short,medium) and shortmedium ? bullColor : bearColor
plot(series=low, style=plot.style_columns, color=c_ma)
////////////////////////////////////////////////////////////////////////////
///// /////
///// Support & Resistance Code Block /////
///// /////
////////////////////////////////////////////////////////////////////////////
// Get current ATR value
atr = ta.atr(14)
// Get highest body and lowest body for the current candle
highestBody = open > close ? open : close
lowestBody = open > close ? close : open
// Set up our persistent S&R; variables (1 = the wick and 2 = the body)
var res1 = 0.0
var res2 = 0.0
var sup1 = 0.0
var sup2 = 0.0
var lookForNewResistance = true
var lookForNewSupport = true
// Set up our *previous* support & resistance variables (for drawing support-turned-resistance etc)
var previousRes1 = 0.0
var previousRes2 = 0.0
var previousSup1 = 0.0
var previousSup2 = 0.0
// Set up our ATR variables (for identifying significant declines/rallies to validate S&R; zones)
var atrSaved = 0.0
var potentialR1 = 0.0
var potentialR2 = 0.0
var potentialS1 = 0.0
var potentialS2 = 0.0
// Detect fractal swing highs for resistance
// We're looking for this pattern: .|.
if high == ta.highest(high, lookback) and high < high and lookForNewResistance
r1 = high
r2 = highestBody > highestBody ? highestBody : highestBody > highestBody ? highestBody : highestBody
if (r1 - r2) / atr <= maxZoneSize
lookForNewResistance := false
potentialR1 := r1
potentialR2 := r2
atrSaved := atr
// Detect fractal swing lows for support
// We're looking for this pattern: *|*
if low == ta.lowest(low, lookback) and low > low and lookForNewSupport
s1 = low
s2 = lowestBody < lowestBody ? lowestBody : lowestBody < lowestBody ? lowestBody : lowestBody
if (s2 - s1) / atr <= maxZoneSize
lookForNewSupport := false
potentialS1 := s1
potentialS2 := s2
atrSaved := atr
// Check if potential resistance zone has already been violated. If it has, reset our potential R1 & R2
if close > potentialR1 and barstate.isconfirmed
potentialR1 := na
potentialR2 := na
// Check if potential support zone has already been violated. If it has, reset our potential S1 & S2
if close < potentialS1 and barstate.isconfirmed
potentialS1 := na
potentialS2 := na
// Check if we've had a significant decline since detecting swing high
if potentialR1 - low >= (atrSaved * atrMovement)
previousRes1 := na(previousRes1) ? potentialR1 : previousRes1 // Store previous resistance if we're not already drawing it
previousRes2 := na(previousRes2) ? potentialR2 : previousRes2
res1 := potentialR1
res2 := potentialR2
potentialR1 := na
potentialR2 := na
// Check if we've had a significant rally since detecting swing low
if high - potentialS1 >= (atrSaved * atrMovement)
previousSup1 := na(previousSup1) ? potentialS1 : previousSup1 // Store previous support if we're not already drawing it
previousSup2 := na(previousSup2) ? potentialS2 : previousSup2
sup1 := potentialS1
sup2 := potentialS2
potentialS1 := na
potentialS2 := na
// Declare support & resistance update counters
// This is used for forcing a zone reset if a zone is not violated within a reasonable period of time
var supCount = 0
var resCount = 0
// If the previous resistance high has been violated then begin searching for a new resistance zone
if close >= res1 and barstate.isconfirmed
lookForNewResistance := true
lookForNewSupport := true
resCount := resCount + 1
// If the previous support low has been violated then begin searching for a new support zone
if close <= sup1 and barstate.isconfirmed
lookForNewSupport := true
lookForNewResistance := true
supCount := supCount + 1
// If our current resistance zone has been violated, store its values to draw new *potential* support zone
// The idea being that once a major resistance zone is violated it often becomes future support
// But we only save previous S&R; if we don't already have one saved (or our zone update count exceeds newStructureReset)
if (close > res1 and na(previousRes1) and barstate.isconfirmed) or previousRes1 == 0.0 or supCount >= newStructureReset
previousRes1 := res1
previousRes2 := res2
supCount := 0
// If our current support zone has been violated, store its values to draw new *potential* resistance zone
// The idea being that once a major support zone is violated it often becomes future resistance
// But we only save previous S&R; if we don't already have one saved (or our zone update count exceeds newStructureReset)
if (close < sup1 and na(previousSup1) and barstate.isconfirmed) or previousSup1 == 0.0 or resCount >= newStructureReset
previousSup1 := sup1
previousSup2 := sup2
resCount := 0
// If our resistance-turned-support zone has been violated, reset our saved resistance variables
if close < previousRes2 and barstate.isconfirmed
previousRes1 := na
previousRes2 := na
// If our support-turned-resistance zone has been violated, reset our saved support variables
if close > previousSup2 and barstate.isconfirmed
previousSup1 := na
previousSup2 := na
// Draw our current resistance zone
r1 = plot(res1 == res1 ? res1 : na, color=close >= res1 ? color.green : color.red, style=plot.style_linebr, title="R1")
r2 = plot(res1 == res1 ? res2 : na, color=close >= res1 ? color.green : color.red, style=plot.style_linebr, title="R2")
fill(r1, r2, color=close > res1 ? color.green : color.new(color.red, 50), title="Resistance Zone")
// Draw our current support zone
s1 = plot(sup1 == sup1 ? sup1 : na, color=close < sup1 ? color.red : color.green, style=plot.style_linebr, title="S1")
s2 = plot(sup1 == sup1 ? sup2 : na, color=close < sup1 ? color.red : color.green, style=plot.style_linebr, title="S2")
fill(s1, s2, color=close < sup1 ? color.red : color.new(color.green, 50), title="Support Zone")
// Draw our previous support zone (turned potential resistance)
ps1 = plot(previousSup1 == previousSup1 and previousSup1 != sup1 and drawPreviousStructure ? previousSup1 : na, color=color.red, style=plot.style_linebr, title="PS1")
ps2 = plot(previousSup1 == previousSup1 and previousSup1 != sup1 and drawPreviousStructure ? previousSup2 : na, color=color.red, style=plot.style_linebr, title="PS2")
fill(ps1, ps2, color=color.new(color.red, 10), title="Previous Support Zone")
// Draw our previous resistance zone (turned potential support)
pr1 = plot(previousRes1 == previousRes1 and previousRes1 != res1 and drawPreviousStructure ? previousRes1 : na, color=color.green, style=plot.style_linebr, title="PR1")
pr2 = plot(previousRes1 == previousRes1 and previousRes1 != res1 and drawPreviousStructure ? previousRes2 : na, color=color.green, style=plot.style_linebr, title="PR2")
fill(pr1, pr2, color=color.new(color.green, 10), title="Previous Resistance Zone")
////////////////////////////////////////////////////////////////////////////
///// /////
///// STARS Code Block /////
///// /////
////////////////////////////////////////////////////////////////////////////
//calculation variables. Hardcoded for now.
Depth1 = 5
Depth2 = 13
Depth3 = 34
Deviation1 = 1
Deviation2 = 8
Deviation3 = 13
Backstep1 = 3
Backstep2 = 5
Backstep3 = 8
// STAR Color settings - MEDIUM NOW BLUE
color1 = input(title = "Small Stars Color", defval = color.yellow)
color2 = color1
color3 = input(title = "Medium Stars Color", defval = color.aqua)
color4 = color3
color5 = input(title = "Large Sell Stars Color", defval = color.red)
color6 = input(title = "Large Buy Stars Color", defval = color.lime)
repaint = true
// CHATGPT FIX #1: Add useStar parameter
zigzag(Depth0, Deviation0, Backstep0, color0, color00, size0, useStar) =>
var last_h = 1
last_h += 1
var last_l = 1
last_l += 1
var lw = 1
var hg = 1
lw += 1
hg += 1
p_lw = -ta.lowestbars(Depth0)
p_hg = -ta.highestbars(Depth0)
lowing = lw == p_lw or low - low > Deviation0 * syminfo.mintick
highing = hg == p_hg or high - high > Deviation0 * syminfo.mintick
lh = ta.barssince(not highing )
ll = ta.barssince(not lowing )
down = ta.barssince(not(lh > ll)) >= Backstep0
lower = low > low
higher = high < high
if lw != p_lw and (not down or lower)
lw := p_lw < hg ? p_lw : 0
lw
if hg != p_hg and (down or higher)
hg := p_hg < lw ? p_hg : 0
hg
label point = na
x1 = down ? lw : hg
y1 = down ? low -3 : high
if down == down
if repaint
label.delete(point )
down
if down != down
if down
last_h := hg
last_h
else
last_l := lw
last_l
if not repaint
nx = down ? last_h : last_l
point := label.new(bar_index-nx, down ? high : low -6, text = "🟡", style=down?label.style_label_down:label.style_label_up)
down
if repaint
// FINAL FIX: Use red/green circle emojis for Depth3, yellow circles for Depth1/2
txt = useStar ? (down ? "🟢" : "🔴") : "🟡"
point := label.new(bar_index - x1, y1, txt, style=label.style_none, size=size0, textcolor=down ? color00 : color0, xloc=xloc.bar_index, yloc=yloc.price, force_overlay=true)
if displayStars
// CHATGPT FIX #3: Pass false for Depth1/2, true for Depth3
zigzag(Depth1, Deviation1, Backstep1, color1, color2, size.normal, false)
zigzag(Depth2, Deviation2, Backstep2, color3, color4, size.large, false)
zigzag(Depth3, Deviation3, Backstep3, color5, color6, size.huge, true)
////////////////////////////////////////////////////////////////////////////
///// /////
///// Trigger Alerts /////
///// /////
////////////////////////////////////////////////////////////////////////////
// Code Alerts
alert_message = ""
if ta.cross(short,medium) and short>medium
alert_message := "EMA Cross Buy alert for " + syminfo.description + " price: " + str.tostring(math.round(open, 2))
alert(alert_message, freq=alert.freq_once_per_bar)
if ta.cross(short,medium) and short
Index Construction Tool🙏🏻 The most natural mathematical way to construct an index || portfolio, based on contraharmonic mean || contraharmonic weighting. If you currently traded assets do not satisfy you, why not make your own ones?
Contraharmonic mean is literally a weighted mean where each value is weighted by itself.
...
Now let me explain to you why contraharmonic weighting is really so fundamental in two ways: observation how the industry (prolly unknowably) converged to this method, and the real mathematical explanation why things are this way.
How it works in the industry.
In indexes like TVC:SPX or TVC:DJI the individual components (stocks) are weighted by market capitalization. This market cap is made of two components: number of shares outstanding and the actual price of the stock. While the number of shares holds the same over really long periods of time and changes rarely by corporate actions , the prices change all the time, so market cap is in fact almost purely based on prices itself. So when they weight index legs by market cap, it really means they weight it by stock prices. That’s the observation: even tho I never dem saying they do contraharmonic weighting, that’s what happens in reality.
Natural explanation
Now the main part: how the universe works. If you build a logical sequence of how information ‘gradually’ combines, you have this:
Suppose you have the one last datapoint of each of 4 different assets;
The next logical step is to combine these datapoints somehow in pairs. Pairs are created only as ratios , this reveals relationships between components, this is the only step where these fundamental operations are meaningful, they lose meaning with 3+ components. This way we will have 16 pairs: 4 of them would be 1s, 6 real ratios, and 6 more inverted ratios of these;
Then the next logical step is to combine all the pairs (not the initial single assets) all together. Naturally this is done via matrices, by constructing a 4x4 design matrix where each cell will be one of these 16 pairs. That matrix will have ones in the main diagonal (because these would be smth like ES/ES, NQ/NQ etc). Other cells will be actual ratios, like ES/NQ, RTY/YM etc;
Then the native way to compress and summarize all this structure is to do eigendecomposition . The only eigenvector that would be meaningful in this case is the principal eigenvector, and its loadings would be what we were hunting for. We can multiply each asset datapoint by corresponding loading, sum them up and have one single index value, what we were aiming for;
Now the main catch: turns out using these principal eigenvector loadings mathematically is Exactly the same as simply calculating contraharmonic weights of those 4 initial assets. We’re done here.
For the sceptics, no other way of constructing the design matrix other than with ratios would result in another type of a defined mean. Filling that design matrix with ratios Is the only way to obtain a meaningful defined mean, that would also work with negative numbers. I’m skipping a couple of details there tbh, but they don’t really matter (we don’t need log-space, and anyways the idea holds even then). But the core idea is this: only contraharmonic mean emerges there, no other mean ever does.
Finally, how to use the thing:
Good news we don't use contraharmonic mean itself because we need an internals of it: actual weights of components that make this contraharmonic mean, (so we can follow it with our position sizes). This actually allows us to also use these weights but not for addition, but for subtraction. So, the script has 2 modes (examples would follow):
Addition: the main one, allows you to make indexes, portfolios, baskets, groups, whatever you call it. The script will simply sum the weighted legs;
Subtraction: allows you to make spreads, residual spreads etc. Important: the script will subtract all the symbols From the first one. So if the first we have 3 symbols: YM, ES, RTY, the script will do YM - ES - RTY, weights would be applied to each.
At the top tight corner of the script you will see a lil table with symbols and corresponding weights you wanna trade: these are ‘already’ adjusted for point value of each leg, you don’t need to do anything, only scale them all together to meet your risk profile.
Symbols have to be added the way the default ones are added, one line : one symbol.
Pls explore the script’s Style setting:
You can pick a visualization method you like ! including overlays on the main chart pane !
Script also outputs inferred volume delta, inferred volume and inferred tick count calculated with the same method. You can use them in further calculations.
...
Examples of how you can use it
^^ Purple dotted line: overlay from ICT script, turned on in Style settings, the contraharmonic mean itself calculated from the same assets that are on the chart: CME_MINI:RTY1! , CME_MINI:ES1! , CME_MINI:NQ1! , CBOT_MINI:YM1!
^^ precious metals residual spread ( COMEX:GC1! COMEX:SI1! NYMEX:PL1! )
^^ CBOT:ZC1! vs CBOT:ZW1! grain spread
^^ BDI (Bid Dope Index), constructed from: NYSE:MO , NYSE:TPB , NYSE:DGX , NASDAQ:JAZZ , NYSE:IIPR , NASDAQ:CRON , OTC:CURLF , OTC:TCNNF
^^ NYMEX:CL1! & ICEEUR:BRN1! basket
^^ resulting index price, inferred volume delta, inferred volume and inferred tick count of CME_MINI:NQ1! vs CME_MINI:ES1! spread
...
Synthetic assets is the whole new Universe you can jump into and never look back, if this is your way
...
∞
Seasonality Scanner by thedatalayers.comThe Seasonality Scanner automatically detects seasonal patterns by scanning a user-defined number of past years (e.g., the last 10 years).
Based on this historical window, the indicator identifies the strongest seasonal tendency for the currently selected date range.
The scanner evaluates all valid seasonal windows using two filters:
• Hit Rate - the percentage of profitable years
• Average Return - the highest mean performance across the analyzed period
The best-scoring seasonal setup is displayed directly on the chart, including the exact start and end dates of the identified pattern for the chosen time range.
Users can define the period they want to analyze, and the indicator will automatically determine which seasonal window performed best over the selected history.
Recommended Settings (Standard Use)
For optimal and consistent results, the following settings are recommended:
• Search Window: 20-30
• Minimum Length: 5
• Time Period: from 2015 onward
• US Election Cycle: All Years
These settings provide a balanced and reliable baseline to detect meaningful seasonal tendencies across markets.
This indicator helps traders understand when recurring seasonal patterns typically occur and how they may align with ongoing market conditions.
This indicator is intended to be used exclusively on the daily timeframe, as all calculations are based on daily candles.
Using it on lower timeframes may result in inaccurate or misleading seasonal readings.
DZDZ – Pivot Demand Zones + Trend Filter + Breadth Override + SL is a structured accumulation indicator built to identify high-probability demand areas after valid pullbacks.
The script creates **Demand Zones (DZ)** by pairing **pivot troughs (local lows)** with later **pivot peaks (local highs)**, requiring a minimum **ATR (Average True Range)** gap to confirm real price displacement. Zones are drawn only when market structure confirms strength through a **trend filter** (a required number of higher highs over a recent window) or a **breadth override**, which activates after unusually large expansion candles measured as a percentage move from the prior close.
In addition to pivots, the script detects **coiling price action**—tight trading ranges contained within an ATR band—and treats these as alternative demand bases.
Entries require price to penetrate a defined depth into the zone, preventing shallow reactions. After the first valid entry, a **DCA (Dollar-Cost Averaging)** system adds buys every 10 bars while trend or breadth conditions persist. A **ratcheting SL (Stop-Loss)** tightens upward only, using demand structure or ATR when zones are unavailable.
The focus is disciplined, volatility-aware accumulation aligned with structure.
Seasonality Calculation Tool by thedatalayers.comThe Seasonality Calculation Tool is designed to analyze and evaluate the strength of any seasonal pattern detected by the Seasonality Indicator.
While the Seasonality Indicator displays the historical seasonal curve, this tool goes one step further by examining how reliable and consistent that curve truly is.
The tool checks whether a seasonal pattern is strong, distorted by a few outlier years, or statistically meaningful. It calculates the average return within the selected seasonal window and highlights how accurate or robust the pattern has been over the evaluated period.
To support manual confirmation and deeper analysis, the tool also visualizes the seasonal windows directly on the chart. This allows traders to review past occurrences and backtest the pattern themselves to validate the quality of the signal.
The Seasonality Calculation Tool is an ideal complement to the main Seasonality Indicator, helping traders identify high-quality, data-driven seasonal tendencies and avoid misleading or weak seasonal patterns.
This script is intended to be used exclusively on the daily timeframe, as all calculations rely on daily candle data.
The settings are intuitive and easy to adjust, allowing users to quickly evaluate any seasonal window displayed by the Seasonality Indicator.
X-trend Volume Anomaly 📊 X-TREND Volume Anomaly: Advanced VSA Analysis
Effective market analysis requires understanding the relationship between Price Action and Volume. X-Trend Volume Anomaly is a technical instrument that simplifies Volume Spread Analysis (VSA) into a clear, visual system. It allows traders to instantly decode the footprint of "Smart Money" by analyzing the correlation between Relative Volume (RVOL) and Candle Range.
The algorithm automatically classifies market behavior into three distinct states:
1. 🟢🔴 Impulse (Trend Validation)
Logic: High Relative Volume + High Price Range.
Interpretation: Represents genuine market intent. Institutional aggregators are aggressively pushing price. This confirms the validity of a breakout or trend continuation.
2. 🟠 Absorption / Churn (Reversal Warning)
Logic: Ultra-High Relative Volume + Low Price Range (Doji, Pin-bar).
Interpretation: The critical signal. This indicates a major divergence between Effort (Volume) and Result (Price Movement). Large players are absorbing liquidity via limit orders, halting the trend. This is often a precursor to an immediate reversal. (See the Orange candle in the chart examples).
3. 👻 Ghost Mode (Noise Reduction)
Logic: Candles with low/insignificant volume are rendered in a transparent gray scale.
Utility: Eliminates visual noise, allowing the trader to focus exclusively on significant liquidity events and institutional activity.
⚙️ SYSTEM SYNERGY
While this indicator provides robust standalone volume analysis, it is engineered to function as the Volume Confirmation Layer within the X-Trend Ecosystem. For a complete institutional trading setup, we recommend pairing this tool with:
X-Trend Reversal (PRO): For precise, non-repainting entry signals.
X-Trend Liquidation Heatmap: For identifying high-probability price targets.





















