Price Below PDL - Complete Multi-Confirmation Alert🎯 KEY DIFFERENCES - BEARISH VERSION:$jmoskyhigh
1. Core Logic Inversions:
PDL (Previous Day Low) instead of PDH
Below instead of Above
Breakdown instead of Breakout
bars_below instead of bars_above
ma_bearish (Fast < Slow) instead of ma_bullish
2. Visual Changes:
Red color scheme throughout
Red background when below PDL with confirmations
Triangle DOWN for alert (location.abovebar)
Diamond ABOVE bar for breakdown start
Red header in info panel ("PDL:")
Red MA fill when bearish
3. Confirmation Requirements:
✅ Volume Spike - Same logic
✅ MA Bearish - Fast MA < Slow MA
✅ Below VWAP - Price < VWAP
✅ Hold Period - Must stay below PDL with all confirmations
✅ Reset on Failure - Any lost confirmation = complete reset
Dönemler
HTF Candle Countdown Timer//@version=5
indicator("HTF Candle Countdown Timer", overlay=true)
// ============================================================================
// INPUTS - SETTINGS MENU
// ============================================================================
// --- Mode Selection ---
mode = input.string(title="Mode", defval="Auto", options= ,
tooltip="Auto: Αυτόματη αντιστοίχιση timeframes Custom: Επιλέξτε το δικό σας timeframe")
// --- Custom Timeframe Selection ---
customTF = input.timeframe(title="Custom Timeframe", defval="15",
tooltip="Ενεργό μόνο σε Custom Mode")
// --- Table Position ---
tablePos = input.string(title="Table Position", defval="Bottom Right",
options= )
// --- Colors ---
textColor = input.color(title="Text Color", defval=color.white)
bgColor = input.color(title="Background Color", defval=color.black)
transparentBg = input.bool(title="Transparent Background", defval=false,
tooltip="Ενεργοποίηση διάφανου φόντου")
// --- Text Size ---
textSize = input.string(title="Text Size", defval="Normal",
options= )
// ============================================================================
// FUNCTIONS
// ============================================================================
// Μετατροπή string position σε table position constant
getTablePosition(pos) =>
switch pos
"Top Left" => position.top_left
"Top Right" => position.top_right
"Bottom Left" => position.bottom_left
"Bottom Right" => position.bottom_right
=> position.bottom_right
// Μετατροπή string size σε size constant
getTextSize(size) =>
switch size
"Auto" => size.auto
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
=> size.normal
// Αυτόματη αντιστοίχιση timeframes
getAutoTimeframe() =>
currentTF = timeframe.period
string targetTF = ""
if currentTF == "1"
targetTF := "15"
else if currentTF == "3"
targetTF := "30"
else if currentTF == "5"
targetTF := "60"
else if currentTF == "15"
targetTF := "240"
else if currentTF == "60"
targetTF := "D"
else if currentTF == "240"
targetTF := "W"
else
// Default fallback για μη-mapped timeframes
targetTF := "60"
targetTF
// Μετατροπή timeframe string σε λεπτά για σύγκριση
timeframeToMinutes(tf) =>
float minutes = 0.0
if str.contains(tf, "D")
multiplier = str.tonumber(str.replace(tf, "D", ""))
minutes := na(multiplier) ? 1440.0 : multiplier * 1440.0
else if str.contains(tf, "W")
multiplier = str.tonumber(str.replace(tf, "W", ""))
minutes := na(multiplier) ? 10080.0 : multiplier * 10080.0
else if str.contains(tf, "M")
multiplier = str.tonumber(str.replace(tf, "M", ""))
minutes := na(multiplier) ? 43200.0 : multiplier * 43200.0
else
minutes := str.tonumber(tf)
minutes
// Format countdown σε ώρες:λεπτά:δευτερόλεπτα ή λεπτά:δευτερόλεπτα
formatCountdown(milliseconds) =>
totalSeconds = math.floor(milliseconds / 1000)
hours = math.floor(totalSeconds / 3600)
minutes = math.floor((totalSeconds % 3600) / 60)
seconds = totalSeconds % 60
string result = ""
if hours > 0
result := str.format("{0,number,00}:{1,number,00}:{2,number,00}", hours, minutes, seconds)
else
result := str.format("{0,number,00}:{1,number,00}", minutes, seconds)
result
// Μετατροπή timeframe σε readable format
formatTimeframe(tf) =>
string formatted = ""
if str.contains(tf, "D")
formatted := tf + "aily"
else if str.contains(tf, "W")
formatted := tf + "eekly"
else if str.contains(tf, "M")
formatted := tf + "onthly"
else if tf == "60"
formatted := "1H"
else if tf == "240"
formatted := "4H"
else
formatted := tf + "min"
formatted
// ============================================================================
// MAIN LOGIC
// ============================================================================
// Επιλογή target timeframe βάσει mode
targetTimeframe = mode == "Auto" ? getAutoTimeframe() : customTF
// Validation: Έλεγχος αν το target timeframe είναι μεγαλύτερο από το τρέχον
currentTFMinutes = timeframeToMinutes(timeframe.period)
targetTFMinutes = timeframeToMinutes(targetTimeframe)
var string warningMessage = ""
if targetTFMinutes <= currentTFMinutes
warningMessage := "⚠ HTF < Current TF"
else
warningMessage := ""
// Υπολογισμός του χρόνου κλεισίματος του HTF candle
htfTime = request.security(syminfo.tickerid, targetTimeframe, time)
htfTimeClose = request.security(syminfo.tickerid, targetTimeframe, time_close)
// Υπολογισμός υπολειπόμενου χρόνου σε milliseconds
remainingTime = htfTimeClose - timenow
// Format countdown
countdown = warningMessage != "" ? warningMessage : formatCountdown(remainingTime)
// Format timeframe για εμφάνιση
displayTF = formatTimeframe(targetTimeframe)
// ============================================================================
// TABLE DISPLAY
// ============================================================================
// Δημιουργία table
var table countdownTable = table.new(
position=getTablePosition(tablePos),
columns=2,
rows=2,
bgcolor=transparentBg ? color.new(bgColor, 100) : bgColor,
frame_width=1,
frame_color=color.gray,
border_width=1)
// Update table content
if barstate.islast
// Header
table.cell(countdownTable, 0, 0, "Timeframe:",
text_color=textColor,
bgcolor=transparentBg ? color.new(bgColor, 100) : bgColor,
text_size=getTextSize(textSize))
table.cell(countdownTable, 1, 0, displayTF,
text_color=textColor,
bgcolor=transparentBg ? color.new(bgColor, 100) : bgColor,
text_size=getTextSize(textSize))
// Countdown
table.cell(countdownTable, 0, 1, "Countdown:",
text_color=textColor,
bgcolor=transparentBg ? color.new(bgColor, 100) : bgColor,
text_size=getTextSize(textSize))
table.cell(countdownTable, 1, 1, countdown,
text_color=warningMessage != "" ? color.orange : textColor,
bgcolor=transparentBg ? color.new(bgColor, 100) : bgColor,
text_size=getTextSize(textSize))
// ============================================================================
// END OF SCRIPT
// ============================================================================
VWMA Series (Dynamic) mtf - Dual Gradient Colored"VWMA Series (Dynamic) mtf - Dual Gradient Colored" is a multi-timeframe (MTF) Volume-Weighted Moving Average (VWMA) ribbon indicator that plots up to 60 sequential VWMAs with arithmetic progression periods (e.g., 1, 4, 7, 10…). Each VWMA line is dual-gradient colored: Base hue = Greenish (#2dd204) if close > VWMA (bullish), Magenta (#ff00c8) if close < VWMA (bearish)
Brightness gradient = fades from base → white as period increases (short → long-term)
Uses daily resolution by default (timeframe="D"), making it ideal for higher-timeframe trend filtering on lower charts.Key FeaturesFeature
Description
Dynamic Periods
Start + i × Increment → e.g., 1, 4, 7, 10… up to 60 terms
Dual Coloring
Bull/Bear + Gradient (short = vivid, long = pale)
MTF Ready
Plots daily VWMAs on any lower timeframe (1H, 15M, etc.)
No Lag on Long Sets
Predefined "best setups" eliminate repainting/lag
Transparency Control
Adjustable line opacity for clean visuals
Scalable
Up to 60 VWMAs (max iterations)
Recommended Setups (No Lag)Type
Example Sequence (Start, Inc, Iter)
Long-Term Trend
1, 3, 30 → 1, 4, 7 … 88
93, 3, 30 → 93, 96 … 180
372, 6, 30 → 372, 378 … 546
Short-Term Momentum
1, 1, 30 → 1, 2, 3 … 30
94, 2, 30 → 94, 96 … 152
1272, 5, 30 → 1272, 1277 … 1417
Key Use CasesUse Case
How to Use
1. Multi-Timeframe Trend Alignment
On 1H chart, use 1, 3, 30 daily VWMAs → price above all green lines = strong uptrend
2. Dynamic Support/Resistance
Cluster of long-term pale VWMAs = major S/R zone
3. Early Trend Change Detection
Short-term vivid lines flip from red → green before longer ones = early bullish signal
4. Ribbon Compression/Expansion
Tight bundle → consolidation; fanning out → trend acceleration
5. Mean Reversion Entries
Price far from long-term VWMA cluster + short-term reversal = pullback trade
6. Volume-Weighted Fair Value
Long-period VWMAs reflect true average price paid over weeks/months
Visual Summary
Price ↑
████ ← Short VWMA (vivid green = close > VWMA)
███
██
█
. . . fading to white
█
██
███
████ ← Long VWMA (pale = institutional average)
Green lines = price above VWMA (bullish bias)
Magenta lines = price below VWMA (bearish bias)
Gradient = shorter (left) → brighter; longer (right) → whiter
Ribbon thickness = trend strength (wide = strong, narrow = weak)
Best For Swing traders using daily trend on intraday charts
Volume-based strategies (VWMA > SMA)
Clean, colorful trend visualization without clutter
Institutional fair value anchoring via long-period VWMAs
Pro Tip:
Use Start=1, Increment=3, Iterations=30 on a 4H chart with timeframe="D" → perfect daily trend filter with zero lag and beautiful gradient flow.
Nqaba Probable High/Low — Overshoot/Undershoot{Larry Method)This Probable High/Low indicator is an advanced tool inspired by Larry R. Williams’ original projection formulas.
It calculates probable daily highs and lows based on the prior day’s open, high, low, and close, allowing traders to anticipate key intraday price levels with precision.
Session Highs & Lows Title:
Session Highs & Lows — Asia, London, New York + NY Open Line
Description:
This indicator automatically plots the session highs and lows for the three major trading sessions:
Asia (5 PM – 2 AM PT) – red rays
London (12 AM – 9 AM PT) – blue rays
Previous New York Session (6:30 AM – 1 PM PT) – brown rays
It also draws a thin dashed red line at 6:30 AM PT, marking the New York open.
The script dynamically updates each session’s range as price action unfolds, then locks it in when the session closes.
Lines extend to the right only (“rays”) so traders can easily identify liquidity zones, previous highs/lows, and intraday reaction points without cluttering the left side of the chart.
The logic uses TradingView’s session-time functions (time() windows) and resets automatically after each New York session ends, ensuring that only the current day’s structure is visible.
Unique features:
Works on any timeframe and any symbol (optimized for ES & NQ futures).
Separate colors for each session for clear visual distinction.
Session lines are “live” during the session and freeze once it closes.
Lightweight code with automatic cleanup — avoids line-count overflow.
Non-repainting and fully timezone-aware.
How to use:
Add the indicator to your chart and select your preferred timezone.
Watch how Asia and London session highs/lows guide liquidity during the New York session open (marked by the red dashed line).
Moon Phases: 1st Quarter, Full, 3rd QuarterTracks the Lunar phase or Moon phase, which is the apparent shape of the Moon's day and night phases of the lunar day as viewed from earth.
SH/SL with Trend TableHelps in identify Swing High and Swing Low in chart time frame.
Trend is also mentioned in Chart.
Day Range Divider DTSCopied it for DTS purposes to ensure proper tracking, testing, and verification within the DTS workflow. This copy is intended for reference, analysis, and any required adjustments without affecting the original version.
True Previous Day/Week High & LowTrue Previous Day/Week High & Low
What makes this indicator unique:
Unlike most previous day high/low indicators that only track SESSION data (e.g., 6:00 PM - 5:00 PM for futures), this indicator calculates the TRUE calendar day high and low from MIDNIGHT TO MIDNIGHT (00:00 - 23:59) in New York time.
Why this matters:
- Session-based indicators miss crucial price action that occurs during overnight hours
- True midnight-to-midnight calculation gives you the ACTUAL daily range
- Essential for traders who need accurate previous day levels for support/resistance
- Works perfectly on 24-hour markets like futures (NQ, ES, YM, etc.)
Features:
✓ True calendar day high/low (00:00-23:59 NY time)
✓ Previous week high/low
✓ Customizable line colors, widths, and styles (solid, dashed, dotted)
✓ Optional labels with adjustable size, color, and spacing
✓ Values displayed on price scale
✓ Toggle individual levels on/off
✓ Optimized for 1-minute charts but works on all timeframes
Perfect for:
- Futures traders (NQ, ES, YM, RTY)
- Day traders using previous day levels as key support/resistance
- Swing traders tracking weekly ranges
- Anyone who needs accurate 24-hour high/low levels
Settings are clean and intuitive - just add to your chart and customize the appearance to match your setup!
FuTech : Darvas Box (Original Theory) IndicatorFuTech : Darvas Box (Original Theory) Indicator
📈 Introduction
🔹 This indicator implements the legendary Darvas Box theory developed by Nicolas Darvas in the 1950s, which helped him turn $25,000 into $2,000,000 in just 18 months.
🔹 Unlike other box indicators, this implementation strictly follows Darvas' original methodology while adding modern technical features for enhanced usability in today's markets.
===============================================================================
📊 What Makes This Implementation Unique
🔹 This indicator stands apart from other Darvas Box implementations in several key ways:
🔹 It implements the exact "high before low" rule that Darvas used - first identifying the roof (top) of the box, then waiting for the floor (bottom) to form
🔹 It offers two distinct methods for box detection - Swing Confirmation (which waits for price confirmation) and Lookback Period (simpler approach)
🔹 It includes Darvas' critical volume confirmation requirement with customizable parameters
🔹 It incorporates Darvas' focus on strong stocks near their highs through the 52-week high filter
🔹 It provides multi-timeframe capability, allowing application to intraday, daily, weekly, or monthly charts
🔹 It features dynamic box coloring based on breakout direction (green for upward, red for downward)
===============================================================================
🔍 Technical Implementation Details
📦 Box Formation Algorithm
🔹 The indicator constructs boxes using a sophisticated algorithm that follows Darvas' original approach:
🔹 For Swing Confirmation mode:
🔸 The system identifies potential swing highs by looking for price points that are higher than the previous N bars (user-defined)
🔸 Similarly, swing lows are identified as points lower than the previous N bars
🔸 The "high before low" rule ensures a roof is established before a floor is determined
🔸 Once both parameters are locked in, the box is drawn and extended horizontally
🔹 For Lookback Period mode:
🔸 The box high is simply the highest high of the last X bars (user-defined)
🔸 The box low is the lowest low of the last X bars
🔸 This provides a simpler but still effective implementation of Darvas' concept
🚀 Breakout Detection System
🔹 The indicator employs a dual-confirmation system for breakouts:
🔹 Upward Breakout Conditions:
🔸 Price must close above the box roof
🔸 Volume must exceed the volume moving average (default 20-period) multiplied by a factor (default 1.5x)
🔸 The 52-week high filter must be satisfied (price must be within the maximum drawdown percentage from the 52-week high)
🔹 Downward Breakout Conditions:
🔸 Price must close below the box floor
🔸 No volume confirmation is required for downward breakouts (following Darvas' approach)
📊 Volume Confirmation Mechanism
🔹 The indicator calculates volume thresholds using:
🔸 Volume Average = SMA(volume, N) where N is the user-defined period (default 20)
🔸 Volume Threshold = Volume Average × Volume Factor (default 1.5)
🔸 Only when current volume exceeds this threshold is an upward breakout considered valid
📈 Uptrend Filter
🔹 The indicator implements Darvas' focus on strong stocks through:
🔸 52-week High Calculation = Highest price over the past 52 weeks
🔸 Minimum Price Requirement = 52-week High × (1 - Maximum Drawdown %)
🔸 This ensures only stocks that are not too far from their highs generate signals
===============================================================================
🎯 How to Use This Indicator
🔷 Entry Signals
🔹 Wait for a green box to appear, indicating an upward breakout
🔹 Confirm that volume was above average during the breakout (shown by the indicator)
🔹 Verify the stock is within your acceptable distance from its 52-week high
🔹 Consider entering on the next candle after confirmation
🔷 Exit Signals
🔹 Exit when a red box appears, indicating a downward breakout
🔹 Alternatively, use trailing stops below newly formed box lows
🔹 Consider partial exits at predefined profit targets while letting the remainder run
🔷 Parameter Optimization
🔹 For swing traders, use longer lookback periods (20-50 bars)
🔹 For day traders, use shorter periods (5-15 bars)
🔹 Adjust the volume factor based on the asset's typical volatility
🔹 Modify the maximum drawdown percentage based on your risk tolerance
===============================================================================
📚 Historical Context and Trading Philosophy
🔹 Nicolas Darvas developed his box theory while traveling the world as a dancer.
🔹 With limited access to market information, he relied only on price charts and telegrams.
🔹 He discovered that strong stocks tend to pause after hitting new highs, forming what he called "boxes" - sideways ranges where the stock "rests" before its next move.
🔹 By buying only when price broke above these ranges with unusually high volume, he was able to ride powerful uptrends while cutting losses quickly when the breakdown occurred.
🔹 This indicator captures the essence of Darvas' approach - focusing on strength, confirming with volume, and selling weakness quickly - while adding modern technical features to enhance its utility in today's electronic trading environment.
===============================================================================
⚙️ Calculation Summary
🔹 The indicator performs the following calculations:
🔸 Box High = Highest swing high or lookback high (depending on selected method)
🔸 Box Low = Lowest swing low or lookback low (depending on selected method)
🔸 Upward Breakout = Price > Box High AND Volume > (Volume Average × Volume Factor)
🔸 Downward Breakout = Price < Box Low
🔸 Volume Average = SMA(Volume, N) where N is the volume period
🔸 Uptrend Filter = Price ≥ (52-week High × (1 - Maximum Drawdown %))
===============================================================================
🔔 Alert Configuration
🔹 To set up alerts:
🔸 Right-click on the chart and select "Add Alert"
🔸 Choose the Darvas Box indicator as the alert condition
🔸 Select either "Breakout Up" or "Breakout Down" as the alert condition
🔸 Configure your preferred notification method
🔹 This modernizes Darvas' telegram-based approach, allowing you to receive instant notifications when potential trading opportunities occur.
===============================================================================
📈 Conclusion
🔹 This FuTech : Darvas Box (Original Theory) indicator faithfully implements Nicolas Darvas' legendary trading method while adding modern technical features.
🔹 By focusing on strength, confirming with volume, and providing clear entry and exit signals, it offers traders a structured approach to trend following that has stood the test of time.
🔹 The indicator's multiple detection methods, volume confirmation, and trend filtering make it a comprehensive tool for implementing Darvas' box theory in today's markets.
===============================================================================
🙏 Credits : Inspired by @LevelUpTools
Altseason Probability (BTC.D • USDT • TOTAL3 • DXY)Testing phase, workig out the kinks.
Works by aggregating several factors to define altseason probability in any given moment
PARTH Gold Profit IndicatorWhat's Inside:
✅ What is gold trading (XAU/USD explained)
✅ Why trade gold (5 major reasons)
✅ How to make money (buy/sell mechanics)
✅ Complete trading setup using your indicator
✅ Entry rules (when to buy/sell with examples)
✅ Risk management (THE MOST IMPORTANT)
✅ Best trading times (London-NY overlap)
✅ 3 trading styles (scalping, swing, position)
✅ 6 common mistakes to avoid
✅ Realistic profit expectations
✅ Pre-trade checklist
✅ Step-by-step getting started guide
✅ Everything a beginner need
OSPL Ichimoku + Multi-Trend DashboardOSPL Ichimoku + Multi-Trend Dashboard
A professional multi-indicator trend analyzer that fuses Ichimoku Cloud with volume, momentum, and price-based confirmations — all visualized in a dynamic dashboard.
🔍 Overview
The OSPL Ichimoku + Multi-Trend Dashboard is a comprehensive market-structure and momentum visualization tool built for serious traders who value clarity, precision, and confirmation.
It combines the powerful Ichimoku Cloud system with VWMA, SuperTrend, RSI, and VWAP to provide a 360-degree view of market direction, trend strength, and trade zones.
This indicator allows traders to instantly read multi-indicator alignment through a color-coded dashboard, helping filter out noise and improve timing for entries and exits.
⚙️ Core Features
🟢 1. Ichimoku Cloud Framework
Displays all major Ichimoku elements: Tenkan-Sen, Kijun-Sen, Senkou Span A & B (Kumo Cloud).
Detects Bullish and Bearish Tenkan-Kijun Crossovers.
Identifies Cloud Trend Bias (price above, below, or inside the Kumo).
Marks Buy / Sell / Wait Zones automatically based on price structure and line alignment.
⚡ 2. Multi-Indicator Confirmation Layer
Enhance trend validation using:
VWMA (Volume-Weighted Moving Average): Measures volume-driven price trend.
SuperTrend: Uses ATR to confirm trend direction and detect reversals.
RSI (Relative Strength Index): Gauges market momentum — above 50 indicates bullish bias, below 50 bearish.
VWAP (Volume-Weighted Average Price): Tracks institutional and fair value price zones.
Each of these indicators contributes to a synchronized dashboard view that instantly reveals market bias.
📊 3. Interactive Dashboard Display
Clean, modern bottom-right table summarizing indicator values and their current trend status.
Color-coded trend map:
🟢 Green = Bullish 🔴 Red = Bearish 🟡 Yellow = Neutral / Wait
Quick visual reference — ideal for active traders who rely on multiple confirmations before taking trades.
🌥 4. Kumo Visualization
Smoothly shaded Ichimoku Cloud fill highlights dominant market phase (bullish or bearish).
Dynamic transition coloring enhances visibility of potential breakouts or reversals.
🎯 How to Use
Use the dashboard as a trend alignment and confirmation tool:
Bullish Confluence Example:
Price above Kumo Cloud
Tenkan-Sen > Kijun-Sen
RSI > 50
SuperTrend below price
VWMA and VWAP trending upward
Bearish Confluence Example:
Price below Kumo Cloud
Tenkan-Sen < Kijun-Sen
RSI < 50
SuperTrend above price
VWMA and VWAP trending downward
When most indicators align in the same direction, the system provides high-probability trade zones.
It can be used across all timeframes, from intraday scalping to multi-day swing trading.
🧩 Why Use This Indicator
✅ Filters false signals by combining multiple trend tools.
✅ Eliminates the need to switch between multiple indicators.
✅ Offers an at-a-glance visual assessment of overall market bias.
✅ Adaptable to any asset: stocks, indices, forex, commodities, or crypto.
✅ Ideal for traders using trend-following, momentum, or confirmation-based strategies.
🧠 Professional Tips
Combine the dashboard signals with price action and volume breakouts for enhanced accuracy.
Use higher timeframe Ichimoku structure as a directional filter (e.g., check the 1-hour trend while trading on 15-minute).
Apply ATR-based stop loss and multi-timeframe confluence to further strengthen entries.
Works exceptionally well with Heikin Ashi candles for smoother visual trends.
💡 Suggested Use Cases
Intraday & Swing Trading
Trend Continuation & Reversal Identification
Multi-Indicator Confirmation System
Dashboard-Style Strategy Testing and Backtesting
⚠️ Disclaimer
This indicator is designed for educational and analytical purposes only.
It is not financial advice and does not guarantee profitability.
Always perform independent analysis and apply prudent risk management before executing trades.
Yield Curve Phase Signal - Macro OpticsThe Yield Curve Phase Signal identifies where we are in the 10s–2s curve by detecting pivots and classifying each span as Bull Steepening, Bear Steepening, Bear Flattening, or Bull Flattening with clear background shading and date labels.
A live table tracks 10-year and 2-year yield performance across current, previous, 1-week, 1-month, and 3-month windows, plus the curve delta, so you can see phase shifts in real time.
Use the chart, table, and the Yield Curve Phase Signal PDF presentation slides together to spot regime transitions that tend to precede rotations across equities, rates, and risk assets.
To get your copy of the pdf slides that go with this indicator, go to macro-optics.com
Arb_Screener_v1Arb_Screener_v1 is a Pine Script indicator that monitors de-correlation (price spread) of perpetual futures across multiple exchanges—Binance, Bybit, Bitget, OKX, Gate, and MEXC—relative to the current chart symbol.
Daily Range Zone This indicator shows the daily range (high to low) for each day.
Every day has its own unique color, making it easy to see each day’s price range at a glance.
momentum spread strategy ilkerThis script is the opposite of a traditional mean-reversion pairs trading strategy. It is a "Cointegration Breakdown" or "Momentum Divergence" tool.
Instead of betting on a spread's Z-Score to revert to 0, this strategy is designed to identify when the statistical relationship (the "elastic band") has snapped. It then provides signals to trade with the momentum as the spread diverges.
It filters for true breakouts by waiting for a "Momentum Regime," which is confirmed only when the pair's relationship becomes statistically unstable.
## 📈 Key Features
1. The Momentum Regime (Blue Background)
This is the core of the indicator. The background turns BLUE to signal a "Momentum Regime". This is the only time you should look for a momentum trade.
The blue background activates only if TWO conditions are met simultaneously:
• 1. Relationship Instability: The pair's relationship is broken. This is confirmed when either the rolling Correlation Z-Score (purple line) breaks down OR the Volatility Ratio (orange line) becomes unstable.
• 2. Divergence Confirmation: The Half-Life calculation (from our v2.8 script) shows "N/A (Divergent)" in the dashboard. This mathematically confirms the mean-reverting force (\lambda) is gone (it has turned positive) and the spread is statistically diverging.
If the background is GRAY, the script is in a "Neutral" or "Mean-Reversion" state, and all momentum signals should be ignored.
2. Momentum Breakout Signals
This strategy inverts the Z-Score logic. The 0-line is not a profit target; it is the breakout line.
• BUY Signal (Blue Triangle ▲): Appears only if the background is BLUE and the Z-Score (blue line) crosses ABOVE 0. This is your long momentum entry.
• SELL Signal (Fuchsia Triangle ▼): Appears only if the background is BLUE and the Z-Score crosses BELOW 0. This is your short momentum entry.
3. Built-in Trade Management
• Take Profit (X Cross): Your profit target is the outer band. The script plots an 'X' when the Z-Score hits the +2.0 band (for longs) or the -2.0 band (for shorts).
• Stop Loss (X Cross): Your stop is a failure of the momentum. The script plots an 'X' if the Z-Score re-crosses the 0-line against your trade.
4. Full Quant Dashboard
All the statistical components are plotted for analysis:
• Price Z-Score (Blue Line): Your primary momentum indicator.
• Z-Score Correlation (Purple Line): Lets you visually confirm the correlation breakdown.
• Volatility Ratio (Orange Line): Lets you visually confirm the volatility spike.
• Half-Life Dashboard: Confirms the regime by showing "N/A (Divergent)".
## 🛠 How to Use (Required Setup)
IMPORTANT: This indicator is designed to run on a spread chart (e.g., M2K/MES or MGC/SIL).
1. Load your spread chart first (e.g., type M2K/MES in the ticker bar).
2. Add this indicator to the chart.
3. Go into the indicator's Settings (⚙).
4. In the "Inputs" tab, you MUST fill in the two individual tickers:
• Ticker du Symbole 1 (REQUIS): M2K
• Ticker du Symbole 2 (REQUIS): MES
5. The script uses these two inputs to calculate the Volatility and Correlation filters. The main Z-Score is calculated from the spread chart itself.
This tool is for traders who want to capture explosive divergence moves that happen during fundamental news or regime changes, while filtering out the "noise" of stable, mean-reverting periods.
MACD HTF Hardcoded (A/B Presets) + Regimes [CHE] MACD HTF Hardcoded (A/B Presets) + Regimes — Higher-timeframe MACD emulation with acceptance-based regime filter and on-chart diagnostics
Summary
This indicator emulates a higher-timeframe MACD directly on the current chart using two hardcoded preset families and a time-bucket mapping, avoiding cross-timeframe requests. It classifies four MACD regimes and applies an acceptance filter that requires several consecutive bars before a state is considered valid. A small dead-band around zero reduces noise near the axis. An on-chart table reports the active preset, the inferred time bucket, the resolved lengths, and the current regime.
Pine version: v6
Overlay: false
Primary outputs: MACD line, Signal line, Histogram columns, zero line, regime-change alert, info table
Motivation: Why this design?
Cross-timeframe indicators often rely on external timeframe requests, which can introduce repaint paths and added latency. This design provides a deterministic alternative: it maps the current chart’s timeframe to coarse higher-timeframe buckets and uses fixed EMA lengths that approximate those views. The dead-band suppresses flip-flops around zero, and the acceptance counter reduces whipsaw by requiring sustained agreement across bars before acknowledging a regime.
What’s different vs. standard approaches?
Baseline: Classical MACD with user-selected lengths on the same timeframe, or higher-timeframe MACD via cross-timeframe requests.
Architecture differences:
Hardcoded A and B length families with a bucket map derived from the chart timeframe.
No `request.security`; all calculations occur on the current series.
Regime classification from MACD and Histogram sign, gated by an acceptance count and a small zero dead-band.
Diagnostics table for transparency.
Practical effect: The MACD behaves like a slower, higher-timeframe variant without external requests. Regimes switch less often due to the dead-band and acceptance logic, which can improve stability in choppy sessions.
How it works (technical)
The script derives a coarse bucket from the chart timeframe using `timeframe.in_seconds` and maps it to preset-specific EMA lengths. EMAs of the source build MACD and Signal; their difference is the Histogram. Signs of MACD and Histogram define four regimes: strong bull, weak bull, strong bear, and weak bear. A small, user-defined band around zero treats values near the axis as neutral. An acceptance counter checks whether the same regime persisted for a given number of consecutive bars before it is emitted as the filtered regime. A single alert condition fires when the filtered regime changes. The histogram columns change shade based on position relative to zero and whether they are rising or falling. A persistent table object shows preset, bucket tag, resolved lengths, and the filtered regime. No cross-timeframe requests are used, so repaint risk is limited to normal live-bar movement; values stabilize on close.
Parameter Guide
Source — Input series for MACD — Default: Close — Using a smoother source increases stability but adds lag.
Preset — A or B length family — Default: “3,10,16” — Switch to “12,26,9” for the classic family mapped to buckets.
Table Position — Anchor for the info table — Default: Top right — Choose a corner that avoids covering price action.
Table Size — Table text size — Default: Normal — Use small on dense charts, large for presentations.
Dark Mode — Table theme — Default: Enabled — Match your chart background for readability.
Show Table — Toggle diagnostics table — Default: Enabled — Disable for a cleaner pane.
Zero dead-band (epsilon) — Noise gate around zero — Default: Zero — Increase slightly when you see frequent flips near zero.
Acceptance bars (n) — Bars required to confirm a regime — Default: Three — Raise to reduce whipsaw; lower to react faster.
Reading & Interpretation
Histogram columns: Above zero indicates bullish pressure; below zero indicates bearish pressure. Darker shade implies the histogram increased compared with the prior bar; lighter shade implies it decreased.
MACD vs. Signal lines: The spread corresponds to histogram height.
Regimes:
Strong bull: MACD above zero and Histogram above zero.
Weak bull: MACD above zero and Histogram below zero.
Strong bear: MACD below zero and Histogram below zero.
Weak bear: MACD below zero and Histogram above zero.
Table: Inspect active preset, bucket tag, resolved lengths, and the filtered regime number with its description.
Practical Workflows & Combinations
Trend following: Use strong bull to favor long exposure and strong bear to favor short exposure. Use weak states as pullback or transition context. Combine with structure tools such as swing highs and lows or a baseline moving average for confirmation.
Exits and risk: In strong trends, consider exiting partial size on a regime downgrade to a weak state. In choppy sessions, increase the acceptance bars to reduce churn.
Multi-asset / Multi-timeframe: Works on time-based charts across liquid futures, indices, currencies, and large-cap equities. Bucket mapping helps retain a consistent feel when moving from lower to higher timeframes.
Behavior, Constraints & Performance
Repaint/confirmation: No cross-timeframe requests; values can evolve intrabar and settle on close. Alerts follow your TradingView alert timing settings.
Resources: `max_bars_back` is set to five thousand. Very large resolved lengths require sufficient history to seed EMAs; expect a warm-up period on first load or after switching symbols.
Known limits: Dead-band and acceptance can delay recognition at sharp turns. Extremely thin markets or large gaps may still cause brief regime reversals.
Sensible Defaults & Quick Tuning
Start with preset “3,10,16”, dead-band near zero, and acceptance of three bars.
Too many flips near zero: increase the dead-band slightly or raise the acceptance bars.
Too sluggish in clean trends: reduce the acceptance bars by one.
Too sensitive on fast lower timeframes: switch to the “12,26,9” preset family or raise the acceptance bars.
Want less clutter: hide the table and keep the alert.
What this indicator is—and isn’t
This is a visualization and regime layer for MACD using higher-timeframe emulation and stability gates. It is not a complete trading system and does not generate position sizing or risk management. Use it with market structure, execution rules, and protective stops.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
5M Gap Finder — Persistent Boxes (Tiered) v65 M gap finder, using 3 different types of gaps: Tier Definition Tightness Frequency Use Case
Tier A (Strict) Gap ≥ 0.10%, body ≥ 70% of range Rare Institutional-strength displacement
Tier B (Standard) Gap ≥ 0.05%, body ≥ 60% of range Medium Baseline trading setup
Tier C (Loose) Gap ≥ 0.03%, no body condition Common Data collection and observation
Bitcoin: Price projection from previous cycles onto 2024 cycleAn indicator for displaying the BITFINEX:BTCUSD price movement pattern from previous cycles onto the 2024–2025 cycle.
Best checked on Bitfinex or the “Brave New Coin – Bitcoin Liquid Index” (though that one has gone offline).
Next time it should be done with embedded constants rather than by copying candles from previous cycles.
Publishing to share the idea.
Best Time Slots — Auto-Adapt (v6, TF-safe) + Range AlertsTime & binning
Auto-adapt to timeframe
Makes all time windows scale to your chart’s bar size (so it “just works” on 1m, 15m, 4H, Daily).
• On = recommended. • Off = fixed default lengths.
Minimum Bin (minutes)
The size of each daily time slot we track (e.g., 5-min bins). The script uses the larger of this and your bar size.
• Higher = fewer, broader slots; smoother stats. • Lower = more, narrower slots; needs more history.
• Try: 5–15 on intraday, 60–240 on higher TFs.
Lookback windows (used when Auto-adapt = ON)
Target ER Window (minutes)
How far back we look to judge Efficiency Ratio (how “straight” the move was).
• Higher = stricter/smoother; fewer bars qualify as “movement”. • Lower = more sensitive.
• Try: 60–120 min intraday; 240–600 min for higher TFs.
Target ATR Window (minutes)
How far back we compute ATR (typical range).
• Higher = steadier ATR baseline. • Lower = reacts faster.
• Try: 30–120 min intraday; 240–600 min higher TFs.
Target Normalization Window (minutes)
How far back for the average ATR (the baseline we compare to).
• Higher = stricter “above average range” check. • Lower = easier to pass.
• Try: ~500–1500 min.
What counts as “movement”
ER Threshold (0–1)
Minimum efficiency a bar must have to count as movement.
• Higher = only very “clean, one-direction” bars count. • Lower = more bars count.
• Try: 0.55–0.65. (0.60 = balanced.)
ATR Floor vs SMA(ATR)
Requires range to be at least this many × average ATR.
• Higher (e.g., 1.2) = demand bigger-than-usual ranges. • Lower (e.g., 0.9) = allow smaller ranges.
• Try: 1.0 (above average).
How history is averaged
Recent Days Weight (per-day decay)
Gives more weight to recent days. Example: 0.97 ≈ each day old counts ~3% less.
• Higher (0.99) = slower fade (older days matter more). • Lower (0.95) = faster fade.
• Try: 0.97–0.99.
Laplace Prior Seen / Laplace Prior Hit
“Starter counts” so early stats aren’t crazy when you have little data.
• Higher priors = probabilities start closer to average; need more real data to move.
• Try: Seen=3, Hit=1 (defaults).
Min Samples (effective)
Don’t highlight a slot unless it has at least this many effective samples (after decay + priors).
• Higher = safer, but fewer highlights early.
• Try: 3–10.
When to highlight on the chart
Min Probability to Highlight
We shade/mark bars only if their slot’s historical movement probability is ≥ this.
• Higher = pickier, fewer highlights. • Lower = more highlights.
• Try: 0.45–0.60.
Show Markers on Good Bins
Draws a small square on bars that fall in a “good” slot (in addition to the soft background).
Limit to market hours (optional)
Restrict to Session + Session
Only learn/score inside this time window (e.g., “0930-1600”). Uses the chart/exchange timezone.
• Turn on if you only care about RTH.
Range (chop) alerts
Range START if ER ≤
Triggers range when efficiency drops below this level (price starts zig-zagging).
• Higher = easier to call “range”. • Lower = stricter.
Range START if ATR ≤ this × SMA(ATR)
Also triggers range when ATR shrinks below this fraction of its average (volatility contraction).
• Higher (e.g., 1.0) = stricter (must be at/under average). • Lower (e.g., 0.9) = easier to call range.
Alerts on bar close
If ON, alerts fire once per bar close (cleaner). If OFF, they can trigger intrabar (faster, noisier).
Quick “what happens if I change X?”
Want more highlighted times? ↓ Min Probability, ↓ ER Threshold, or ↓ ATR Floor (e.g., 0.9).
Want stricter highlights? ↑ Min Probability, ↑ ER Threshold, or ↑ ATR Floor (e.g., 1.2).
Want recent days to matter more? ↑ Recent Days Weight toward 0.99.
On 4H/Daily, widen Minimum Bin (e.g., 60–240) and maybe lower Min Probability a bit.
SK-ABC COMPACT v2SK-ABC COMPACT v2 detects algorithmic ABC market structures with auto-drawn zones (GKL, BC) and Fibonacci targets (1.618–2.0). Includes activation logic, HTF filter, and full trade visualization for rule-based SK-style trading.






















