Stoch_VX2Nothing New about a Stochastic but maybe in how you use them ( Other than Over bought / Sold cross over & divergence signals )
Running 3 bands
Standard stoch & tops & bottoms swing band
Optimised variables 12, 5 , 3 or fib 13, 5, 3 / - 12 / 3 / 3 a little bit tighter to combine both smoothness & accuracy. These are my own personal setting inc. Strategy.
Tìm kiếm tập lệnh với "北京地铁3号线和12号线线路图"
MACD Color Trawler (by ChartArt)This version of the MACD indicator is 'trawling' (checking) if the MACD histogram and the zero line crossing with the MACD line are both positive or negative. The idea behind this is to show areas with higher or lower risk.
Features:
1. Enable the bar color
2. Enable the background color
3. Change zero line value
FYI:
"The MACD-Histogram is an indicator of an indicator. In fact, MACD is also an indicator of an indicator. This means that the MACD-Histogram is the fourth derivative of price."
First derivative: 12-day EMA and 26-day EMA
Second derivative: MACD (12-day EMA less the 26-day EMA)
Third derivative: MACD signal line (9-day EMA of MACD)
Fourth derivative: MACD-Histogram (MACD less MACD signal line)
Source: stockcharts.com
Complete DashboardPA+AI PRE/GO Trading Dashboard v0.1.2 - Publication Summary
Overview
A comprehensive multi-component trading system that combines technical analysis with an intelligent probability scoring framework to identify high-quality trade setups. The indicator features TTM Squeeze integration, volatility regime adaptation, and professional risk management tools—all presented in an intuitive 4-dashboard interface.
Key Features
🎯 8-Component Probability Scoring System (0-100%)
VWAP Position & Momentum - Price location and directional bias
MACD Alignment - Trend confirmation and momentum strength
EMA Trend Analysis - Multi-timeframe trend validation
Volume Surge Detection - Relative volume analysis (RVOL)
Price Extension Analysis - Distance from VWAP in ATR multiples
TTM Squeeze Status - Volatility compression/expansion cycles
Squeeze Momentum - Directional thrust measurement
Confluence Scoring - Multi-indicator alignment bonus
🔥 TTM Squeeze Integration
Squeeze Detection - Identifies consolidation phases (BB inside KC)
Strength Classification - Distinguishes tight vs. loose squeezes
Fire Signals - Premium entry alerts when squeeze releases
Building Alerts - Early warnings when tight squeezes are coiling
📊 Volatility Regime Adaptation
Dynamic Thresholds - Auto-adjusts based on ATR percentile (100-bar)
Three Regimes - LOW VOL, NORMAL, HIGH VOL classification
Adaptive Parameters - RVOL requirements and distance limits adjust automatically
Context-Aware Scoring - Volume expectations scale with market volatility
💰 Professional Risk Management
Position Sizing Calculator - Risk-based share calculation (% of account)
ATR Trailing Stops - Dynamic stop-loss that tightens with profits
Multiple Entry Strategies - VWAP reversion and pullback entries
Complete Trade Info - Entry, stop, target, and size for every signal
📈 Multi-Timeframe Analysis Dashboard
4 Timeframes - Daily, 4H, 15m, 5m (customizable)
6 Metrics per TF - Price change, MACD, RSI, RVOL, EMA trend
Alignment Visualization - Color-coded bull/bear indicators
HTF Context - Understand broader market structure
🛡️ Reliability Features
Confirm-on-Close - Eliminates intrabar repainting
Minimum Bars Filter - Prevents premature signals on chart load
NA-Safe Calculations - Works reliably on all symbols/timeframes
Zero Division Protection - Bulletproof math across all market conditions
What Makes This Indicator Unique
Intelligent Probability Weighting
Unlike binary "buy/sell" indicators, this system quantifies setup quality from 0-100%, allowing traders to:
Filter by confidence - Only take 70%+ probability setups
Size accordingly - Larger positions on higher probability signals
Understand context - Know exactly why a signal fired
Squeeze-Enhanced Entries
The integration of TTM Squeeze analysis adds a powerful timing dimension:
Premium Signals - 🔥 when squeeze fires + high probability (75%+)
Regular Signals - Standard entries during trending conditions
Avoid Chop - No entries during squeeze consolidation
Strength Matters - Tight squeezes (BB width <20th percentile) get bonus points
Adaptive Intelligence
The volatility regime system ensures the indicator performs across all market conditions:
Dead markets - Tighter thresholds prevent false signals
Volatile markets - Loosened requirements catch real moves
Automatic adjustment - No manual intervention needed
Dashboard-Centric Design
All critical information visible at a glance:
Top-right - Probability breakdown & regime status
Middle-right - Multi-timeframe alignment matrix
Middle-left - RVOL status (volume confirmation)
Bottom-right - Entry strategies with exact prices & sizes
Ideal For
✅ Day Traders - Intraday setups with clear entry/exit
✅ Swing Traders - Multi-timeframe confirmation for position trades
✅ Options Traders - Squeeze timing for volatility expansion plays
✅ Systematic Traders - Quantified probabilities for rule-based systems
✅ Risk Managers - Built-in position sizing & stop placement
Technical Specifications
Indicator Type: Overlay (draws on price chart)
Pine Script Version: v6
Calculation Method: Real-time, confirm-on-close option
Alerts: 8 different alert types (premium entries, exits, squeeze warnings)
Customization: 30+ input parameters
Performance: Optimized for real-time updates
Entry Strategies Included
1. VWAP Reversion
Enter when price bounces off VWAP ± 0.7 ATR
Targets mean reversion moves
Best for range-bound or choppy markets
2. Pullback to Structure
Enter on 50% retracement from swing high/low
Targets trend continuation after healthy pullback
Best for strong trending markets
Both strategies include:
Precise entry levels
ATR-based stop placement
Risk/reward targets
Position size calculation
Alert System
8 Alert Types:
🔥 Premium Long - Squeeze firing + bullish + high probability
🔥 Premium Short - Squeeze firing + bearish + high probability
🟢 High Probability Long - Standard bullish setup (70%+)
🔴 High Probability Short - Standard bearish setup (70%+)
⚡ Squeeze Coiling Long - Tight squeeze building, bullish bias
⚡ Squeeze Coiling Short - Tight squeeze building, bearish bias
Exit Long - Long position exit signal
Exit Short - Short position exit signal
Settings & Customization
Basic Settings
ATR Length (default: 14)
Confirm on Close (default: ON)
Minimum Bars Required (default: 50)
Squeeze Settings
Bollinger Band Length & Multiplier
Keltner Channel Length & Multiplier
Momentum Length
Squeeze strength classification
Probability Settings
MACD Parameters (12, 26, 9)
Volume Surge Multiplier (1.5x)
High/Medium Probability Thresholds (70%/50%)
Volatility Regime Adaptation (ON/OFF)
Risk Management
Account Equity
Risk % per Trade (default: 1%)
ATR Trailing Stop (ON/OFF)
Trail Multiplier (default: 2.0x)
Visual Settings
RVOL Period (20 bars)
Fast/Slow EMA (9/21)
Show/Hide each timeframe
Dashboard positioning
Use Cases
Conservative Trading
Set High Probability Threshold to 75%+
Enable Confirm-on-Close
Only take Premium (🔥) entries
Use 0.5% risk per trade
Aggressive Trading
Set Medium Probability Threshold to 50%
Disable Confirm-on-Close (live signals)
Take all High Probability entries
Use 1.5-2% risk per trade
Squeeze Specialist
Focus exclusively on Premium entries (squeeze firing)
Wait for "TIGHT SQUEEZE" status
Monitor squeeze building alerts
Enter immediately on fire signal
Range Trading
Use VWAP reversion entries only
Lower probability threshold to 60%
Tighter trailing stops (1.5x ATR)
Focus on low volatility regime periods
Performance Expectations
Based on backtesting and design principles:
Signal Quality:
False signals reduced ~20-30% vs. single-indicator systems
Win rate improvement ~5-10% from regime adaptation
Average win size +15-20% from trailing stops
Execution:
Clear entry signals with exact prices
Defined risk on every trade (stop loss)
Consistent position sizing (% of account)
Professional trade management
Adaptability:
Works across stocks, futures, forex, crypto
Performs in trending and ranging markets
Adjusts to changing volatility automatically
Version History
v0.1.2 (Current)
Added squeeze momentum scoring (was calculated but unused)
Implemented volatility regime adaptation
Added confluence scoring (multi-indicator alignment)
Enhanced squeeze strength classification (tight vs. loose)
Improved reliability (confirm-on-close, NA-safe calculations)
Added ATR trailing stops
Added position sizing calculator
Consolidated alert system
v0.1.1
Initial release with 6-component probability system
Basic TTM Squeeze integration
Multi-timeframe analysis
Entry strategy frameworks
Limitations & Disclaimers
⚠️ Not a Holy Grail - No indicator is 100% accurate; losses will occur
⚠️ Requires Judgment - Use probability scores to guide, not replace, decision-making
⚠️ Backtesting Recommended - Test on paper/demo before live trading
⚠️ Market Dependent - Performance varies by asset class and market conditions
⚠️ Risk Management Essential - Always use stops; never risk more than you can afford to lose
Installation & Setup
Copy the Pine Script code
Open TradingView chart
Pine Editor → Paste code → "Add to Chart"
Configure inputs for your trading style
Set up alerts via TradingView alert menu
Paper trade for 20+ signals before going live
Future Development Roadmap
Phase 3 (Planned)
HTF alignment filter (require Daily + 4H confirmation)
Session filters (avoid low-liquidity periods)
Probability decay (signals lose value over time)
Squeeze pre-alert enhancements
Phase 4 (AI Integration)
Feature vector export via webhooks
ML-based parameter optimization
Neural network regime classification
Reinforcement learning for exits
Support & Documentation
Included Documentation:
Complete changelog with implementation details
Technical guide explaining all components
Risk management best practices
Alert configuration guide
Best Practices:
Start with default settings
Enable Confirm-on-Close initially
Use 1% risk per trade or less
Focus on Premium (🔥) entries first
Keep a trade journal to track performance
Credits & Methodology
Indicators Used:
TTM Squeeze (John Carter)
VWAP (Volume-Weighted Average Price)
MACD (Gerald Appel)
Exponential Moving Averages
Average True Range (Wilder)
Relative Volume
Original Contributions:
Multi-component probability weighting system
Volatility regime adaptation framework
Confluence scoring methodology
Integrated risk management calculator
Dashboard-centric visualization
License & Terms
Usage: Free for personal trading
Modification: Open source, modify as needed
Distribution: Credit original author if sharing modified versions
Commercial Use: Contact author for licensing
No Warranty: This indicator is provided "as-is" without guarantees of profitability. Trading involves substantial risk. Past performance does not guarantee future results.
Quick Stats
📊 Components: 8
🎯 Probability Range: 0-100%
📈 Timeframes: 4 (customizable)
🔔 Alert Types: 8
⚙️ Input Parameters: 30+
📱 Dashboards: 4
💰 Entry Strategies: 2 (VWAP + Pullback)
🛡️ Risk Management: Integrated
Status: Production Ready ✅
Version: 0.1.2
Last Updated: November 2025
Pine Script: v6
File Name: PA_AI_PRE_GO_v0.1.2_FIXED.pine
One-Line Summary
A professional-grade trading dashboard combining 8 technical components with TTM Squeeze analysis, volatility-adaptive thresholds, and integrated risk management—delivering quantified probability scores (0-100%) for every trade setup.
Fat Tony's Composite Momentum Histogram (v01)Fat Tony's Composite Momentum Histogram (v01)
Overview
Fat Tony's Composite Momentum Histogram (v01) is a sophisticated momentum oscillator that combines four powerful technical analysis components into a single, unified signal. Unlike traditional single-indicator approaches, this tool synthesizes Williams %R, Stochastic, MACD Histogram, and Rate of Change to provide a comprehensive view of momentum across multiple timeframes and calculation methods.
The indicator displays as a histogram that oscillates between -150 and +150, with overbought/oversold zones clearly marked at +100/-100. When momentum crosses above the oversold level with sufficient volume, a green triangle appears below the histogram signaling a potential long entry. Conversely, when momentum crosses below the overbought level, a red triangle appears above signaling a potential short entry.
What Makes This Different
Multi-Component Synthesis: Rather than relying on a single momentum calculation, this indicator averages four complementary momentum measures, each capturing different aspects of price action:
Williams %R captures overbought/oversold conditions
Stochastic tracks momentum relative to recent price range
MACD Histogram shows trend strength and potential reversals
Rate of Change measures velocity of price movement, normalized by volatility
Intelligent Volume Weighting: The indicator amplifies signals when volume confirms the move. Recent volume is compared to a 20-bar average using a logarithmic scale, preventing extreme spikes from distorting the signal while still rewarding genuine volume-backed momentum.
Adaptive Normalization: The MACD component uses a 200-bar standard deviation to adaptively scale itself, ensuring the indicator remains responsive across different market conditions and volatility regimes.
Volume Filtering: Optional minimum volume threshold (5-bar average) prevents false signals during low-liquidity periods when price moves may not be meaningful.
Key Features
Composite Signal: Combines four momentum indicators into one cohesive oscillator
Volume Confirmation: Optional volume weighting amplifies signals backed by strong participation
Trend Filter: Optional EMA-200 filter to trade only with the dominant trend
Visual Clarity: Color-coded histogram (blue for positive, orange for negative, red/green at extremes)
Automatic Alerts: Built-in alerts for entry and exit signals
Customizable Thresholds: Adjust overbought/oversold levels to match your trading style
ROC Toggle: Enable/disable the Rate of Change component based on your preference
Debug Mode: View individual component plots for fine-tuning and validation
Settings & Customization
Momentum Settings
Length (default: 14): Primary calculation period for Williams %R and Stochastic
MACD Fast (default: 12): Fast EMA period for MACD calculation
MACD Slow (default: 26): Slow EMA period for MACD calculation
MACD Signal (default: 9): Signal line period for MACD
ROC Length (default: 10): Lookback period for Rate of Change calculation
MACD StDev Length (default: 200): Period for adaptive MACD normalization
Levels
Overbought Level (default: 100): Threshold for short signals
Oversold Level (default: -100): Threshold for long signals
Volume Settings
Enable Volume Weighting (default: ON): Amplifies signals when volume confirms
Volume Sensitivity (default: 1.5): Controls strength of volume impact (0.5-3.0)
Min Avg Volume (default: 50,000): Minimum 5-bar average volume to trigger signals
Components
Include ROC Component (default: ON): Adds Rate of Change to the composite
Enable Trend Filter (default: OFF): Only signals aligned with EMA-200 trend
Show Component Plots (default: OFF): Display individual components for analysis
How to Use
Basic Signal Interpretation:
Green triangle below histogram = Long signal (momentum crossing up through oversold)
Red triangle above histogram = Short signal (momentum crossing down through overbought)
Histogram color indicates momentum direction and strength
Background shading highlights extreme overbought/oversold zones
Entry Strategy:
Wait for the histogram to enter oversold territory (below -100) for longs, or overbought (above +100) for shorts
Look for the entry signal (triangle) when momentum crosses back through the threshold
Confirm the signal occurs with adequate volume (if volume filter is enabled)
Consider the trend filter if trading with the dominant direction only
Exit Strategy:
Optional exit signals appear when momentum crosses the zero line against your position
Consider taking profits at extreme opposite readings (e.g., long exit when reaching +100)
Use price action, support/resistance, or your own risk management for final exits
Fine-Tuning:
Shorter Length settings (8-10): More responsive, more signals, potentially more noise
Longer Length settings (18-21): Smoother signals, fewer false positives, slower response
Higher Volume Sensitivity: Requires stronger volume confirmation
Lower Overbought/Oversold Levels (±80): More frequent signals
Enable Trend Filter: Reduces signals but improves win rate by trading with trend
Best Practices
Combine with Price Action: Use this indicator to confirm what you're seeing on the price chart, not as a standalone system
Respect the Volume Filter: Low-volume signals are often false moves; the volume confirmation is there for a reason
Don't Chase: Wait for signals at extreme levels; entries in the middle zone tend to whipsaw
Use Multiple Timeframes: Check that momentum aligns across your trading timeframe and a higher timeframe
Backtest Your Settings: Default parameters work well on many instruments, but optimization for your specific market and timeframe can improve results
Technical Details
The indicator normalizes each component to a -50 to +50 range before averaging, ensuring equal weighting regardless of the raw scale differences between Williams %R, Stochastic, MACD, and ROC. The MACD component uses a hyperbolic tangent function for smooth, bounded normalization. Volume weighting applies a logarithmic scale to prevent extreme outliers from dominating the calculation while still capturing genuine volume surges.
davidqqq//@version=5
indicator('CD', overlay=false, max_bars_back=500)
// 输入参数
S = input(12, title='Short EMA Period')
P = input(26, title='Long EMA Period')
M = input(9, title='Signal Line Period')
// 计算DIFF, DEA和MACD值
fastEMA = ta.ema(close, S)
slowEMA = ta.ema(close, P)
DIFF = fastEMA - slowEMA
DEA = ta.ema(DIFF, M)
MACD = (DIFF - DEA) * 2
// 计算N1和MM1
N1 = ta.barssince(ta.crossunder(MACD, 0))
MM1 = ta.barssince(ta.crossover(MACD, 0))
// 确保长度参数大于0
N1_safe = na(N1) ? 1 : math.max(N1 + 1, 1)
MM1_safe = na(MM1) ? 1 : math.max(MM1 + 1, 1)
// 计算CC和DIFL系列值
CC1 = ta.lowest(close, N1_safe)
CC2 = nz(CC1 , CC1)
CC3 = nz(CC2 , CC2)
DIFL1 = ta.lowest(DIFF, N1_safe)
DIFL2 = nz(DIFL1 , DIFL1)
DIFL3 = nz(DIFL2 , DIFL2)
// 计算CH和DIFH系列值
CH1 = ta.highest(close, MM1_safe)
CH2 = nz(CH1 , CH1)
CH3 = nz(CH2 , CH2)
DIFH1 = ta.highest(DIFF, MM1_safe)
DIFH2 = nz(DIFH1 , DIFH1)
DIFH3 = nz(DIFH2 , DIFH2)
// 判断买入条件
AAA = CC1 < CC2 and DIFL1 > DIFL2 and MACD < 0 and DIFF < 0
BBB = CC1 < CC3 and DIFL1 < DIFL2 and DIFL1 > DIFL3 and MACD < 0 and DIFF < 0
CCC = (AAA or BBB) and DIFF < 0
LLL = not CCC and CCC
XXX = AAA and DIFL1 <= DIFL2 and DIFF < DEA or BBB and DIFL1 <= DIFL3 and DIFF < DEA
JJJ = CCC and math.abs(DIFF ) >= math.abs(DIFF) * 1.01
BLBL = JJJ and CCC and math.abs(DIFF ) * 1.01 <= math.abs(DIFF)
DXDX = not JJJ and JJJ
DJGXX = (close < CC2 or close < CC1) and (JJJ or JJJ ) and not LLL and math.sum(JJJ ? 1 : 0, 24) >= 1
DJXX = not(math.sum(DJGXX ? 1 : 0, 2) >= 1) and DJGXX
DXX = (XXX or DJXX) and not CCC
// 判断卖出条件
ZJDBL = CH1 > CH2 and DIFH1 < DIFH2 and MACD > 0 and DIFF > 0
GXDBL = CH1 > CH3 and DIFH1 > DIFH2 and DIFH1 < DIFH3 and MACD > 0 and DIFF > 0
DBBL = (ZJDBL or GXDBL) and DIFF > 0
DBL = not DBBL and DBBL and DIFF > DEA
DBLXS = ZJDBL and DIFH1 >= DIFH2 and DIFF > DEA or GXDBL and DIFH1 >= DIFH3 and DIFF > DEA
DBJG = DBBL and DIFF >= DIFF * 1.01
DBJGXC = not DBJG and DBJG
DBJGBL = DBJG and DBBL and DIFF * 1.01 <= DIFF
ZZZZZ = (close > CH2 or close > CH1) and (DBJG or DBJG ) and not DBL and math.sum(DBJG ? 1 : 0, 23) >= 1
YYYYY = not(math.sum(ZZZZZ ? 1 : 0, 2) >= 1) and ZZZZZ
WWWWW = (DBLXS or YYYYY) and not DBBL
// plot买入和卖出信号
if DXDX
label.new(bar_index, low, text='抄底', style=label.style_label_up, color=color.red, textcolor=color.white, size=size.small)
if DBJGXC
label.new(bar_index, high, text='卖出', style=label.style_label_down, color=color.green, textcolor=color.white, size=size.small)
DAX ORB Ultimate - ALGO Suite//@version=5
indicator("DAX ORB Ultimate - ALGO Suite", overlay=true, max_labels_count=200, max_lines_count=100)
// ═══════════════════════════════════════════════════════════════════════════════
// DAX OPENING RANGE BREAKOUT - ULTIMATE EDITION
// Real-time ORB building | Multi-timeframe support | Key levels with bias
// Works on ANY timeframe - uses M1 data for ORB construction
// ═══════════════════════════════════════════════════════════════════════════════
// ════════════════════════ INPUTS ════════════════════════
orb_start_h = input.int(7, "Start Hour (UTC)", minval=0, maxval=23, group="ORB Settings")
orb_start_m = input.int(40, "Start Minute", minval=0, maxval=59, group="ORB Settings")
orb_end_h = input.int(8, "End Hour (UTC)", minval=0, maxval=23, group="ORB Settings")
orb_end_m = input.int(0, "End Minute", minval=0, maxval=59, group="ORB Settings")
exclude_wicks = input.bool(true, "Exclude Wicks", group="ORB Settings")
close_hour = input.int(16, "Market Close Hour", minval=0, maxval=23, group="ORB Settings")
use_tf = input.bool(true, "1. Trend Following", group="Strategies")
use_mr = input.bool(true, "2. Mean Reversion", group="Strategies")
use_sa = input.bool(true, "3. Statistical Arb", group="Strategies")
use_mm = input.bool(true, "4. Market Making", group="Strategies")
use_ba = input.bool(true, "5. Basis Arb", group="Strategies")
use_ema = input.bool(true, "EMA Filter", group="Technical Filters")
use_rsi = input.bool(true, "RSI Filter", group="Technical Filters")
use_macd = input.bool(true, "MACD Filter", group="Technical Filters")
use_vol = input.bool(true, "Volume Filter", group="Technical Filters")
use_bb = input.bool(true, "Bollinger Filter", group="Technical Filters")
use_fixed = input.bool(false, "Fixed SL/TP", group="Risk Management")
fixed_sl = input.float(50, "Fixed SL Points", minval=10, group="Risk Management")
fixed_tp = input.float(150, "Fixed TP Points", minval=10, group="Risk Management")
atr_sl = input.float(2.0, "ATR SL Mult", minval=0.5, group="Risk Management")
atr_tp = input.float(3.0, "ATR TP Mult", minval=0.5, group="Risk Management")
min_rr = input.float(2.0, "Min R:R", minval=1.0, group="Risk Management")
show_dash = input.bool(true, "Show Dashboard", group="Display")
show_lines = input.bool(true, "Show Lines", group="Display")
show_levels = input.bool(true, "Show Key Levels", group="Display")
// ════════════════════════ FUNCTIONS ════════════════════════
is_orb_period(_h, _m) =>
start = orb_start_h * 60 + orb_start_m
end = orb_end_h * 60 + orb_end_m
curr = _h * 60 + _m
curr >= start and curr < end
orb_ended(_h, _m) =>
end = orb_end_h * 60 + orb_end_m
curr = _h * 60 + _m
curr == end
is_market_open() =>
h = hour(time)
h >= orb_start_h and h <= close_hour
// ════════════════════════ DATA GATHERING (M1) ════════════════════════
// Get M1 data for ORB construction (works on ANY chart timeframe)
= request.security(syminfo.tickerid, "1", , barmerge.gaps_off, barmerge.lookahead_off)
// Daily data
d_high = request.security(syminfo.tickerid, "D", high, barmerge.gaps_off, barmerge.lookahead_on)
d_low = request.security(syminfo.tickerid, "D", low, barmerge.gaps_off, barmerge.lookahead_on)
d_open = request.security(syminfo.tickerid, "D", open, barmerge.gaps_off, barmerge.lookahead_on)
// Current day high/low (intraday)
var float today_high = na
var float today_low = na
var float prev_day_high = na
var float prev_day_low = na
var float yest_size = 0
if ta.change(time("D")) != 0
prev_day_high := d_high
prev_day_low := d_low
yest_size := d_high - d_low
today_high := high
today_low := low
else
today_high := math.max(na(today_high) ? high : today_high, high)
today_low := math.min(na(today_low) ? low : today_low, low)
// ════════════════════════ ORB CONSTRUCTION (REAL-TIME) ════════════════════════
var float orb_h = na
var float orb_l = na
var bool orb_ready = false
var float orb_building_h = na
var float orb_building_l = na
var bool is_building = false
// Get M1 bar time components
m1_hour = hour(m1_time)
m1_minute = minute(m1_time)
// Reset daily
if ta.change(time("D")) != 0
orb_h := na
orb_l := na
orb_ready := false
orb_building_h := na
orb_building_l := na
is_building := false
// Build ORB using M1 data
if is_orb_period(m1_hour, m1_minute) and not orb_ready
is_building := true
val_h = exclude_wicks ? m1_close : m1_high
val_l = exclude_wicks ? m1_close : m1_low
if na(orb_building_h)
orb_building_h := val_h
orb_building_l := val_l
else
orb_building_h := math.max(orb_building_h, val_h)
orb_building_l := math.min(orb_building_l, val_l)
// FIX #1: Set is_building to false when NOT in ORB period anymore
if not is_orb_period(m1_hour, m1_minute) and is_building and not orb_ready
is_building := false
// Finalize ORB when period ends
if orb_ended(m1_hour, m1_minute) and not orb_ready
orb_h := orb_building_h
orb_l := orb_building_l
orb_ready := true
is_building := false
// Display building values in real-time
current_orb_h = is_building ? orb_building_h : orb_h
current_orb_l = is_building ? orb_building_l : orb_l
// ════════════════════════ INDICATORS ════════════════════════
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
rsi = ta.rsi(close, 14)
= ta.macd(close, 12, 26, 9)
= ta.bb(close, 20, 2)
atr = ta.atr(14)
vol_ma = ta.sma(volume, 20)
// ════════════════════════ STRATEGY SIGNALS ════════════════════════
// 1. Trend Following
tf_short = ta.sma(close, 10)
tf_long = ta.sma(close, 30)
tf_bull = tf_short > tf_long
tf_bear = tf_short < tf_long
// 2. Mean Reversion
mr_mean = ta.sma(close, 20)
mr_dev = (close - mr_mean) / mr_mean * 100
mr_bull = mr_dev <= -0.5
mr_bear = mr_dev >= 0.5
// 3. Statistical Arb
sa_mean = ta.sma(close, 120)
sa_std = ta.stdev(close, 120)
sa_z = sa_std > 0 ? (close - sa_mean) / sa_std : 0
var string sa_st = "flat"
if sa_st == "flat"
if sa_z <= -2.0
sa_st := "long"
else if sa_z >= 2.0
sa_st := "short"
else if math.abs(sa_z) <= 0.5 or math.abs(sa_z) >= 4.0
sa_st := "flat"
sa_bull = sa_st == "long"
sa_bear = sa_st == "short"
// 4. Market Making
mm_spread = (high - low) / close * 100
mm_mid = (high + low) / 2
mm_bull = close < mm_mid and mm_spread >= 0.5
mm_bear = close > mm_mid and mm_spread >= 0.5
// 5. Basis Arb
ba_fair = ta.sma(close, 50)
ba_bps = ba_fair != 0 ? (close - ba_fair) / ba_fair * 10000 : 0
ba_bull = ba_bps <= -8.0
ba_bear = ba_bps >= 8.0
// Vote counting
bull_v = 0
bear_v = 0
if use_tf
bull_v := bull_v + (tf_bull ? 1 : 0)
bear_v := bear_v + (tf_bear ? 1 : 0)
if use_mr
bull_v := bull_v + (mr_bull ? 1 : 0)
bear_v := bear_v + (mr_bear ? 1 : 0)
if use_sa
bull_v := bull_v + (sa_bull ? 1 : 0)
bear_v := bear_v + (sa_bear ? 1 : 0)
if use_mm
bull_v := bull_v + (mm_bull ? 1 : 0)
bear_v := bear_v + (mm_bear ? 1 : 0)
if use_ba
bull_v := bull_v + (ba_bull ? 1 : 0)
bear_v := bear_v + (ba_bear ? 1 : 0)
// Technical filters - Simplified scoring system
ema_ok_b = not use_ema or (ema9 > ema21 and close > ema50)
ema_ok_s = not use_ema or (ema9 < ema21 and close < ema50)
rsi_ok_b = not use_rsi or (rsi > 40 and rsi < 80) // More lenient
rsi_ok_s = not use_rsi or (rsi < 60 and rsi > 20) // More lenient
macd_ok_b = not use_macd or macd > sig
macd_ok_s = not use_macd or macd < sig
vol_ok = not use_vol or volume > vol_ma * 1.2 // More lenient
bb_ok_b = not use_bb or close > bb_mid
bb_ok_s = not use_bb or close < bb_mid
// Technical score (need at least 2 out of 5 filters)
tech_score_b = (ema_ok_b ? 1 : 0) + (rsi_ok_b ? 1 : 0) + (macd_ok_b ? 1 : 0) + (bb_ok_b ? 1 : 0) + (vol_ok ? 1 : 0)
tech_score_s = (ema_ok_s ? 1 : 0) + (rsi_ok_s ? 1 : 0) + (macd_ok_s ? 1 : 0) + (bb_ok_s ? 1 : 0) + (vol_ok ? 1 : 0)
tech_bull = tech_score_b >= 2
tech_bear = tech_score_s >= 2
// Breakout - SIMPLIFIED (just need close above/below ORB)
brk_bull = orb_ready and close > current_orb_h
brk_bear = orb_ready and close < current_orb_l
// Consensus - At least 2 strategies agree (not majority)
total_st = (use_tf ? 1 : 0) + (use_mr ? 1 : 0) + (use_sa ? 1 : 0) + (use_mm ? 1 : 0) + (use_ba ? 1 : 0)
consensus_b = bull_v >= 2
consensus_s = bear_v >= 2
// Final signals - MUCH MORE LENIENT
daily_ok = yest_size >= 50 // Reduced from 100
buy = brk_bull and consensus_b and tech_bull and is_market_open()
sell = brk_bear and consensus_s and tech_bear and is_market_open()
// ════════════════════════ SL/TP ════════════════════════
// IMMEDIATE SL/TP LEVELS - Calculated as soon as ORB is ready (at 8:00)
var float long_entry = na
var float long_sl = na
var float long_tp = na
var float short_entry = na
var float short_sl = na
var float short_tp = na
// Calculate potential levels immediately when ORB is ready
if orb_ready and not na(orb_h) and not na(orb_l)
// Long scenario: Entry at ORB high breakout
long_entry := orb_h
long_sl := use_fixed ? long_entry - fixed_sl : long_entry - atr * atr_sl
long_tp := use_fixed ? long_entry + fixed_tp : long_entry + atr * atr_tp
// Short scenario: Entry at ORB low breakout
short_entry := orb_l
short_sl := use_fixed ? short_entry + fixed_sl : short_entry + atr * atr_sl
short_tp := use_fixed ? short_entry - fixed_tp : short_entry - atr * atr_tp
// Signal-based entry tracking (for dashboard and alerts)
var float buy_entry = na
var float buy_sl = na
var float buy_tp = na
var float sell_entry = na
var float sell_sl = na
var float sell_tp = na
if buy
buy_entry := close
buy_sl := use_fixed ? buy_entry - fixed_sl : buy_entry - atr * atr_sl
buy_tp := use_fixed ? buy_entry + fixed_tp : buy_entry + atr * atr_tp
if sell
sell_entry := close
sell_sl := use_fixed ? sell_entry + fixed_sl : sell_entry + atr * atr_sl
sell_tp := use_fixed ? sell_entry - fixed_tp : sell_entry - atr * atr_tp
buy_rr = not na(buy_entry) ? (buy_tp - buy_entry) / (buy_entry - buy_sl) : 0
sell_rr = not na(sell_entry) ? (sell_entry - sell_tp) / (sell_sl - sell_entry) : 0
buy_final = buy and buy_rr >= min_rr
sell_final = sell and sell_rr >= min_rr
// ════════════════════════ TRAILING STOPS ════════════════════════
// Trailing Stop Loss and Take Profit Management
var float trailing_sl_long = na
var float trailing_sl_short = na
var float trailing_tp_long = na
var float trailing_tp_short = na
var bool in_long = false
var bool in_short = false
var float highest_since_entry = na
var float lowest_since_entry = na
// Enter long position
if buy_final and not in_long
in_long := true
in_short := false
trailing_sl_long := buy_sl
trailing_tp_long := buy_tp
highest_since_entry := close
// Enter short position
if sell_final and not in_short
in_short := true
in_long := false
trailing_sl_short := sell_sl
trailing_tp_short := sell_tp
lowest_since_entry := close
// Update trailing stops for LONG
if in_long
// Track highest price since entry
highest_since_entry := math.max(highest_since_entry, high)
// Trail stop loss (moves up as price moves up)
// When price moves 1 ATR in profit, move SL to breakeven
// When price moves 2 ATR in profit, move SL to +1 ATR
profit_atr = (highest_since_entry - buy_entry) / atr
if profit_atr >= 2.0
trailing_sl_long := math.max(trailing_sl_long, buy_entry + atr * 1.0)
else if profit_atr >= 1.0
trailing_sl_long := math.max(trailing_sl_long, buy_entry)
// Smart trailing TP - extends TP if strong momentum
if highest_since_entry > trailing_tp_long * 0.9 and rsi > 60 // Within 10% of TP and strong momentum
trailing_tp_long := trailing_tp_long + atr * 0.5 // Extend TP
// Exit conditions
if close <= trailing_sl_long or close >= trailing_tp_long
in_long := false
trailing_sl_long := na
trailing_tp_long := na
highest_since_entry := na
// Update trailing stops for SHORT
if in_short
// Track lowest price since entry
lowest_since_entry := math.min(lowest_since_entry, low)
// Trail stop loss (moves down as price moves down)
profit_atr = (sell_entry - lowest_since_entry) / atr
if profit_atr >= 2.0
trailing_sl_short := math.min(trailing_sl_short, sell_entry - atr * 1.0)
else if profit_atr >= 1.0
trailing_sl_short := math.min(trailing_sl_short, sell_entry)
// Smart trailing TP - extends TP if strong momentum
if lowest_since_entry < trailing_tp_short * 1.1 and rsi < 40 // Within 10% of TP and strong momentum
trailing_tp_short := trailing_tp_short - atr * 0.5 // Extend TP
// Exit conditions
if close >= trailing_sl_short or close <= trailing_tp_short
in_short := false
trailing_sl_short := na
trailing_tp_short := na
lowest_since_entry := na
// ════════════════════════ ANALYTICS ════════════════════════
prob_strat = total_st > 0 ? math.max(bull_v, bear_v) / total_st * 100 : 50
prob_tech = (tech_bull or tech_bear) ? 75 : 35
prob_vol = vol_ok ? 85 : 50
prob_daily = daily_ok ? 85 : 30
prob_orb = orb_ready ? 80 : 20
probability = prob_strat * 0.3 + prob_tech * 0.25 + prob_vol * 0.15 + prob_daily * 0.15 + prob_orb * 0.15
dir_score = 0
dir_score := dir_score + (ema9 > ema21 ? 2 : -2)
dir_score := dir_score + (tf_bull ? 2 : -2)
dir_score := dir_score + (macd > sig ? 1 : -1)
dir_score := dir_score + (rsi > 50 ? 1 : -1)
direction = dir_score >= 2 ? "STRONG BULL" : (dir_score > 0 ? "BULL" : (dir_score <= -2 ? "STRONG BEAR" : (dir_score < 0 ? "BEAR" : "NEUTRAL")))
clean_trend = math.abs(ema9 - ema21) / close * 100
clean_noise = atr / close * 100
clean_struct = close > ema9 and close > ema21 and close > ema50 or close < ema9 and close < ema21 and close < ema50
clean_score = (clean_trend > 0.5 ? 30 : 10) + (clean_noise < 1.5 ? 30 : 10) + (clean_struct ? 40 : 10)
quality = clean_score >= 70 ? "CLEAN" : (clean_score >= 50 ? "GOOD" : (clean_score >= 30 ? "OK" : "CHOPPY"))
mom = ta.mom(close, 10)
mom_str = math.abs(mom) / close * 100
vol_rat = atr / ta.sma(atr, 20)
movement = buy_final or sell_final ? (mom_str > 0.8 and vol_rat > 1.3 ? "STRONG" : (mom_str > 0.5 ? "MODERATE" : "GRADUAL")) : "WAIT"
ok_score = (daily_ok ? 25 : 0) + (orb_ready ? 25 : 0) + (is_market_open() ? 20 : 0) + (clean_score >= 50 ? 20 : 5) + (probability >= 60 ? 10 : 0)
ok_trade = ok_score >= 65
// ════════════════════════ KEY LEVELS WITH BIAS ════════════════════════
// Calculate potential reaction levels with directional bias
var float key_levels = array.new_float(0)
var string key_bias = array.new_string(0)
if barstate.islast and show_levels
array.clear(key_levels)
array.clear(key_bias)
// Add levels with bias
if not na(current_orb_h)
array.push(key_levels, current_orb_h)
array.push(key_bias, consensus_b ? "BULL BREAK" : "RESISTANCE")
if not na(current_orb_l)
array.push(key_levels, current_orb_l)
array.push(key_bias, consensus_s ? "BEAR BREAK" : "SUPPORT")
if not na(prev_day_high)
array.push(key_levels, prev_day_high)
bias_pdh = close > prev_day_high ? "BULLISH" : (close < prev_day_high and close > prev_day_high * 0.995 ? "WATCH" : "RESIST")
array.push(key_bias, bias_pdh)
if not na(prev_day_low)
array.push(key_levels, prev_day_low)
bias_pdl = close < prev_day_low ? "BEARISH" : (close > prev_day_low and close < prev_day_low * 1.005 ? "WATCH" : "SUPPORT")
array.push(key_bias, bias_pdl)
if not na(today_high)
array.push(key_levels, today_high)
array.push(key_bias, "TODAY HIGH")
if not na(today_low)
array.push(key_levels, today_low)
array.push(key_bias, "TODAY LOW")
// Add EMA50 as dynamic level
array.push(key_levels, ema50)
ema_bias = close > ema50 ? "BULL SUPPORT" : "BEAR RESIST"
array.push(key_bias, ema_bias)
// ════════════════════════ VISUALS ════════════════════════
// Previous day lines
plot(show_lines ? prev_day_high : na, "Prev Day H", color.new(color.yellow, 0), 1, plot.style_line)
plot(show_lines ? prev_day_low : na, "Prev Day L", color.new(color.orange, 0), 1, plot.style_line)
// Current day high/low
plot(show_lines ? today_high : na, "Today High", color.new(color.lime, 40), 2, plot.style_circles)
plot(show_lines ? today_low : na, "Today Low", color.new(color.red, 40), 2, plot.style_circles)
// ORB lines (show building values in real-time with separate plots)
// Building phase - circles (orange during building)
plot(show_lines and is_building and not na(current_orb_h) ? current_orb_h : na, "ORB High Building", color.new(color.orange, 30), 3, plot.style_circles)
plot(show_lines and is_building and not na(current_orb_l) ? current_orb_l : na, "ORB Low Building", color.new(color.orange, 30), 3, plot.style_circles)
// Ready phase - ULTRA BRIGHT solid lines
plot(show_lines and not is_building and not na(current_orb_h) ? current_orb_h : na, "ORB High Ready", color.new(color.aqua, 0), 4, plot.style_line)
plot(show_lines and not is_building and not na(current_orb_l) ? current_orb_l : na, "ORB Low Ready", color.new(color.aqua, 0), 4, plot.style_line)
// ORB zone fill
p1 = plot(not na(current_orb_h) ? current_orb_h : na, display=display.none)
p2 = plot(not na(current_orb_l) ? current_orb_l : na, display=display.none)
fill_color = is_building ? color.new(color.blue, 93) : color.new(color.blue, 88)
fill(p1, p2, fill_color, title="ORB Zone")
// FIX #2: Draw ORB rectangle box ONLY ONCE when ready (use var to track if already drawn)
var box orb_box = na
var int orb_start_bar = na
var bool orb_box_drawn = false
// Reset box drawn flag on new day
if ta.change(time("D")) != 0
orb_box_drawn := false
// Capture the bar when ORB becomes ready
if orb_ready and not orb_ready
orb_start_bar := bar_index
orb_box_drawn := false // Allow new box to be drawn
// Draw box ONLY ONCE when ORB first becomes ready
if orb_ready and not orb_box_drawn and not na(orb_h) and not na(orb_l) and show_lines
if not na(orb_box)
box.delete(orb_box)
// Ultra clear rectangle with thick bright borders
box_color = color.new(color.aqua, 85) // Bright aqua fill
border_color = color.new(color.aqua, 0) // Solid bright aqua border
orb_box := box.new(orb_start_bar, orb_h, bar_index + 50, orb_l,
border_color=border_color,
border_width=3, // Thicker border
bgcolor=box_color,
extend=extend.right,
text="ORB ZONE",
text_size=size.normal, // Larger text
text_color=color.new(color.aqua, 0)) // Bright text
orb_box_drawn := true
// Update box right edge on each bar (without creating new box)
if orb_box_drawn and not na(orb_box) and show_lines
box.set_right(orb_box, bar_index)
// EMAs
plot(use_ema ? ema9 : na, "EMA9", color.new(color.blue, 20), 1)
plot(use_ema ? ema21 : na, "EMA21", color.new(color.orange, 20), 1)
plot(use_ema ? ema50 : na, "EMA50", color.new(color.purple, 30), 2)
// Signals
plotshape(buy_final, "BUY", shape.triangleup, location.belowbar, color.new(color.lime, 0), size=size.small, text="BUY")
plotshape(sell_final, "SELL", shape.triangledown, location.abovebar, color.new(color.red, 0), size=size.small, text="SELL")
// Exit signals
plotshape(in_long and not in_long, "EXIT LONG", shape.xcross, location.abovebar, color.new(color.orange, 0), size=size.tiny, text="EXIT")
plotshape(in_short and not in_short, "EXIT SHORT", shape.xcross, location.belowbar, color.new(color.orange, 0), size=size.tiny, text="EXIT")
// Trailing stop lines
plot(in_long and not na(trailing_sl_long) ? trailing_sl_long : na, "Trail SL Long", color.new(color.red, 0), 2, plot.style_cross)
plot(in_long and not na(trailing_tp_long) ? trailing_tp_long : na, "Trail TP Long", color.new(color.lime, 0), 2, plot.style_cross)
plot(in_short and not na(trailing_sl_short) ? trailing_sl_short : na, "Trail SL Short", color.new(color.red, 0), 2, plot.style_cross)
plot(in_short and not na(trailing_tp_short) ? trailing_tp_short : na, "Trail TP Short", color.new(color.lime, 0), 2, plot.style_cross)
// FIX #3: IMMEDIATE SL/TP LINES - Draw ONLY ONCE when ORB is ready
var line long_sl_ln = na
var line long_tp_ln = na
var line short_sl_ln = na
var line short_tp_ln = na
var label long_sl_lbl = na
var label long_tp_lbl = na
var label short_sl_lbl = na
var label short_tp_lbl = na
var bool sltp_lines_drawn = false
// Reset lines drawn flag on new day
if ta.change(time("D")) != 0
sltp_lines_drawn := false
// Draw lines ONLY ONCE when ORB first becomes ready
if orb_ready and not orb_ready and show_lines
sltp_lines_drawn := false // Allow new lines to be drawn
if orb_ready and not sltp_lines_drawn and show_lines
// Delete old lines
if not na(long_sl_ln)
line.delete(long_sl_ln)
line.delete(long_tp_ln)
line.delete(short_sl_ln)
line.delete(short_tp_ln)
label.delete(long_sl_lbl)
label.delete(long_tp_lbl)
label.delete(short_sl_lbl)
label.delete(short_tp_lbl)
// LONG scenario (green - bullish breakout above ORB high)
if not na(long_sl) and not na(long_tp)
long_sl_ln := line.new(bar_index, long_sl, bar_index + 100, long_sl, color=color.new(color.red, 0), width=2, style=line.style_solid, extend=extend.right)
long_tp_ln := line.new(bar_index, long_tp, bar_index + 100, long_tp, color=color.new(color.lime, 0), width=2, style=line.style_solid, extend=extend.right)
long_sl_lbl := label.new(bar_index, long_sl, "LONG SL: " + str.tostring(long_sl, "#.##"), style=label.style_label_left, color=color.new(color.red, 0), textcolor=color.white, size=size.small)
long_tp_lbl := label.new(bar_index, long_tp, "LONG TP: " + str.tostring(long_tp, "#.##"), style=label.style_label_left, color=color.new(color.lime, 0), textcolor=color.black, size=size.small)
// SHORT scenario (red - bearish breakout below ORB low)
if not na(short_sl) and not na(short_tp)
short_sl_ln := line.new(bar_index, short_sl, bar_index + 100, short_sl, color=color.new(color.red, 0), width=2, style=line.style_solid, extend=extend.right)
short_tp_ln := line.new(bar_index, short_tp, bar_index + 100, short_tp, color=color.new(color.lime, 0), width=2, style=line.style_solid, extend=extend.right)
short_sl_lbl := label.new(bar_index, short_sl, "SHORT SL: " + str.tostring(short_sl, "#.##"), style=label.style_label_left, color=color.new(color.red, 0), textcolor=color.white, size=size.small)
short_tp_lbl := label.new(bar_index, short_tp, "SHORT TP: " + str.tostring(short_tp, "#.##"), style=label.style_label_left, color=color.new(color.lime, 0), textcolor=color.black, size=size.small)
sltp_lines_drawn := true
// FIX #4: Key level labels - Track and delete old labels to prevent duplication
var label key_level_labels = array.new_label(0)
// Delete all old key level labels
if array.size(key_level_labels) > 0
for i = 0 to array.size(key_level_labels) - 1
label.delete(array.get(key_level_labels, i))
array.clear(key_level_labels)
// Create key level labels only on last bar
if barstate.islast and show_levels and array.size(key_levels) > 0
for i = 0 to array.size(key_levels) - 1
lvl = array.get(key_levels, i)
bias = array.get(key_bias, i)
// Color based on bias
lbl_color = str.contains(bias, "BULL") ? color.new(color.green, 70) : (str.contains(bias, "BEAR") ? color.new(color.red, 70) : (str.contains(bias, "SUPPORT") ? color.new(color.blue, 70) : (str.contains(bias, "RESIST") ? color.new(color.orange, 70) : color.new(color.gray, 70))))
txt_color = str.contains(bias, "BULL") ? color.green : (str.contains(bias, "BEAR") ? color.red : (str.contains(bias, "SUPPORT") ? color.blue : (str.contains(bias, "RESIST") ? color.orange : color.gray)))
new_lbl = label.new(bar_index + 2, lvl, str.tostring(lvl, "#.##") + "\n" + bias, style=label.style_label_left, color=lbl_color, textcolor=txt_color, size=size.tiny, textalign=text.align_left)
array.push(key_level_labels, new_lbl)
// FIX #5: Compact chart info labels - Track and delete to prevent duplication
var label prob_label = na
var label dir_label = na
if barstate.islast and show_lines
// Delete old labels
if not na(prob_label)
label.delete(prob_label)
if not na(dir_label)
label.delete(dir_label)
// Create new labels
prob_c = probability >= 70 ? color.green : (probability >= 50 ? color.yellow : color.red)
prob_label := label.new(bar_index, high + atr * 1.2, str.tostring(probability, "#") + "%", style=label.style_none, textcolor=prob_c, size=size.small)
dir_c = str.contains(direction, "BULL") ? color.green : (str.contains(direction, "BEAR") ? color.red : color.gray)
dir_label := label.new(bar_index, high + atr * 2, direction, style=label.style_none, textcolor=dir_c, size=size.tiny)
// ════════════════════════ DASHBOARD ════════════════════════
var table dash = table.new(position.top_right, 2, 20, bgcolor=color.new(color.black, 5), border_width=1, border_color=color.new(color.gray, 60))
if barstate.islast and show_dash
r = 0
// Header
table.cell(dash, 0, r, "DAX ORB ULTIMATE", text_color=color.white, bgcolor=color.new(color.blue, 30), text_size=size.small)
table.cell(dash, 1, r, timeframe.period, text_color=color.yellow, bgcolor=color.new(color.blue, 30), text_size=size.tiny)
// Current Day
r += 1
table.cell(dash, 0, r, "TODAY H/L", text_color=color.aqua, text_size=size.tiny)
table.cell(dash, 1, r, "", text_color=color.white)
r += 1
table.cell(dash, 0, r, "High", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(today_high, "#.##"), text_color=color.lime, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Low", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(today_low, "#.##"), text_color=color.red, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Range", text_color=color.gray, text_size=size.tiny)
today_range = today_high - today_low
table.cell(dash, 1, r, str.tostring(today_range, "#") + "p", text_color=color.aqua, text_size=size.tiny)
// Previous Day
r += 1
table.cell(dash, 0, r, "PREV H/L", text_color=color.aqua, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(yest_size, "#") + "p", text_color=daily_ok ? color.lime : color.red, text_size=size.tiny)
// ORB Status with real-time values
r += 1
table.cell(dash, 0, r, "ORB 7:40-8:00", text_color=color.aqua, text_size=size.tiny)
orb_status = is_building ? "BUILDING" : (orb_ready ? "READY" : "WAIT")
orb_clr = is_building ? color.orange : (orb_ready ? color.lime : color.gray)
table.cell(dash, 1, r, orb_status, text_color=orb_clr, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "High", text_color=color.gray, text_size=size.tiny)
orb_h_txt = not na(current_orb_h) ? str.tostring(current_orb_h, "#.##") : "---"
table.cell(dash, 1, r, orb_h_txt, text_color=is_building ? color.orange : color.green, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Low", text_color=color.gray, text_size=size.tiny)
orb_l_txt = not na(current_orb_l) ? str.tostring(current_orb_l, "#.##") : "---"
table.cell(dash, 1, r, orb_l_txt, text_color=is_building ? color.orange : color.red, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Size", text_color=color.gray, text_size=size.tiny)
orb_size = not na(current_orb_h) and not na(current_orb_l) ? current_orb_h - current_orb_l : 0
table.cell(dash, 1, r, str.tostring(orb_size, "#") + "p", text_color=color.yellow, text_size=size.tiny)
// Strategies
r += 1
table.cell(dash, 0, r, "STRATEGIES", text_color=color.aqua, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(bull_v) + "B " + str.tostring(bear_v) + "S", text_color=color.yellow, text_size=size.tiny)
// Analytics
r += 1
table.cell(dash, 0, r, "PROBABILITY", text_color=color.white, bgcolor=color.new(color.purple, 70), text_size=size.small)
prob_c = probability >= 70 ? color.lime : (probability >= 50 ? color.yellow : color.red)
table.cell(dash, 1, r, str.tostring(probability, "#") + "%", text_color=prob_c, bgcolor=color.new(color.purple, 70), text_size=size.small)
r += 1
table.cell(dash, 0, r, "Direction", text_color=color.gray, text_size=size.tiny)
dir_c = str.contains(direction, "BULL") ? color.lime : (str.contains(direction, "BEAR") ? color.red : color.gray)
table.cell(dash, 1, r, direction, text_color=dir_c, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Chart", text_color=color.gray, text_size=size.tiny)
qual_c = quality == "CLEAN" ? color.lime : (quality == "GOOD" ? color.green : (quality == "OK" ? color.yellow : color.red))
table.cell(dash, 1, r, quality, text_color=qual_c, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "OK Trade?", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, ok_trade ? "YES" : "NO", text_color=ok_trade ? color.lime : color.red, text_size=size.tiny)
// Position Status
r += 1
pos_txt = in_long ? "IN LONG" : (in_short ? "IN SHORT" : "NO POSITION")
pos_c = in_long ? color.lime : (in_short ? color.red : color.gray)
table.cell(dash, 0, r, "POSITION", text_color=color.white, bgcolor=color.new(color.blue, 50), text_size=size.small)
table.cell(dash, 1, r, pos_txt, text_color=pos_c, bgcolor=color.new(color.blue, 50), text_size=size.small)
// Show trailing stops if in position
if in_long and not na(trailing_sl_long)
r += 1
table.cell(dash, 0, r, "Trail SL", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(trailing_sl_long, "#.##"), text_color=color.red, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Trail TP", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(trailing_tp_long, "#.##"), text_color=color.lime, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Profit", text_color=color.gray, text_size=size.tiny)
pnl = close - buy_entry
pnl_c = pnl > 0 ? color.lime : color.red
table.cell(dash, 1, r, str.tostring(pnl, "#.#") + "p", text_color=pnl_c, text_size=size.tiny)
if in_short and not na(trailing_sl_short)
r += 1
table.cell(dash, 0, r, "Trail SL", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(trailing_sl_short, "#.##"), text_color=color.red, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Trail TP", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(trailing_tp_short, "#.##"), text_color=color.lime, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "Profit", text_color=color.gray, text_size=size.tiny)
pnl = sell_entry - close
pnl_c = pnl > 0 ? color.lime : color.red
table.cell(dash, 1, r, str.tostring(pnl, "#.#") + "p", text_color=pnl_c, text_size=size.tiny)
// Signal
r += 1
table.cell(dash, 0, r, "SIGNAL", text_color=color.white, bgcolor=color.new(color.green, 50), text_size=size.small)
sig_txt = buy_final ? "BUY NOW" : (sell_final ? "SELL NOW" : "WAIT")
sig_c = buy_final ? color.lime : (sell_final ? color.red : color.gray)
table.cell(dash, 1, r, sig_txt, text_color=sig_c, bgcolor=color.new(color.green, 50), text_size=size.small)
// IMMEDIATE Trade Levels - Show as soon as ORB is ready
if orb_ready and not na(long_entry) and not na(short_entry)
r += 1
table.cell(dash, 0, r, "LONG LEVELS", text_color=color.lime, bgcolor=color.new(color.green, 70), text_size=size.tiny)
table.cell(dash, 1, r, "", text_color=color.white)
r += 1
table.cell(dash, 0, r, "Entry", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(long_entry, "#.##"), text_color=color.white, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "SL", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(long_sl, "#.##"), text_color=color.red, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "TP", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(long_tp, "#.##"), text_color=color.lime, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "SHORT LEVELS", text_color=color.red, bgcolor=color.new(color.red, 70), text_size=size.tiny)
table.cell(dash, 1, r, "", text_color=color.white)
r += 1
table.cell(dash, 0, r, "Entry", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(short_entry, "#.##"), text_color=color.white, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "SL", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(short_sl, "#.##"), text_color=color.red, text_size=size.tiny)
r += 1
table.cell(dash, 0, r, "TP", text_color=color.gray, text_size=size.tiny)
table.cell(dash, 1, r, str.tostring(short_tp, "#.##"), text_color=color.lime, text_size=size.tiny)
// ════════════════════════ ALERTS ════════════════════════
alertcondition(buy_final, "BUY Signal", "DAX ORB BUY")
alertcondition(sell_final, "SELL Signal", "DAX ORB SELL")
alertcondition(orb_ready and not orb_ready , "ORB Ready", "DAX ORB READY")
alertcondition(is_building and not is_building , "ORB Building", "DAX ORB BUILDING")
alertcondition(ok_trade and not ok_trade , "Ready to Trade", "DAX OK")
Fat Tony's Composite Momentum + ROC (v0.4)Fat Tony's Composite Momentum + ROC Indicator
Overview
Fat Tony's Composite Momentum + ROC is a sophisticated momentum oscillator that combines multiple technical indicators into a single, volume-weighted signal. This indicator helps traders identify overbought/oversold conditions and potential reversal points by synthesizing Williams %R, Stochastic, MACD, and Rate of Change (ROC) into one composite reading.
Key Features
Multi-Indicator Composite: Combines Williams %R, Stochastic %K, MACD Histogram, and ROC for a comprehensive momentum view
Volume Weighting: Optional volume-based amplification to filter out low-conviction moves
Volume Filter: Requires minimum volume threshold (last 2 bars combined) before triggering signals
Adaptive MACD Scaling: Uses tanh normalization to keep MACD contribution proportional regardless of price volatility
Clear Visual Signals: Triangle markers appear only when crossing extreme levels with sufficient volume
Customizable Thresholds: Adjust overbought/oversold levels, volume sensitivity, and component lengths
How It Works
The indicator normalizes each component to a ±50 scale, then averages them together. The composite reading oscillates around zero, with positive values indicating bullish momentum and negative values indicating bearish momentum.
Signal Generation:
🟢 Rebound Watch (Green Triangle): Fires when the composite crosses UP through the oversold level with adequate volume
🔴 Fade Watch (Red Triangle): Fires when the composite crosses DOWN through the overbought level with adequate volume
Customizing Settings
After adding to your chart, click the gear icon next to the indicator name to access settings:
Length: Base period for Williams %R and Stochastic (default: 14)
MACD Fast/Slow/Signal: Standard MACD parameters (default: 12/26/9)
Overbought/Oversold Levels: Threshold values for signals (default: ±100)
Use Volume Weighting: Toggle volume amplification on/off
Volume Sensitivity: Multiplier for volume weighting (default: 1.5)
Include ROC: Toggle Rate of Change component on/off
ROC Length: Lookback period for ROC calculation (default: 10)
Minimum Volume: Required volume (sum of last 2 bars) for signals to trigger (default: 50,000)
Usage Tips
Works best on liquid instruments with consistent volume
Lower timeframes (5m-15m) benefit from higher minimum volume settings
Volume weighting helps filter out noise during consolidation periods
Watch for signal triangles at key support/resistance levels for highest probability setups
The indicator works as a momentum gauge and reversal spotter - not an entry system by itself
Alerts
The indicator includes built-in alert conditions:
Click the "⏰" (alarm clock) icon on your chart
Select "Fat Tony's Composite Momentum + ROC"
Choose "Rebound Watch" or "Fade Watch"
Configure your notification preferences
Adil Hoca - US Market Score Only NasdaqMarket Score & Crash Detector Indicator
User Guide & Usage Instructions
This TradingView indicator provides a comprehensive market risk assessment, combining multiple financial metrics to detect potential market crashes, recessions, and overall trend regimes. It is especially designed to alert traders and investors about early warning signals before significant market downturns, enabling proactive decision-making.
Key Features
Multi-Metric Market Sentiment: Uses volatility indices, currency strength, yield spreads, breadth, and bond ratios to evaluate market health.
Crash Detection System: Monitors various conditions such as VIX spikes, breadth collapse, momentum cliffs, high-yield spread surges, and hidden market weaknesses.
Reccession Indicator: Incorporates the Sahm Rule, a proven recession indicator based on employment data.
Alert System: Sends real-time alerts for critical market conditions, including crashes, recession signals, and spreads alerts.
Visual Elements: Includes histograms, trend lines, threshold lines, and shape signals to visually interpret market states.
Customizable Parameters: Adjust weights, sensitivity, thresholds, and alert preferences to suit your trading style.
How it Works
1. Data Collection
The indicator fetches data from multiple sources:
Market volatility: VIX index
Currency strength: DXY index
Interest rates: SOFR, PCE inflation
Yield spreads: High Yield Credit Spread, Investment Grade Spread
Market Breadth: Ratio of QQQ to TLT (tech vs. bonds)
Bond Ratios: TMF/TMV (long-term bonds)
Employment Data: The Sahm Rule (monthly unemployment data)
2. Normalization
Data is normalized via z-score calculations over defined periods to standardize the metrics, making them comparable regardless of their original scale.
3. Composite Score Calculation
Each metric is weighted according to user-defined parameters, and a composite score is generated to represent the overall market sentiment, smoothed with an EMA for trend clarity.
4. Crash & Recession Detection
Crash System: Looks for conditions like VIX spikes, breadth collapse, momentum drops, high yield spread surges, and hidden weaknesses. If multiple conditions meet thresholds, alerts trigger.
Recession Indicator: Uses the Sahm Rule, which compares the current unemployment rate's three-month average to the lowest point over the past 12 months. When it exceeds a certain threshold, a recession signal is generated.
5. Alerts & Visualization
Sound & Shape Alerts: Signals like warning triangles, cross icons, and color changes.
Threshold Lines: Indicate levels like "Strong Bullish," "Strong Bear," and critical zones.
Dual Confirmation: Combines crash and recession signals for high-confidence alerts.
Usage & Customization
Placing the Indicator
Copy and paste the Pine Script code into TradingView's Pine Editor.
Save and add the script to your chart. Adjust inputs like weights, sensitivity mode, thresholds, and alert preferences via the input panel.
Key Inputs
Weights: Customize the importance of each metric.
Sensitivity Mode: Changes alert thresholds for early warnings.
Crash Sensitivity: Defines how many indicators need to trigger before issuing a crash alert.
Recession Thresholds: Set the unemployment level that signals recession.
Interpreting Visuals
Histogram: Shows the composite score; green means bullish, red indicates bearish.
Momentum Line: Highlights trend acceleration/deceleration.
Threshold Lines: Dotted/dashed lines showing critical zones.
Shape Shapes: Triangles or crosses appear for early signals or critical events.
Alerts
Crash Alerts: Warn of imminent market crashes.
Recession Alerts: Indicate economic downturns based on Sahm Rule.
Spread Alerts: Show high-yield credit spread surges signaling stress.
Double Confirmation: High-confidence signals when crash and recession conditions align.
Best Practices
Use on multiple timeframes for confirmation.
Combine with other technical analysis tools for better accuracy.
Adjust thresholds according to your risk appetite.
Follow alert signals for early warning but always consider overall context.
Final Notes
This indicator synthesizes a variety of leading and lagging indicators to give a holistic view of market health. It is designed to provide early warnings, especially in volatile or stressed environments, helping traders avoid severe drawdowns or position ahead of major downturns.
Feel free to modify input parameters for your preferences, or integrate additional data sources for further refinement.
This detailed explanation can be directly included as a description or documentation within your TradingView script, helping users grasp its full capabilities and optimal usage.
Session ParmezanForex Session Range Boxes (Asia, Europe, US) — visual intraday session tracker for Forex and metals.
This indicator automatically marks the three major Forex trading sessions — Asian (Tokyo), European (London), and American (New York) — directly on your chart using dynamic colored boxes.
Each box represents the full price range (High–Low) formed during that session, helping traders visualize how volatility and liquidity evolve across the global trading day.
The script is built for intraday traders and session-based strategies, especially those who monitor breakouts from the Asian range or reactions during London–New York overlaps.
⚙️ Features
• Accurate session timing (UTC+3 / Moscow Time) — Asia: 03:00–12:00, Europe: 11:00–20:00, US: 16:00–01:00.
• Dynamic range boxes: each box expands in real time as new highs and lows are set during the session.
• Clear visual separation: each session is shown in its own color (blue for Asia, orange for Europe, green for US).
• Automatic daily reset — new boxes start every new session.
• Intraday focus only — visible up to the 1-hour timeframe (M1–H1) for clarity.
• Transparent design — semi-transparent fills keep candles readable even when sessions overlap.
• Lightweight performance — optimized use of box.new() and var variables avoids lag on lower timeframes.
🧭 Typical Use-Cases
• Identify Asian session ranges and watch for London breakouts or New York reversals.
• Visually align your intraday strategy with session volatility cycles.
• Combine with VWAP, liquidity zones, or market profile indicators for deeper confluence.
• Spot overlapping sessions — often the most active periods of the day.
DTC Killzones ICT🕐 DTC Killzones ICT — Visualize Market Sessions Like a Pro
The DTC Killzones ICT indicator is a clean and intuitive tool designed for traders who want to analyze and visualize institutional trading sessions directly on their charts.
Inspired by ICT’s Killzone concept , this script makes it easy to identify overlapping market sessions — such as London, New York, and Asian — and track how price behaves within each zone.
💡 What It Does
This indicator automatically highlights key market sessions (Killzones) on your chart with fully customizable colors, labels, and transparency.
Each zone dynamically updates to reflect real-time highs and lows, helping you identify:
Session ranges and liquidity zones
Volatility windows and breakout areas
Institutional footprints across sessions
Whether you trade Forex, Indices, or Crypto , this script gives you visual clarity on when and where smart money is likely to move.
⚙️ Main Features
✅ Up to four customizable sessions (New York, London, Asian, and London Close)
✅ Adjustable timeframes and timezone options — sync with your exchange or custom UTC offset
✅ Dynamic high/low range tracking for each session
✅ Toggle range outlines, session labels , and transparency levels
✅ Optional daily dividers and session transition markers
✅ Works on any timeframe and any symbol
🧠 How Traders Use It
ICT-based traders can easily mark Killzones to align with setups like FVGs, liquidity grabs, or Silver Bullet entries.
Intraday traders can visualize session volatility and overlap periods for potential entries.
Swing traders can identify daily structure shifts by tracking range-to-range behavior.
🛠️ Customization
You can fully rename, recolor, or disable each session block.
Adjust the range transparency for visual comfort, and toggle session or daily dividers to fit your workflow.
Everything is designed to be clean, light, and modular — no clutter, no confusion.
⚡ Recommended Settings
For ICT-style analysis:
London Session: 02:00–05:00
New York Session: 07:00–10:00
Asian Session: 19:30–24:00
London Close Session: 10:00–12:00
These time windows are fully editable to suit your timezone or strategy.
🧩 Compatibility
Works seamlessly with TradingView’s built-in timezone tools
Compatible with all instruments and timeframes
Designed to overlay directly on your price chart
🏁 Final Notes
The DTC Killzones ICT indicator focuses purely on market session visualization — no alerts, entries, or trading signals.
It’s designed to complement your existing strategies and enhance clarity when analyzing market behavior across global sessions.
📈 Built for traders who value precision, structure, and timing.
NY ORB - Full Dynamic SystemNY ORB - Full Dynamic Strategy Summary
1. Opening Range and Session Timing
Opening Range (ORB) Calculation: The strategy identifies the ORB High and ORB Low by tracking the highest high and lowest low during the specified New York pre-market window, which is set by default from 8:30 to 8:45 (New York time).
Entry Window: Trading activity is restricted to a specific entry period, typically starting shortly after the ORB is established (default: 8:50 to 12:00).
Hard Exit Time: Any remaining open positions are automatically closed at a fixed exit time (default: 13:25).
2. Trade Entry Logic and Filters
An entry (Long or Short) is generated when the price breaks out of the established ORB, provided it passes a series of optional filters:
Direction Control: The user can restrict the strategy to trade Long Only, Short Only, or Both.
Second Breakout Logic: An optional filter that requires the price to break out, reverse back into the range, and then break out again, confirming momentum after a consolidation.
Confirmation Candle Count: An optional filter that checks the close of a previous candle (e.g., 1 or 2 candles ago) to ensure the price was still inside the range, preventing premature entry.
Technical Filters (Optional): The entry is only executed if it aligns with selected indicators:
RSI: Filters for non-overbought (Long) or non-oversold (Short) conditions.
MACD: Requires the MACD line to be above/below the Signal line for alignment.
VWAP: Requires the price to be above/below the Volume-Weighted Average Price.
Trend Filter (SMMA): Requires the price to be above/below a 50-period Simple Moving Average.
3. Dynamic Risk and Exit Management
This strategy features highly configurable stop-loss and profit-taking mechanics:
Primary Stop Loss Methods: The Stop Loss distance can be dynamically chosen from four types:
Fixed: A fixed number of ticks.
ATR: Based on a multiple of the Average True Range (ATR).
Capped ATR: ATR-based, but with a hard maximum tick limit.
OR-Based: Based on a multiple of the actual ORB High-to-Low range.
Dynamic Profit Target: The Take Profit level is calculated dynamically based on a multiplier of either the ATR or the ORB Range.
Breakeven Stop:
If enabled, the Stop Loss automatically moves to the entry price (Breakeven) once the price moves a predetermined distance in the profitable direction.
An Adaptive Breakeven option allows the trigger distance to be calculated as a percentage of the overall ATR Profit Target.
Trailing Stop: The strategy uses a trailing stop, which can be custom-set (fixed ticks) or dynamically tied to the ATR. An optional feature Auto Tighten Trailing reduces the trailing multiplier once the breakeven level is hit.
MA Cross Exit: An alternative, counter-trend exit mechanism that closes the trade if the price crosses back over the chosen Moving Average (either SMMA or VWAP), overriding the pending profit target.
4. Daily Account Management
The strategy includes crucial daily risk controls to protect capital and lock in profits:
Daily Profit Limit: If the total daily PnL (realized and unrealized) hits a predefined maximum profit threshold (in ticks), all trades are closed, and new entries are blocked for the remainder of the trading day.
Daily Loss Limit: Conversely, if the total daily PnL hits a predefined maximum loss threshold, all trades are closed, and new entries are blocked for the remainder of the day.
Trailing 12M % Gain/Lossthis script shows profit or loss for training 12 months, works only on daily time frame
Accumulation Distribution LineThis indicator provides an implementation of the classic Accumulation/Distribution Line (ADL). It enhances the standard indicator with a built-in divergence detection engine.
Key Features:
Full Divergence Suite (Class A, B, C): The primary feature is the integrated divergence engine. It automatically detects and plots all three major types of divergences:
Regular (A): Signals potential trend reversals.
Hidden (B): Signals potential trend continuations.
Exaggerated (C): Signals weakness at double tops/bottoms.
Divergence Filtering and Visualization:
Price Tolerance Filter: Divergence detection is enhanced with a percentage-based price tolerance (pivPrcTol) to filter out insignificant market noise, leading to more robust signals.
Persistent Visualization: Divergence markers are plotted for the entire duration of the signal and are visually anchored to the ADL level of the confirming pivot.
Note on Confirmation (Lag): Divergence signals rely on a pivot confirmation method to ensure they do not repaint.
The Start of a- divergence is only detected after the confirming pivot is fully formed (a delay based on Pivot Right Bars).
The End of a divergence is detected either instantly (if the signal is invalidated by price action) or with a delay (when a new, non-divergent pivot is confirmed).
Multi-Timeframe (MTF) Capability:
MTF ADL Line: The ADL line itself can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Divergence detection engine (pivDiv) is disabled if a timeframe other than the chart's timeframe is selected. Divergences are only calculated on the active chart timeframe.
Integrated Alerts: Includes 12 comprehensive alerts that trigger on the start and end of all 6 divergence types (e.g., "Regular Bullish Started", "Regular Bullish Ended").
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
On Balance VolumeThis indicator provides an implementation of the classic On Balance Volume (OBV) momentum indicator, enhanced with a built-in divergence detection engine.
Key Features:
Full Divergence Suite (Class A, B, C): The primary feature is the integrated divergence engine. It automatically detects and plots all three major types of divergences:
Regular (A): Signals potential trend reversals.
Hidden (B): Signals potential trend continuations.
Exaggerated (C): Signals weakness at double tops/bottoms.
Divergence Filtering and Visualization:
Price Tolerance Filter: Divergence detection is enhanced with a percentage-based price tolerance (pivPrcTol) to filter out insignificant market noise, leading to more robust signals.
Persistent Visualization: Divergence markers are plotted for the entire duration of the signal and are visually anchored to the OBV level of the confirming pivot.
Note on Confirmation (Lag): Divergence signals rely on a pivot confirmation method to ensure they do not repaint.
The Start of a- divergence is only detected after the confirming pivot is fully formed (a delay based on Pivot Right Bars).
The End of a divergence is detected either instantly (if the signal is invalidated by price action) or with a delay (when a new, non-divergent pivot is confirmed).
Multi-Timeframe (MTF) Capability:
MTF OBV Line: The OBV line itself can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Divergence detection engine (pivDiv) is disabled if a timeframe other than the chart's timeframe is selected. Divergences are only calculated on the active chart timeframe.
Integrated Alerts: Includes 12 comprehensive alerts that trigger on the start and end of all 6 divergence types (e.g., "Regular Bullish Started", "Regular Bullish Ended").
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
v2.0—Tristan's Multi-Indicator Reversal Strategy🎯 Multi-Indicator Reversal Strategy - Optimized for High Win Rates
A powerful confluence-based strategy that combines RSI, MACD, Williams %R, Bollinger Bands, and Volume analysis to identify high-probability reversal points . Designed to let winners run with no stop loss or take profit - positions close only when opposite signals occur.
Also, the 3 hour timeframe works VERY well—just a lot less trades.
📈 Proven Performance
This strategy has been backtested and optimized on multiple blue-chip stocks with 80-90%+ win rates on 1-hour timeframes from Aug 2025 through Oct 2025:
✅ V (Visa) - Payment processor
✅ MSFT (Microsoft) - Large-cap tech
✅ WMT (Walmart) - Retail leader
✅ IWM (Russell 2000 ETF) - Small-cap index
✅ NOW (ServiceNow) - Enterprise software
✅ WM (Waste Management) - Industrial services
These stocks tend to mean-revert at extremes, making them ideal candidates for this reversal-based approach. I only list these as a way to show you the performance of the script. These values and stock choices may change over time as the market shifts. Keep testing!
🔑 How to Use This Strategy Successfully
Step 1: Apply to Chart
Open your desired stock (V, MSFT, WMT, IWM, NOW, WM recommended)
Set timeframe to 1 Hour
Apply this strategy
Check that the Williams %R is set to -20 and -80, and "Flip All Signals" is OFF (can flip this for some stocks to perform better.)
Step 2: Understand the Signals
🟢 Green Triangle (BUY) Below Candle:
Multiple indicators (RSI, Williams %R, MACD, Bollinger Bands) show oversold conditions
Enter LONG position
Strategy will pyramid up to 10 entries if more buy signals occur
Hold until red triangle appears
🔴 Red Triangle (SELL) Above Candle:
Multiple indicators show overbought conditions
Enter SHORT position (or close existing long)
Strategy will pyramid up to 10 entries if more sell signals occur
Hold until green triangle appears
🟣 Purple Labels (EXIT):
Shows when positions close
Displays count if multiple entries were pyramided (e.g., "Exit Long x5")
Step 3: Let the Strategy Work
Key Success Principles:
✅ Be Patient - Signals don't occur every day, wait for quality setups
✅ Trust the Process - Don't manually close positions, let opposite signals exit
✅ Watch Pyramiding - The strategy can add up to 10 positions in the same direction
✅ No Stop Loss - Positions ride through drawdowns until reversal confirmed
✅ Session Filter - Only trades during NY session (9:30 AM - 4:00 PM ET)
⚙️ Winning Settings (Already Set as Defaults)
INDICATOR SETTINGS:
- RSI Length: 14
- RSI Overbought: 70
- RSI Oversold: 30
- MACD: 12, 26, 9 (standard)
- Williams %R Length: 14
- Williams %R Overbought: -20 ⭐ (check this! And adjust to your liking)
- Williams %R Oversold: -80 ⭐ (check this! And adjust to your liking)
- Bollinger Bands: 20, 2.0
- Volume MA: 20 periods
- Volume Multiplier: 1.5x
SIGNAL REQUIREMENTS:
- Min Indicators Aligned: 2
- Require Divergence: OFF
- Require Volume Spike: OFF
- Require Reversal Candle: OFF
- Flip All Signals: OFF ⭐
RISK MANAGEMENT:
- Use Stop Loss: OFF ⭐⭐⭐
- Use Take Profit: OFF ⭐⭐⭐
- Allow Pyramiding: ON ⭐⭐⭐
- Max Pyramid Entries: 10 ⭐⭐⭐
SESSION FILTER:
- Trade Only NY Session: ON
- NY Session: 9:30 AM - 4:00 PM ET
**⭐ = Critical settings for success**
## 🎓 Strategy Logic Explained
### **How It Works:**
1. **Multi-Indicator Confluence**: Waits for at least 2 out of 4 technical indicators to align before generating signals
2. **Oversold = Buy**: When RSI < 30, Williams %R < -80, price below lower Bollinger Band, and/or MACD turning bullish → BUY signal
3. **Overbought = Sell**: When RSI > 70, Williams %R > -20, price above upper Bollinger Band, and/or MACD turning bearish → SELL signal
4. **Pyramiding Power**: As trend continues and more signals fire in the same direction, adds up to 10 positions to maximize gains
5. **Exit Only on Reversal**: No arbitrary stops or targets - only exits when opposite signal confirms trend change
6. **Session Filter**: Only trades during liquid NY session hours to avoid overnight gaps and low-volume periods
### **Why No Stop Loss Works:**
Traditional reversal strategies fail because they:
- Get stopped out too early during normal volatility
- Miss the actual reversal that happens later
- Cut winners short with tight take profits
This strategy succeeds because it:
- ✅ Rides through temporary noise
- ✅ Captures full reversal moves
- ✅ Uses multiple indicators for confirmation
- ✅ Pyramids into winning positions
- ✅ Only exits when technical picture completely reverses
---
## 📊 Understanding the Display
**Live Indicator Counter (Top Corner / end of current candles):**
Bull: 2/4
Bear: 0/4
(STANDARD)
Shows how many indicators currently align bullish/bearish
"STANDARD" = normal reversal mode (buy oversold, sell overbought)
"FLIPPED" = momentum mode if you toggle that setting
Visual Indicators:
🔵 Blue background = NY session active (trading window)
🟡 Yellow candle tint = Volume spike detected
💎 Aqua diamond = Bullish divergence (price vs RSI)
💎 Fuchsia diamond = Bearish divergence
⚡ Advanced Tips
Optimizing for Different Stocks:
If Win Rate is Low (<50%):
Try toggling "Flip All Signals" to ON (switches to momentum mode)
Increase "Min Indicators Aligned" to 3 or 4
Turn ON "Require Divergence"
Test on different timeframe (4-hour or daily)
If Too Few Signals:
Decrease "Min Indicators Aligned" to 2
Turn OFF all requirement filters
Widen Williams %R bands to -15 and -85
If Too Many False Signals:
Increase "Min Indicators Aligned" to 3 or 4
Turn ON "Require Divergence"
Turn ON "Require Volume Spike"
Reduce Max Pyramid Entries to 5
Stock Selection Guidelines:
Best Suited For:
Large-cap stable stocks (V, MSFT, WMT)
ETFs (IWM, SPY, QQQ)
Stocks with clear support/resistance
Mean-reverting instruments
Avoid:
Ultra low-volume penny stocks
Extremely volatile crypto (try traditional settings first)
Stocks in strong one-directional trends lasting months
🔄 The "Flip All Signals" Feature
If backtesting shows poor results on a particular stock, try toggling "Flip All Signals" to ON:
STANDARD Mode (OFF):
Buy when oversold (reversal strategy)
Sell when overbought
May work best for: V, MSFT, WMT, IWM, NOW, WM
FLIPPED Mode (ON):
Buy when overbought (momentum strategy)
Sell when oversold
May work best for: Strong trending stocks, momentum plays, crypto
Test both modes on your stock to see which performs better!
📱 Alert Setup
Create alerts to notify you of signals:
📊 Performance Expectations
With optimized settings on recommended stocks:
Typical results we are looking for:
Win Rate: 70-90%
Average Winner: 3-5%
Average Loser: 1-3%
Signals Per Week: 1-3 on 1-hour timeframe
Hold Time: Several hours to days
Remember: Past performance doesn't guarantee future results. Always use proper risk management.
3D Institutional Battlefield [SurgeGuru]Professional Presentation: 3D Institutional Flow Terrain Indicator
Overview
The 3D Institutional Flow Terrain is an advanced trading visualization tool that transforms complex market structure into an intuitive 3D landscape. This indicator synthesizes multiple institutional data points—volume profiles, order blocks, liquidity zones, and voids—into a single comprehensive view, helping you identify high-probability trading opportunities.
Key Features
🎥 Camera & Projection Controls
Yaw & Pitch: Adjust viewing angles (0-90°) for optimal perspective
Scale Controls: Fine-tune X (width), Y (depth), and Z (height) dimensions
Pro Tip: Increase Z-scale to amplify terrain features for better visibility
🌐 Grid & Surface Configuration
Resolution: Adjust X (16-64) and Y (12-48) grid density
Visual Elements: Toggle surface fill, wireframe, and node markers
Optimization: Higher resolution provides more detail but requires more processing power
📊 Data Integration
Lookback Period: 50-500 bars of historical analysis
Multi-Source Data: Combine volume profile, order blocks, liquidity zones, and voids
Weighted Analysis: Each data source contributes proportionally to the terrain height
How to Use the Frontend
💛 Price Line Tracking (Your Primary Focus)
The yellow price line is your most important guide:
Monitor Price Movement: Track how the yellow line interacts with the 3D terrain
Identify Key Levels: Watch for these critical interactions:
Order Blocks (Green/Red Zones):
When yellow price line enters green zones = Bullish order block
When yellow price line enters red zones = Bearish order block
These represent institutional accumulation/distribution areas
Liquidity Voids (Yellow Zones):
When yellow price line enters yellow void areas = Potential acceleration zones
Voids indicate price gaps where minimal trading occurred
Price often moves rapidly through voids toward next liquidity pool
Terrain Reading:
High Terrain Peaks: High volume/interest areas (support/resistance)
Low Terrain Valleys: Low volume areas (potential breakout zones)
Color Coding:
Green terrain = Bullish volume dominance
Red terrain = Bearish volume dominance
Purple = Neutral/transition areas
📈 Volume Profile Integration
POC (Point of Control): Automatically marks highest volume level
Volume Bins: Adjust granularity (10-50 bins)
Height Weight: Control how much volume affects terrain elevation
🏛️ Order Block Detection
Detection Length: 5-50 bar lookback for block identification
Strength Weighting: Recent blocks have greater impact on terrain
Candle Body Option: Use full candles or body-only for block definition
💧 Liquidity Zone Tracking
Multiple Levels: Track 3-10 key liquidity zones
Buy/Sell Side: Different colors for bid/ask liquidity
Strength Decay: Older zones have diminishing terrain impact
🌊 Liquidity Void Identification
Threshold Multiplier: Adjust sensitivity (0.5-2.0)
Height Amplification: Voids create significant terrain depressions
Acceleration Zones: Price typically moves quickly through void areas
Practical Trading Application
Bullish Scenario:
Yellow price line approaches green order block terrain
Price finds support in elevated bullish volume areas
Terrain shows consistent elevation through key levels
Bearish Scenario:
Yellow price line struggles at red order block resistance
Price falls through liquidity voids toward lower terrain
Bearish volume peaks dominate the landscape
Breakout Setup:
Yellow price line consolidates in flat terrain
Minimal resistance (low terrain) in projected direction
Clear path toward distant liquidity zones
Pro Tips
Start Simple: Begin with default settings, then gradually customize
Focus on Yellow Line: Your primary indicator of current price position
Combine Timeframes: Use the same terrain across multiple timeframes for confluence
Volume Confirmation: Ensure terrain peaks align with actual volume spikes
Void Anticipation: When price enters voids, prepare for potential rapid movement
Order Blocks & Voids Architecture
Order Blocks Calculation
Trigger: Price breaks fractal swing points
Bullish OB: When close > swing high → find lowest low in lookback period
Bearish OB: When close < swing low → find highest high in lookback period
Strength: Based on price distance from block extremes
Storage: Global array maintains last 50 blocks with FIFO management
Liquidity Voids Detection
Trigger: Price gaps exceeding ATR threshold
Bull Void: Low - high > (ATR200 × multiplier)
Bear Void: Low - high > (ATR200 × multiplier)
Validation: Close confirms gap direction
Storage: Global array maintains last 30 voids
Key Design Features
Real-time Updates: Calculated every bar, not just on last bar
Global Persistence: Arrays maintain state across executions
FIFO Management: Automatic cleanup of oldest entries
Configurable Sensitivity: Adjustable lookback periods and thresholds
Scientific Testing Framework
Hypothesis Testing
Primary Hypothesis: 3D terrain visualization improves detection of institutional order flow vs traditional 2D charts
Testable Metrics:
Prediction Accuracy: Does terrain structure predict future support/resistance?
Reaction Time: Faster identification of key levels vs conventional methods
False Positive Reduction: Lower rate of failed breakouts/breakdowns
Control Variables
Market Regime: Trending vs ranging conditions
Asset Classes: Forex, equities, cryptocurrencies
Timeframes: M5 to H4 for intraday, D1 for swing
Volume Conditions: High vs low volume environments
Data Collection Protocol
Terrain Features to Quantify:
Slope gradient changes at price inflection points
Volume peak clustering density
Order block terrain elevation vs subsequent price action
Void depth correlation with momentum acceleration
Control Group: Traditional support/resistance + volume profile
Experimental Group: 3D Institutional Flow Terrain
Statistical Measures
Signal-to-Noise Ratio: Terrain features vs random price movements
Lead Time: Terrain formation ahead of price confirmation
Effect Size: Performance difference between groups (Cohen's d)
Statistical Power: Sample size requirements for significance
Validation Methodology
Blind Testing:
Remove price labels from terrain screenshots
Have traders identify key levels from terrain alone
Measure accuracy vs actual price action
Backtesting Framework:
Automated terrain feature extraction
Correlation with future price reversals/breakouts
Monte Carlo simulation for significance testing
Expected Outcomes
If hypothesis valid:
Significant improvement in level prediction accuracy (p < 0.05)
Reduced latency in institutional level identification
Higher risk-reward ratios on terrain-confirmed trades
Research Questions:
Does terrain elevation reliably indicate institutional interest zones?
Are liquidity voids statistically significant momentum predictors?
Does multi-timeframe terrain analysis improve signal quality?
How does terrain persistence correlate with level strength?
LuxAlgo BigBeluga hapharmonic
LibMvAvLibrary "LibMvAv"
This library provides a unified interface for calculating a
wide variety of moving averages. It is designed to simplify
indicator development by consolidating numerous MA calculations
into a single function and integrating the weighting
capabilities from the `LibWght` library.
Key Features:
1. **All-in-One MA Function:** The core of the library is the
`ma()` function. Users can select the desired calculation
method via the `MAType` enum, which helps create
cleaner and more maintainable code compared to using
many different `ta.*` or custom functions.
2. **Comprehensive Selection of MA Types:** It provides a
selection of 12 different moving averages, covering
common Pine Script built-ins and their weighted counterparts:
- **Standard MAs:** SMA, EMA, WMA, RMA (Wilder's), HMA (Hull), and
LSMA (Least Squares / Linear Regression).
- **Weighted MAs:** Weight-enhanced versions of the above
(WSMA, WEMA, WWMA, WRMA, WHMA, WLSMA).
3. **Integrated Weighting:** The library provides weighted versions
for each of its standard MA types (e.g., `wsma` alongside `sma`).
By acting as a dispatcher, the `ma()` function allows these
weighted calculations to be called using the optional
`weight` parameter, which are then processed by the `LibWght`
library.
4. **Simple API:** The library internally handles the logic of
choosing the correct function based on the selected `MAType`.
The user only needs to provide the source, length, and
optional weight, simplifying the development process.
---
**DISCLAIMER**
This library is provided "AS IS" and for informational and
educational purposes only. It does not constitute financial,
investment, or trading advice.
The author assumes no liability for any errors, inaccuracies,
or omissions in the code. Using this library to build
trading indicators or strategies is entirely at your own risk.
As a developer using this library, you are solely responsible
for the rigorous testing, validation, and performance of any
scripts you create based on these functions. The author shall
not be held liable for any financial losses incurred directly
or indirectly from the use of this library or any scripts
derived from it.
ma(maType, source, length, weight)
Returns the requested moving average.
Parameters:
maType (simple MAType) : simple MAType Desired type (see enum above).
source (float) : series float Data series to smooth.
length (simple int) : simple int Look-back / period length.
weight (float) : series float Weight series (default = na)
Returns: series float Moving-average value.
DRACO TOMAS EMA Trend Follower🐉 DRACO TOMAS EMA Trend Follower
Description:
The DRACO TOMAS EMA Trend Follower is a simple yet powerful trend-following strategy designed to capture directional moves based on exponential moving average (EMA) crossovers. It automatically detects trend changes and manages positions dynamically.
Core Logic:
The strategy uses two EMAs — a Fast EMA (default 12) and a Slow EMA (default 21) — to identify the market trend.
When the Fast EMA crosses above the Slow EMA, the strategy opens a long position, signaling bullish momentum.
When the Fast EMA crosses below the Slow EMA, the strategy opens a short position, signaling bearish momentum.
The color of the EMAs changes dynamically: green for uptrends, red for downtrends.
Exit rules:
Longs are closed when the EMAs turn red (trend reversal to bearish).
Shorts are closed when the EMAs turn green (trend reversal to bullish).
Position Sizing:
The system uses 10% of equity per trade by default, allowing flexible risk management and compounding.
Purpose:
Designed for traders who want a clean and efficient EMA crossover system to follow trends automatically on any timeframe or asset.
Best Used For:
Swing trading and trend confirmation
Identifying major directional shifts
Testing EMA-based momentum systems
Sector Relative StrengthThis indicator measures a stock's Real Relative Strength against its sector benchmark, helping you identify stocks that are outperforming or underperforming their sector peers.
The concept is based on the Real Relative Strength methodology popularized by the r/realdaytrading community.
Unlike traditional relative strength calculations that simply compare price ratios, this indicator uses a more sophisticated approach that accounts for volatility through ATR (Average True Range), providing a normalized view of true relative performance.
Key Features
Automatic Sector Detection
Automatically detects your stock's sector using TradingView's built-in sector classification
Maps to the appropriate SPDR Sector ETF (XLK, XLF, XLV, XLY, XLP, XLI, XLE, XLU, XLB, XLC)
Supports all 20 TradingView sectors
Sector ETF Mappings
The indicator automatically compares your stock against:
Technology: XLK (Technology Services, Electronic Technology)
Financials: XLF (Finance sector)
Healthcare: XLV (Health Technology, Health Services)
Consumer Discretionary: XLY (Retail Trade, Consumer Services, Consumer Durables)
Consumer Staples: XLP (Consumer Non-Durables)
Industrials: XLI (Producer Manufacturing, Industrial Services, Transportation, Commercial Services)
Energy: XLE (Energy Minerals)
Utilities: XLU
Materials: XLB (Non-Energy Minerals, Process Industries)
Communications: XLC
Default: SPY (for Miscellaneous or unclassified sectors)
Customizable Settings
Comparison Mode: Choose between automatic sector comparison or custom symbol
Length: Adjustable lookback period (default: 12)
Smoothing: Apply moving average to reduce noise (default: 3)
Visual Clarity
Green line: Stock is outperforming its sector
Red line: Stock is underperforming its sector
Zero baseline: Clear reference point for performance
Clean info box: Shows which ETF you're comparing against
How It Works
The indicator calculates relative strength using the following methodology:
Rolling Price Change: Measures the price movement over the specified length for both the stock and its sector ETF
ATR Normalization: Uses Average True Range to normalize for volatility differences
Power Index: Calculates the sector's strength relative to its volatility
Real Relative Strength: Compares the stock's performance against the sector's power index
Smoothing: Applies a moving average to reduce single-candle spikes
Formula:
Power Index = (Sector Price Change) / (Sector ATR)
RRS = (Stock Price Change - Power Index × Stock ATR) / Stock ATR
Smoothed RRS = SMA(RRS, Smoothing Length)
Ripster Clouds (EMA + MTF)v6🧠 Purpose
This indicator combines Ripster EMA Clouds and Multi-Timeframe (MTF) EMA Clouds into one script.
It allows you to visualize short vs long exponential (or simple) moving averages as colored “clouds” to identify trend direction and momentum — across both your current timeframe and a higher timeframe (e.g., daily).
⚙️ Main Features
1. EMA Clouds (Local Timeframe)
Up to 5 separate EMA/SMA cloud sets (8/9, 5/12, 34/50, 72/89, 180/200 by default).
Each can be individually enabled/disabled in the settings.
MA type toggle → Choose between EMA and SMA.
Optional line display toggle for showing the short and long MA lines.
Color-coded trend clouds:
Greenish tones = bullish (short > long)
Reddish tones = bearish (short < long)
Configurable leading offset and global offset for alignment.
2. MTF Clouds (Higher Timeframe)
Two sets of higher timeframe EMA clouds (default: 50/55 and 20/21).
Uses request.security() to pull EMA data from a selected higher timeframe (default = Daily).
Optional line visibility toggle (Display Lines).
Blue and teal semi-transparent fills to distinguish from local clouds.
Each MTF cloud can be toggled independently.
3. Unified Controls
Master toggles:
✅ Show EMA Clouds
✅ Show MTF Clouds
Transparent cloud fills with dynamically changing colors based on EMA crossovers and slope.
No local-scope plot() or fill() calls — fully compliant with Pine v6 rules.
🎨 Color Logic
Each EMA cloud uses a unique color pair (5 total).
Cloud color changes dynamically based on whether the short EMA is above or below the long EMA.
Line color changes with slope:
Olive = EMA rising
Maroon = EMA falling
📊 Technical Structure
Written in Pine Script v6.
All plot() and fill() calls are at global scope to prevent compilation errors.
Uses helper functions only for math/color logic.
Performance-optimized for TradingView’s rendering limits.
🧩 Quick Setup in TradingView
Paste the script into the Pine Editor.
Add to chart.
In settings:
Toggle on/off any EMA or MTF clouds.
Adjust timeframe (Resolution), line visibility, or offsets.
Choose EMA or SMA as the base calculation.
✅ Result
You now have one unified, customizable Ripster EMA + MTF Cloud indicator, stable in Pine v6, with complete flexibility to toggle, style, and analyze multiple timeframe trends on a single chart.
DTCC RECAPS Dates 2020-2025This is a simple indicator which marks the RECAPS dates of the DTCC, during the periods of 2020 to 2025.
These dates have marked clear settlement squeezes in the past, such as GME's squeeze of January 2021.
------------------------------------------------------------------------------------------------------------------
The Depository Trust & Clearing Corporation (DTCC) has published the 2025 schedule for its Reconfirmation and Re-pricing Service (RECAPS) through the National Securities Clearing Corporation (NSCC). RECAPS is a monthly process for comparing and re-pricing eligible equities, municipals, corporate bonds, and Unit Investment Trusts (UITs) that have aged two business days or more .
At its core, the Reconfirmation and Re-pricing Service (RECAPS) is a risk management tool used by the National Securities Clearing Corporation (NSCC), a subsidiary of the DTCC. Its primary purpose is to reduce the risks associated with aged, unsettled trades in the U.S. securities market .
When a trade is executed, it is sent to the NSCC for clearing and settlement. However, for various reasons, some trades may not settle on their scheduled date and become "aged." These unsettled trades create risk for both the trading parties and the clearinghouse (NSCC) because the value of the underlying securities can change over time. If a trade fails to settle and one of the parties defaults, the NSCC may have to step in to complete the transaction at the current market price, which could result in a loss.
RECAPS mitigates this risk by systematically re-pricing these aged, open trading obligations to the current market value. This process ensures that the financial obligations of the clearing members accurately reflect the present value of the securities, preventing the accumulation of significant, unmanaged market risk .
Detailed Mechanics: How Does it Work?
The RECAPS process revolves around two key dates you asked about: the RECAPS Date and the Settlement Date .
The RECAPS Date: On this day, the NSCC runs a process to identify all eligible trades that have remained unsettled for two business days or more. These "aged" trades are then re-priced to the current market value. This re-pricing is not just a simple recalculation; it generates new settlement instructions. The original, unsettled trade is effectively cancelled and replaced with a new one at the current market price. This is done through the NSCC's Obligation Warehouse.
The Settlement Date: This is typically the business day following the RECAPS date. On this date, the financial settlement of the re-priced trades occurs. The difference in value between the original trade price and the new, re-priced value is settled between the two trading parties. This "mark-to-market" adjustment is processed through the members' settlement accounts at the DTCC.
Essentially, the process ensures that any gains or losses due to price changes in the underlying security are realized and settled periodically, rather than being deferred until the trade is ultimately settled or cancelled.
Are These Dates Used to Check Margin Requirements?
Yes, indirectly, this process is closely tied to managing margin and collateral requirements for NSCC members. Here’s how:
The NSCC requires its members to post collateral to a clearing fund, which acts as a mutualized guarantee against defaults. The amount of collateral each member must provide is calculated based on their potential risk exposure to the clearinghouse.
By re-pricing aged trades to current market values through RECAPS, the NSCC gets a more accurate picture of each member's outstanding obligations and, therefore, their current risk profile. If a member has a large number of unsettled trades that have moved against them in value, the re-pricing will crystallize that loss, which will be settled the next day.
This regular re-pricing and settlement of aged trades prevent the build-up of large, unrealized losses that could increase a member's risk profile beyond what their posted collateral can cover. While RECAPS is not the only mechanism for calculating margin (the NSCC has a complex system for daily margin calls based on overall portfolio risk), it is a crucial component for managing the specific risk posed by aged, unsettled transactions. It ensures that the value of these obligations is kept current, which in turn helps ensure that collateral levels remain adequate.
--------------------------------------------------------------------------------------------------------------
Future dates of 2025:
- November 12, 2025 (Wed)
- November 25, 2025 (Tue)
- December 11, 2025 (Thu)
- December 29, 2025 (Mon)
The dates for 2026 haven't been published yet at this time.
The RECAPS process is essentially the industry's way of retrying the settlement of all unresolved FTDs, netting outstanding obligations, and gradually forcing resolution (either delivery or buy-in). Monitoring RECAPS cycles is one way to track the lifecycle, accumulation, and eventual resolution (or persistence) of failures to deliver in the U.S. market.
The US Stock market has become a game of settlement dates and FTDs, therefore this can be useful to track.






















