Statistics
Market State Tracker🙏🏻 This is MST (Market State Tracker) , it’s main purpose is to tell whether it's better to take a predefined take-profit, or to expect a runner.
Unlike widely-known alternatives, this model is made with top state-space and innovation modelling tech, and it takes the necessary info ‘itself’ (not the derivatives) from the right places. In fancy terms it’s not even a model, it’s an ensemble of several models. If you want to get familiar with other work of mine like this, check UAT .
^^ compared with reverse-engineered Jurik Moving Average in moving window mode
…
Main use case : take-profit engine. It tells whether to hold a position past its primary 1:1 Risk:Reward take-profit up to the opposite entry), or to close it right away at 1:1.
Alternative use case : market state operator. Alternatively the study can be used as a primary market-state operator that would actually define further strategies and actions. It’s very useful if your strategies are not market regime agnostic. Otherwise, use it only as the main use case tells.
Other use cases : anything that other mainstream studies are doing, but better* (proceed to the Tech Note in the end of the post): trend detection, price smoothing, crossovers, dynamic S&R etc.
…
How to use:
The script has 2 studies, lower study (blue and red lines) and upper study (purple and gray lines).
...
Lower study is less variance & more bias option , in general it’s less preferred than upper study, but if none of your other system layers do not gauge directional info directly and you wanna keep it simply this way, this lower study is what you need.
Lower study states -> advised take-profit strategy:
When: negative gamma (red line) is above positive gamma (blue line), market is biased towards sell side, so shorts should be held up to the opposite entry, while longs should be closed asap after 1:1 Risk:Reward
When: positive gamma (blue line) is above negative gamma (red line), market is biased towards buy side, so longs should be held up to the opposite entry, while shorts should be closed asap after 1:1 Risk:Reward
...
Upper study is the preferred one in general because of its higher informational content. Most probably, if you’re already gaining directional info on your other system layers, this one will likely provide you information you don’t gain there. Here the purple line is the lead state estimate, and the gray line is the lagged state estimate, and current price = current bar POC or HLC3 (inferred POC).
Upper study states -> advised take-profit strategy:
When: current price > purple line > gray line, market is heavily biased towards buy side, so longs should be held up to the opposite entry, while shorts should be closed asap after 1:1 Risk:Reward
When: current price < purple line < gray line, market is heavily biased towards sell side, so shorts should be held up to the opposite entry, while longs should be closed asap after 1:1 Risk:Reward
When: purple line > gray line > current price, market is biased towards another buy wave, so longs should be held up to the opposite entry, while shorts should be closed asap after 1:1 Risk:Reward
When: purple line < gray line < current price, market is biased towards another sell wave, so shorts should be held up to the opposite entry, while longs should be closed asap after 1:1 Risk:Reward
All other price x purple line x gray line patterns are considered neutral, and both longs and shorts are done with minimal 1:1 Risk:Reward.
Important: if you trade based on current session activity, you have to track current states. If you trade based on previous session levels, you only need the last state of that session that originated the level.
Important 2: The script has a setting called “blend”. The differences between all 3 options provided there are extremely low, and moreover it doesn’t change the main part: location of crossovers. So I left it here because I genuinely don’t know yet which of these is the most primordial math option for the current context xd.
...
* now about this:
Tech note
In short: it gains all the information without touching artifacts with the best possible math that runs on O(1) time complexity.
The ‘final’ time complexity of the whole method is O(1), both in moving and expanding window modes.
The main short-term forecasting & innovations engine, I called it VAPM (Volume Acceleration Price Model) , is inspired by how prediction and NaN fills works on the lowest hardware level, processor cache etc. It’s based on splines , the most fundamental geometrical principles. This is the stuff you can run on FPGAs doing UHFT, not even HFT.
Based on lead/lag and negative/positive relationships with the VAPM forecasts, innovations are separated into 4 different streams.
Each stream of these 4 then discovers its own adaptive gain (limited by theoretical constraints of the exponential distribution each stream follows).
Then, 4 separate PVA (Position Velocity Acceleration) state-space models are run on POC estimate of each bar, using previously computed 4 different adaptive gains. Initial impulse response of the models was almost exactly matched with the Extended Beta(2, 2) Window, provided in UAT open access script (heck the code & description, it would worth it).
Then these 4 separate trackers are grouped pairwise and blended into 2, resulting in the lead/lag model.
Additionally, 4 adaptive gains are blended into 2 separate pos/neg models. I offer 3 blending options: max(), contraharmonic mean, and Log-Sum-Exp. The differences of outputs based on these 3 options are almost negligible.
All possible hidden issues like info leakage from previous finished expanding windows, or special cases of forecasts at the very few first datapoints, are taken into account and solved. The whole method has zero constants and zero pre-optimized or arbitrary values, everything based on fundamental math entities / objects.
…
∞
StO Price Action - Bank Timings [Demo]Short Summary
- Visualizes market activity intensity based on historical price movement data (Oanda, M5)
- Highlights zones where price moves most frequently across market times
- Lvl 0 marks the highest intensity areas
- Includes experimental projection into future bars
- Supported markets: XAU/USD (Gold), EUR/USD (EU) with Lvl 0 & 1
Demo Restrictions
- Timeframe dropdown selections are limited
- Line style dropdown selections are limited
- Multi-timeframe functionality is removed or restricted
- Alerts are disabled or completely removed
- No code logic runs behind disabled GUI elements
Full Description
Overview
- Shows historical price movement data for some markets (from FX, Futures, Indexes, etc.)
- Identifies time zones with the highest concentration of price activity
- Designed to show when markets are statistically more active
- Supported are three limited marks
Intensity Levels
- Lvl 0 represents the highest concentration of price movement
- Lvl 1 shows strong but slightly reduced activity
- Lvl 2 marks moderate recurring activity
- Lvl 3 highlights lower but still relevant activity zones
- Each level can be enabled or disabled independently
Visualization
- Intensity levels are visualized using colored bars or markers
- Stronger intensity levels use more prominent coloring
- Works across different symbols and markets
Future Bars Projection
- Experimental feature to project intensity into future bars
- Helps anticipate periods of increased market activity
- Projection is time-based (vertical bars), not price-based
- Best suited for timeframes below H1
Future Shift Control
- Allows shifting projected intensity forward or backward in time
- Shift values are defined in hours (sometimes needed)
- Useful for session alignment and market timing
Notes
- Indicator is based on historical statistical aggregation
- No prediction of direction, only activity intensity
- Experimental future projection may vary by market
- Best used as a contextual timing tool
StO Price Action - Bank Timings [Light]Short Summary
- Visualizes market activity intensity based on historical price movement data (Oanda, M5)
- Highlights zones where price moves most frequently across market times
- Lvl 0 marks the highest intensity areas
- Includes experimental projection into future bars
- Supported markets: XAU/USD (Gold), XAG/USD (Silver) EUR/USD (EU), BTC (Bitcoin) with Lvl 0 & 1
Light Restrictions
- Timeframe dropdown selections are limited
- Line style dropdown selections are limited
- Multi-timeframe functionality is removed or restricted
- Alerts are disabled or completely removed
- No code logic runs behind disabled GUI elements
Full Description
Overview
- Shows historical price movement data for some markets (from FX, Futures, Indexes, etc.)
- Identifies time zones with the highest concentration of price activity
- Designed to show when markets are statistically more active
Intensity Levels
- Lvl 0 represents the highest concentration of price movement
- Lvl 1 shows strong but slightly reduced activity
- Lvl 2 marks moderate recurring activity
- Lvl 3 highlights lower but still relevant activity zones
- Each level can be enabled or disabled independently
Visualization
- Intensity levels are visualized using colored bars or markers
- Stronger intensity levels use more prominent coloring
- Works across different symbols and markets
Future Bars Projection
- Experimental feature to project intensity into future bars
- Helps anticipate periods of increased market activity
- Projection is time-based (vertical bars), not price-based
- Best suited for timeframes below H1
Future Shift Control
- Allows shifting projected intensity forward or backward in time
- Shift values are defined in hours (sometimes needed)
- Useful for session alignment and market timing
Notes
- Indicator is based on historical statistical aggregation
- No prediction of direction, only activity intensity
- Experimental future projection may vary by market
- Best used as a contextual timing tool
MNQ Risk TableMNQ Risk Table is a simple visual risk calculator for MNQ position sizing.
It generates a transparent on-chart table that shows your stop size (points), the recommended MNQ contracts, and the total risk used based on your chosen dollar risk.
✅ Customizable risk amount ($)
✅ Adjustable stop range (10–100 pts) + step size
✅ Optional zebra rows for readability
✅ Optional highlighting when risk used is close to your target
✅ Works great for prop / eval accounts and quick sizing decisions
Monte Carlo Simulation BandsMonte Carlo Simulation v2.4.2
Plots a one-bar-ahead price distribution band built from many simulated paths. The green band shows empirical percentiles of simulated final prices—these are distribution bounds, not a confidence interval of the mean.
What It Does
Simulates many one-bar price paths using a directional random walk with volatility scaling (uniform shocks, not Gaussian GBM).
Plots Mean Forecast, Median Forecast, and configurable percentile bounds (default 5th/95th).
Optional rolling HTF-days mean line (yellow) for trend context.
Optional labels and forward projection lines.
Alerts when the confirmed close breaks above or below the percentile band.
Non-Repainting & HTF Behavior (Fail-Closed)
All calculations are gated to confirmed bars only via explicit no_repaint_ok gate (barstate.isconfirmed).
If you select an HTF Resolution, the script uses a strict request.security(..., lookahead_off, gaps_off) pipeline.
If HTF data is unavailable, outputs are na—no silent fallback to chart timeframe.
A separate "HTF Alignment (lagged)" plot shows the prior HTF close (htf_price ) as visual proof of no look-ahead.
Volatility Source & Scaling
If "Use Historical Volatility" is enabled, volatility is estimated from log returns on the selected resolution (HTF if set, otherwise chart).
Annualization adapts to session type:
Equities: 6.5 hours/day, 252 trading days/year
Crypto: 24 hours/day, 365 days/year
Substeps increase path smoothness within the same one-bar horizon—they do not extend the forecast to multiple bars.
Key Inputs
• Prob Up / Prob Down — Must satisfy Prob Up + Prob Down ≤ 1.0. If violated, simulation is skipped and table shows "✗ PROB>1".
• # Simulations / # Substeps — Higher = smoother/more stable, but slower. Default 100×100 is a good balance.
• Lower/Upper Percentile — Define the band width (e.g., 5 and 95 for a 90% distribution band).
• Run On Last Bar Only — Performance mode (recommended). Skips historical computation; updates on each new confirmed bar.
• Resolution (HTF) — Leave blank for chart timeframe, or set to Weekly/Monthly for HTF-aligned simulation.
• Crypto 24/7 Session? — Enable for crypto markets to use correct annualization (365d, 24h).
How to Use (Quickstart)
Start with defaults and keep Run On Last Bar Only = true for speed.
Set Prob Up and Prob Down so their sum ≤ 1.0 (e.g., 0.5 + 0.5 = 1.0 for neutral).
Enable "Use Historical Volatility" and set a Volatility Lookback (e.g., 20 bars) for data-driven vol.
Set Resolution (HTF) if you want the model to run on higher timeframe data (e.g., 1W). Expect updates only when a new HTF interval starts.
Choose percentiles (e.g., 5 and 95) to define your distribution band width.
Enable alerts for "Price Above Upper Percentile" or "Price Below Lower Percentile" to get notified of breakouts.
Limitations & Disclosures
Forecast horizon is one bar only. Substeps do not create a multi-bar forecast.
Model uses uniform shocks with direction chosen from Prob Up/Down. This is not Geometric Brownian Motion (GBM) and is not calibrated to any option-implied distribution.
Bounds are percentiles of final simulated prices, not a statistical confidence interval of the mean.
HTF mode updates at the start of a new HTF interval (first chart bar where the HTF timestamp changes), so the band appears "step-like" in realtime.
Historical volatility requires enough bars for the selected lookback; until then, values may be na.
Performance depends on Sims × Substeps; extreme settings (e.g., 500×500) can be slow.
This indicator does not predict direction—it shows a probabilistic range based on your inputs.
Structura Candles Volume 1 v1.0█ OVERVIEW
Structura Candles Volume 1 is an advanced candlestick pattern recognition indicator based on the research methodology of Thomas N. Bulkowski's "Encyclopedia of Candlestick Charts." This indicator identifies 19 statistically-validated candlestick patterns and provides real-time backtesting against your current chart.
█ METHODOLOGY
Unlike traditional candlestick indicators that rely on theoretical pattern behavior, this script implements Bulkowski's empirical approach:
- Trend Detection: 10-period EMA to define short-term trend context
- Tall Candle Filter: 146% of 22-day average height threshold (statistically significant candles)
- Breakout Confirmation: Tracks whether price breaks above pattern high or below pattern low within a user-defined window
- Non-Repainting: Signals only confirm on bar close
█ PATTERNS INCLUDED
LONG Signals (Bullish):
- Three-Line Strike Bearish (84% reversal rate per Bulkowski)
- Engulfing Bullish
- Morning Star / Morning Doji Star
- Belt Hold Bullish
- Abandoned Baby Bullish
- Rising Window
- Three Inside Up
- Three Outside Up
SHORT Signals (Bearish):
- Engulfing Bearish
- Three Black Crows
- Evening Star / Evening Doji Star
- Abandoned Baby Bearish
- Two Black Gapping
- Falling Window
- Belt Hold Bearish
- Three Inside Down
- Three Outside Down
█ FEATURES
- Real-time pattern detection with LONG/SHORT direction
- Dynamic win rate calculation based on YOUR chart's historical performance
- Comparison to Bulkowski's book statistics
- Label colors update based on outcome:
🟡 Yellow = Pending (awaiting breakout)
🟢 Green = WIN (correct breakout direction)
🔴 Red = LOSS (wrong breakout direction)
⚪ Gray = Timeout (excluded from statistics)
- Separated LONG vs SHORT performance dashboard
- Adjustable breakout timeout window
█ HOW TO USE
1. When a pattern appears, the label shows direction (LONG/SHORT) and historical win rate
2. Wait for bar close confirmation (✓ CONFIRMED status)
3. Monitor subsequent bars for breakout above pattern high (bullish) or below pattern low (bearish)
4. Use the dashboard to identify which patterns perform best on your specific instrument
█ IMPORTANT DISCLAIMER
- Past performance does not guarantee future results
- The "Book WR" values are from Bulkowski's historical research on US equities and may differ across instruments, timeframes, and market conditions
- This indicator is for educational and analytical purposes only
- Always use proper risk management and do your own analysis before trading
- The win rates displayed are based on the breakout methodology, not actual trade profitability
█ SETTINGS
- Max Bars to Breakout: How long to wait for pattern confirmation (default: 10)
- Pattern Toggles: Enable/disable individual patterns
- Bulkowski Parameters: Adjust trend EMA, height threshold, and doji tolerance
█ ACCESS
This is an invite-only script. For access, please send a direct message.
Options Visualizer: Smart Money Barriers [V6]Options Visualizer: Institutional Barriers & Expected Move
The Options Visualizer is analysis tool designed for traders who want to gain an edge by monitoring the "Smart Money" (options market makers and institutional hedgers). This script helps you visualize key option market dynamics directly on your chart, allowing you to see statistical support/resistance levels and massive "walls" of liquidity.
Key Features
1. Institutional Walls (Manual Mode)
Input high Open Interest (OI) data from exchanges like Deribit or Coinglass.
Call Wall (Resistance): The strike price with the highest concentration of Call options. Market makers often defend these levels to prevent paying out buyers.
Put Wall (Support): The strike price with the highest concentration of Put options, acting as a "floor" for price action.
2. Auto-Probability Mode (Statistical Barriers)
Enable Auto Mode to calculate theoretical barriers based on a 2-Standard Deviation (95% Probability) model.
This visualizes the "extreme" ends of market expectations, where a reversal or significant resistance is mathematically likely.
3. Expected Move (68% Range Box)
The blue dotted box represents the 1-Standard Deviation (68% probability) move.
Historically, 68% of the time, the price at expiration will settle within this range. Staying outside this box signals an "over-extended" market.
The Math Behind the Magic
The script utilizes the standard Expected Move formula used by professional floor traders:
Expected Move = Current Price * (IV / 100) * SquareRoot(Days To Expiry / 365)
68% Probability (The Blue Box): Derived from 1-Standard Deviation (1-Sigma). It assumes a normal distribution of price returns.
95% Probability (Auto Mode Walls): Derived from 2-Standard Deviations (2-Sigma). This covers the vast majority of expected market outcomes, making these levels powerful institutional-grade support and resistance zones.
Implied Volatility (IV): Unlike historical volatility, IV represents the market's forward-looking "fear gauge" based on option pricing.
How to Use This Tool
1. Setup:
Look up the current Implied Volatility (IV) and Max Pain/Open Interest for your asset (use Coinglass or Deribit Metrics).
2. Inputs:
Enter the Days Until Expiration (e.g., if monthly options expire this Friday, enter the remaining days).
Enter the IV % (e.g., 55 for 55%).
3. Execution:
Trend Trading: If price stays within the Blue Box, the trend is "normal."
Mean Reversion: If price hits the Call/Put Wall (Red/Green dashed lines), look for exhaustion and potential reversal signals.
Breakouts: A sustained candle close outside the 95% Auto Walls suggests a "Black Swan" event or a massive short/gamma squeeze.
Why Use This Tool?
Traditional indicators (RSI, MACD) look at the past. This tool looks at current market expectations and positioning. By seeing where the "walls" are built, you can significantly improve your risk management and trading edge.
MANUAL:
Mode 1: Manual Institutional Data (Recommended for Specific Expiries)
This mode uses real-world Open Interest (OI) data, offering the most accurate view of where large institutions are actively defending their positions.¨
🛑 How to use the Manual Mode:
1. Disable the Enable Auto Probability Mode checkbox in the indicator settings.
2. Find the Data: Navigate to specialized crypto options analytics websites:
Coinglass Options (Look for "Open Interest by Strike")
Deribit Metrics (Look for Max Pain charts)
3. Identify Key Levels & Input them into the script settings:
Manual Call Wall Strike: Find the Highest Red Bar on the OI chart. This is the strike price with the most Call options, acting as massive institutional resistance.
Manual Put Wall Strike: Find the Highest Green Bar on the OI chart. This is the strike price with the most Put options, acting as a solid price floor (support).
Manual Max Pain Level: Locate the value labeled as Max Pain on the source website. This is the price where the most options would expire worthless for buyers.
Mode 2: Auto Probability Barriers (Statistical Mode)
If you don't want to manually input data, the Auto Mode calculates theoretical barriers based purely on math and volatility, providing highly probable, yet slightly less precise, support/resistance levels.
✅ How to use the Auto Mode:
Enable the Enable Auto Probability Mode checkbox in the indicator settings.
The script will automatically set the Call/Put Walls at the 2-Standard Deviation (95% probability) range.
You still need to update the Implied Volatility (IV) % and Days Until Expiration to ensure the calculations are accurate for today's market conditions.
CrowdFlowThis CrowdFlow indicator helps frame how crowded the market is, not where it should go. This is relative comparison to the bars with respect to look back period of your choice. It show you where the real participation is, not conviction. This indicator visualizes what is normally expected at the same time of day.
High participation reflects attention and engagement, not certainty.
Low participation reflects acceptance or indifference, not weakness.
🟢 Green — Low participation
Volume is below the usual intraday expectation
Market activity is subdued
Price movement tends to be slower and more contained
Participation is selective rather than broad
⚪ Grey — Normal participation
Volume is within its typical intraday range
Market is behaving as expected
Price may continue, pause, or rotate without urgency
Participation is balanced
🔴 Red — High participation
Volume is significantly above normal for that time of day
Indicates crowd involvement and urgency
Market is being actively pushed or contested
Expect faster moves, extensions, or instability
Limit Zone Phenix Final# Limit Zone Phenix Final — Description for TradingView
```
LIMIT ZONE PHENIX FINAL
Professional Smart Money Concepts (SMC) Support & Resistance Indicator
═══════════════════════════════════════════════════════════════
📊 WHAT IS LIMIT ZONE PHENIX FINAL?
Limit Zone Phenix Final is an institutional-grade indicator designed to identify and track significant support and resistance levels using pivot point methodology combined with advanced Smart Money Concepts (SMC) principles.
The indicator automatically detects swing highs and lows, creates horizontal limit zones, and manages them intelligently through a history-based architecture that never loses data due to object limits.
═══════════════════════════════════════════════════════════════
🎯 KEY FEATURES
✅ PIVOT-BASED LEVEL DETECTION
• Identifies swing highs (resistance) and swing lows (support)
• Configurable left/right bar sensitivity for precise extremum confirmation
• Eliminates noise by requiring multi-bar confirmation
✅ INFINITE HISTORY ARCHITECTURE
• Stores up to 5,000 historical levels in memory
• Never loses data when display limits are reached
• When a level is invalidated, the next live level automatically appears
• Perfect for long-term analysis and backtesting
✅ DUAL INVALIDATION MODES
• Wick Break: Level invalidated when price wick crosses the zone
• Body Break: Level invalidated when candle body closes beyond the zone
• Choose the mode that matches your trading style
✅ INDEPENDENT ZONE CONTROL
• Separate maximum display limits for resistance and support zones
• Display 1-100 zones independently for each type
• Customize colors, line width, and line style for each
✅ ANTI-REPAINT PROTECTION
• All level creation and invalidation occurs only on confirmed candles (barstate.isconfirmed)
• Zero repainting — what you see is what you get
• Reliable for strategy backtesting and live trading
✅ PROFESSIONAL STYLING
• Separate Style menu for all visual parameters
• Separate Logic menu for all trading parameters
• Solid, Dashed, or Dotted line styles
• Full color customization
═══════════════════════════════════════════════════════════════
⚙️ HOW TO USE
1. ADD TO CHART
• Open any chart on TradingView
• Search for "Limit Zone Phenix Final"
• Click "Add to Chart"
2. CONFIGURE LOGIC SETTINGS
• Pivot Left Bars: Number of bars to the left for extremum confirmation (default: 5)
• Pivot Right Bars: Number of bars to the right for extremum confirmation (default: 5)
• Max Resistance Zones: Maximum resistance lines to display (default: 10)
• Max Support Zones: Maximum support lines to display (default: 10)
• Invalidation Mode: Choose "Wick" or "Body" break (default: Wick)
• History Capacity: Maximum levels stored in memory (default: 1000)
3. CUSTOMIZE STYLE
• Resistance Color: Choose your preferred color for resistance zones
• Support Color: Choose your preferred color for support zones
• Resistance Width: Line thickness (1-5 pixels)
• Support Width: Line thickness (1-5 pixels)
• Resistance Style: Solid, Dashed, or Dotted
• Support Style: Solid, Dashed, or Dotted
═══════════════════════════════════════════════════════════════
💡 TRADING APPLICATIONS
🔹 SWING TRADING
• Identify key support/resistance for entry and exit points
• Set stop losses below support or above resistance
• Take profits at next resistance/support level
🔹 SCALPING
• Use smaller pivot settings (Left/Right = 2-3) for micro-levels
• Combine with lower timeframes (5m, 15m)
• Quick reversals at limit zones
🔹 POSITION TRADING
• Use larger pivot settings (Left/Right = 10-20) for macro-levels
• Identify major support/resistance on daily/weekly charts
• Long-term trend analysis
🔹 CONFLUENCE TRADING
• Combine with other indicators (moving averages, trendlines, volume)
• Look for price reactions at multiple zones simultaneously
• Higher probability setups
═══════════════════════════════════════════════════════════════
🔧 TECHNICAL SPECIFICATIONS
• Language: Pine Script v6
• Compatibility: TradingView (all chart types)
• Max Objects: 500 lines (optimized pool architecture)
• History Capacity: Up to 5,000 levels
• Repaint Protection: Full (barstate.isconfirmed)
• Performance: Optimized for all timeframes
═══════════════════════════════════════════════════════════════
📈 EXAMPLE SCENARIOS
SCENARIO 1: Max Zones = 1
• Display only the most recent LIVE resistance and support
• When price breaks a level → next level appears instantly
• Perfect for traders who want minimal clutter
SCENARIO 2: Max Zones = 10
• Display 10 most recent resistance and 10 most recent support
• See multiple levels at once for confluence analysis
• Ideal for swing traders
SCENARIO 3: Wick vs Body Invalidation
• Wick Mode: More sensitive, levels invalidate on wick touch
• Body Mode: More conservative, levels invalidate on close beyond
• Choose based on your risk tolerance
═══════════════════════════════════════════════════════════════
⚠️ IMPORTANT NOTES
• This indicator identifies PIVOT-BASED levels, not every price extreme
• Levels require multi-bar confirmation (Left/Right bars)
• Not all price swings will create zones — only confirmed pivots
• Combine with price action analysis for best results
• Always use proper risk management and stop losses
═══════════════════════════════════════════════════════════════
🏆 PHENIX STANDARD
Limit Zone Phenix Final is built to institutional standards:
✓ Smart Money Concepts (SMC) methodology
✓ Anti-repaint architecture
✓ Infinite history management
✓ Professional code quality (Pine Script v6)
✓ Optimized performance
═══════════════════════════════════════════════════════════════
📞 SUPPORT & FEEDBACK
If you have questions, suggestions, or encounter issues:
• Leave a comment below
• Check the chart examples
• Test on different timeframes and assets
Happy Trading! 🚀
US Stock Market Performance by Sector[Dots3Red]This indicator displays the annual performance of the U.S. stock market by sector.
Selected major sectors
IND – Industrials
TECH – Technology
HTH – Healthcare
FIN – Financials
COMM – Communication Services
CONSCYC – Consumer Cyclical
CONSSTAP – Consumer Staples
ENERGY – Energy
REAL ESTATE – Real Estate
BASMAT – Basic Materials
The data is presented in a table below the main chart.
Green cell — the sector was bullish during that year
Red cell — the sector was bearish during that year
The table automatically sorts sectors by performance, placing the best-performing sector at the top for each year.
NOTE:
Annual performance is calculated starting from 2020 by default (arbitrarily chosen) and can be adjusted by the user.
Sharpe Ratio [Alpha Extract]A sophisticated risk-adjusted return measurement system that calculates annualized Sharpe Ratio with dynamic color-coded visualization distinguishing return quality across positive and negative performance regimes. Utilizing rolling period calculations with smoothed moving average comparison, this indicator delivers institutional-grade performance assessment with overbought/oversold threshold detection for extreme risk-adjusted return conditions. The system's four-tier color classification combined with histogram fills and background highlighting provides comprehensive visual feedback on whether current returns justify their volatility risk across varying market cycles.
🔶 Advanced Sharpe Ratio Calculation Engine
Implements classic Sharpe Ratio methodology measuring mean daily return divided by return standard deviation with annualization factor for consistent interpretation. The system calculates daily percentage returns, computes rolling mean and standard deviation over configurable periods, applies square root of 365 scaling for annualized comparison, and generates unbounded ratio values where higher positive readings indicate superior risk-adjusted performance.
// Core Sharpe Ratio Framework
Daily_Return = close / close - 1
Mean_Return = ta.sma(Daily_Return, Period)
StdDev_Return = ta.stdev(Daily_Return, Period)
Sharpe_Ratio = (Mean_Return / StdDev_Return) * sqrt(365)
🔶 Dynamic Four-Tier Color Classification
Features sophisticated color logic distinguishing between strong positive returns (green), weakening positive returns (yellow), weakening negative returns (orange), and strong negative returns (red) based on relationship to smoothed average. The system compares current Sharpe against SMA-smoothed baseline, applying green when positive and accelerating, yellow when positive but decelerating, orange when negative but improving, and red when negative and deteriorating for nuanced regime assessment.
🔶 Smoothed Baseline Comparison Framework
Implements SMA smoothing of Sharpe Ratio with configurable period to establish momentum reference line for trend determination within risk-adjusted returns. The system calculates simple moving average of raw Sharpe values, uses this smoothed line as directional benchmark, and determines whether current risk-adjusted performance is strengthening or weakening relative to recent average for color classification logic.
🔶 Extreme Threshold Detection System
Provides overbought and oversold level identification with configurable upper and lower bounds marking exceptional risk-adjusted return extremes. The system defaults to +4.3 for overbought threshold (extremely favorable risk-return profile) and -2.3 for oversold threshold (severely unfavorable risk-return profile), applying dashed horizontal reference lines and background highlighting when Sharpe breaches these statistical extremes requiring attention.
🔶 Histogram Fill Visualization Architecture
Creates gradient-filled histogram between Sharpe Ratio line and zero baseline using dynamic color matching with 30% transparency for intuitive positive/negative return distinction. The system fills area above zero with bullish colors (green/yellow) and below zero with bearish colors (orange/red), providing immediate visual confirmation of whether returns are compensating for volatility risk or destroying risk-adjusted value.
🔶 Background Zone Highlighting Framework
Implements subtle background coloring when Sharpe enters extreme overbought or oversold zones, alerting traders to statistically significant risk-adjusted return conditions. The system applies semi-transparent red background when ratio exceeds +4.3 (exceptionally strong risk-adjusted returns potentially unsustainable) and green background when below -2.3 (severely poor risk-adjusted returns potentially reversionary), creating visual alerts without obscuring price action.
🔶 Annualization Methodology Integration
Utilizes standard square root of time scaling (sqrt(365)) to convert rolling period Sharpe calculations into annualized format for cross-temporal comparison. The system applies this mathematical transformation ensuring Sharpe values represent expected annual risk-adjusted returns regardless of calculation period length, enabling consistent interpretation whether using 100-day or 200-day rolling windows.
🔶 Zero-Line Reference System
Provides critical zero-line plot serving as boundary between positive risk-adjusted returns (capital allocation justified by return/risk profile) and negative risk-adjusted returns (strategy destroying value on risk-adjusted basis). The system emphasizes this threshold as decision point where values above zero suggest continuation while values below zero indicate reconsideration of exposure.
🔶 Momentum-Based Color
Transitions Implements intelligent color switching logic that considers both absolute Sharpe value and its momentum relative to smoothed average, creating four distinct regimes for granular performance assessment. The system enables identification of bullish acceleration (green), bullish deceleration (yellow), bearish improvement (orange), and bearish acceleration (red) for nuanced position management beyond simple positive/negative classification.
🔶 Configurable Period Optimization
Features adjustable calculation period and smoothing length enabling optimization across different trading timeframes and volatility regimes. The system defaults to 150-period calculation (approximately 6-7 months of daily data) with 30-period smoothing, but allows customization from short-term tactical assessment to long-term strategic evaluation based on investment horizon and strategy requirements.
🔶 Performance Optimization Framework
Employs efficient rolling calculations with streamlined daily return processing and optimized standard deviation computation for smooth real-time updates. The system includes minimal computational overhead through single-pass mean and variance calculations, enabling consistent performance across extended historical periods while maintaining accuracy of risk-adjusted return measurements.
This indicator delivers sophisticated risk-adjusted return analysis through classic Sharpe Ratio methodology with enhanced visual classification distinguishing return quality and momentum. Unlike simple return-focused indicators, Sharpe Ratio penalizes volatility ensuring traders evaluate whether returns justify the risk undertaken. The system's four-tier color coding, smoothed baseline comparison, and extreme threshold detection make it essential for portfolio managers and systematic traders seeking objective performance assessment beyond raw price gains. High positive Sharpe values indicate efficient return generation relative to volatility risk, while negative values signal value destruction on risk-adjusted basis requiring strategy reassessment. The indicator excels at identifying periods when risk-taking is rewarded (green zones) versus periods when volatility exceeds returns (red zones) across cryptocurrency, forex, and equity markets for optimal capital allocation decisions.
Weekend % Gap in Price by eccuity.comThis indicator displays the percentage gap between each week's closing price and the following week's opening price on weekly charts.
How it works:
Calculates the gap as: (Week Open - Previous Week Close) / Previous Week Close × 100
Displays a label above each weekly candle showing the gap percentage
Green labels indicate a gap up (market opened higher than prior close)
Red labels indicate a gap down (market opened lower than prior close)
Features:
Only displays on weekly timeframes
Shows a summary table with the last 8 weeks of data including dates, prices, and gap percentages
Calculates a running average of all weekend gaps
Configurable label size (tiny, small, normal)
Alert condition for gaps exceeding a customizable threshold
Use cases:
Identify weekend sentiment shifts and overnight risk
Analyze historical gap patterns for a specific instrument
Track how news and events over weekends impact opening prices
Copy gap data from the table for further analysis
Note: The indicator uses the weekly bar's open and previous bar's close, which automatically accounts for market holidays (e.g., if the market closes Thursday or opens Tuesday).
Smart Auto-Step Openndicator Name: 15m Reversal Strategy (Polymarket)
Short Description: A mean-reversion strategy designed for the 15-minute timeframe. It identifies overextended short-term trends and signals entries on the probability of a reversal candle.
Top 40 Best Performing Nasdaq Stocks with Advanced Stats ScreenWelcome to the CustomQuantLabs Advanced Stats Screener. This dashboard is designed for traders who need more than just price action—it provides a comprehensive, institutional-grade view of the "Top 40" performing assets in the Nasdaq (or any watchlist of your choice) at a single glance.
Instead of flipping through 40 different charts, this screener aggregates Performance Metrics and Advanced Statistical Risk Models into one clean, heatmap-style dashboard. It helps you instantly identify outliers, trend leaders, and potential mean-reversion setups.
Key Features
1. Multi-Timeframe Performance Heatmap Instantly spot momentum. The dashboard tracks returns across 5 key timeframes, color-coded with a dynamic heatmap (Bright Green for leaders, Bright Red for laggards):
Week% (Short-term momentum)
Month% & Quarter% (Medium-term trend)
6M% & 12M% (Long-term secular trend)
2. Institutional Risk Metrics (Advanced Stats) We go beyond simple percentage changes. This screener calculates complex statistical formulas for every single ticker in real-time:
Kelly Criterion (%): A money management formula used to determine optimal position size based on win probability and return ratio. A higher Kelly % suggests a statistically stronger "edge" based on recent history.
Sharpe Ratio: Measures risk-adjusted return. How much return are you getting for every unit of risk? (Values > 1.0 are generally considered good).
Sortino Ratio: Similar to Sharpe, but only penalizes downside volatility. This is crucial for distinguishing between "good volatility" (upside pumps) and "bad volatility" (crashes).
Z-Score: A mean-reversion metric. It measures how many standard deviations the current price is from its 20-day mean.
High Positive Z-Score (>2): Price may be overextended to the upside.
Low Negative Z-Score (<-2): Price may be oversold.
Volatility (%): A dynamic measure of the asset's daily range, helping you gauge the "personality" of the stock before entering.
Customization & Settings
Fully Customizable Watchlist: While pre-loaded with top Nasdaq performers (like NVDA, AMD, PLTR, MU), you can easily edit the "Symbols" input in the settings to track Crypto, Forex, or your own custom stock portfolio.
Smart Theme Detection: Includes a toggle for Dark Mode (ProjectSyndicate style) and Light Mode (Clean white style).
Compact Mode: You can toggle specific columns on or off to fit the table on smaller screens.
How to Use
Add the script to your chart.
Open Settings (Gear Icon).
Paste your list of 40 tickers into the "Ticker List" text area (separated by commas).
Use the Z-Score to find overbought/oversold setups and the Relative Strength (Week/Month) to find breakout candidates.
Disclaimer: This tool is for informational purposes only. The "Top 40" list requires manual updating if the market leaders change. All statistical metrics (Kelly, Sharpe, etc.) are based on historical data and do not guarantee future performance.
Built by CustomQuantLabs.
Volume + ATR Robust Z-Score Suite (MAD)Measure relevant volumes together with high-volatility candles, providing initiative signals based on volume. Mark the relevant candle and use it as support or resistance.
Emotions TagebuchEmotions Diary
This indicator is designed as a simple emotional trading journal directly on your chart.
It allows you to document:
Emotions before the trade
Emotions during the trade
Emotions after the trade
Additional notes
You can also define custom emotional tags (e.g. FOMO, Overtrading, Fear, Flow) and assign them to each phase of the trade with a single click.
Selected tags can optionally be automatically appended to the corresponding text fields.
The goal is to help you:
increase emotional awareness
identify recurring emotional patterns
improve discipline and decision-making
Fully customizable in design, position, and content.
Built for traders who want to work not only on their strategy — but on themselves.
Smart Auto-Step Open (1H Base)The "Big Brother" to the 15m Open: While the 15m Open is perfect for scalping entries, this indicator is designed for Trend Direction & Bias. It automatically identifies the major Hourly and Daily opening levels, giving you the "Big Picture" context instantly.
🧠 Smart Auto-Step Logic: This script detects your timeframe and automatically upgrades the level to the next major resistance:
Intraday Mode (1s – 1H): Locks to the 1-Hour Open. This is your primary "Bull/Bear" line for the session.
Swing Mode (4H): Automatically switches to the 4-Hour Open.
Daily Mode (D): Automatically switches to the Daily Open.
Noise Filter: Hides automatically on intermediate frames (like 2H or 3H) to keep your chart clean.
✨ Luxury Visuals:
Floating Labels: No ugly boxes. Text floats cleanly in the right-side margin.
Custom Typography: Includes a "Luxury" setting that uses Bold Serif Unicode characters (e.g., 𝟏𝐇 𝐎𝐩𝐞𝐧) for a high-end, institutional look.
Dark Mode Optimized: Defaulted to Bright White for maximum contrast.
🚀 Key Features:
Zero-Lag Anchor: Uses time-based coordinates to ensure the line never repaints.
Smart Visibility: Works perfectly even if you are viewing the 1H chart itself (prevents the "disappearing line" bug).
Price Tags: Displays the exact price with a $ symbol.
PRO Strategy (The "Confluence" Setup): Load this indicator together with the "15m Open" version.
When Price is above the 15m Open AND the 1H Open → Strong Buy Signal.
When Price is below both → Strong Sell Signal.
Settings:
Font Style: Modern, Luxury, or Hacker.
Offset: Move the label right/left.
Color: Fully customizable.
Meine LearningsTop Learnings Panel – Stay Focused on What Matters
This tool is designed to keep your most important trading learnings, rules, and reminders permanently visible on your chart.
It helps maintain focus, reduce emotional decision-making, and reinforce consistent, rule-based execution.
Use Case
The panel is intentionally simple and ideal for:
documenting key trading learnings
displaying core trading rules or principles
mental reminders before and during a trading session
summarizing insights from journaling, reviews, or backtesting
How It Works
A freely configurable headline defines the current focus (e.g. Top Learnings, Trading Rules, Session Focus).
Up to 10 fully customizable text points can be entered.
Each point can be shown or hidden individually.
Headline and text rows can be styled independently (font size, colors, background, alignment, position).
Purpose
This panel is not an analysis tool.
It acts as a visual anchor to keep your most important rules in sight — exactly where decisions are made: on the chart.
SMC Market Structure + MTF Liquidity PRO STATS [MaB] SMC Market Structure + MTF Liquidity PRO STATS (INVITE-ONLY)
This is NOT a simple pivot detector or a mashup of existing indicators. It's a proprietary state machine algorithm specifically designed for Smart Money Concepts (SMC) traders.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ WHY THIS IS DIFFERENT - THE METHODOLOGY
Most market structure indicators on TradingView use pivot detection (e.g., "highest high of last X bars"). This approach creates two major problems:
1. No validation - a pivot is marked immediately, often leading to false signals
2. Repainting - pivots shift as new bars form
This indicator uses a state machine approach instead:
The algorithm processes each bar through distinct states:
• Monitoring - Tracking price movement after confirmed swing point
• Candidate - Potential swing detected, awaiting validation
• Validating - Checking confirmation criteria (candle count + pullback %)
• Confirmed - Swing point validated and locked
• Breakout - Monitoring for structure break or continuation
Each swing high/low must pass THREE validation checks before confirmation:
1. Minimum candles elapsed (default: 6)
2. Required pullback percentage met (default: 10% of range)
3. Breakout threshold exceeded (default: 5%, auto-reduced to 0.001% on large legs >2.5x avg)
This eliminates repainting - a confirmed point stays confirmed. The info table shows real-time validation progress: "Validating... 4/6 candles, 7.2%/10% pullback".
Liquidity Detection Method:
The algorithm detects Fair Value Gaps (FVG) using chain analysis:
1. Identifies consecutive FVG candles
2. Tracks price behavior after detection
3. Classifies zones based on validation timing
Two distinct zone types:
• Imbalances (validated zones) - FVG detected, then swing point confirmed → genuine institutional interest
• Inducements (invalidated zones) - FVG detected but invalidated before confirmation → liquidity trap
This distinction helps identify high-probability reaction zones vs. false signals.
Why Market Structure is Essential for Liquidity Classification:
This is NOT a simple combination of two separate indicators (structure + liquidity). The market structure validation state is REQUIRED to classify liquidity zones correctly.
Here's why they must be integrated:
A Fair Value Gap alone tells you nothing about its quality. The same FVG can be either:
• A genuine imbalance (institutional interest)
• OR a liquidity trap (inducement)
The classification depends entirely on WHEN the swing point gets confirmed:
Scenario A - IMBALANCE:
1. FVG forms at bar 100
2. Price retraces
3. Structure validation completes at bar 105 (swing confirmed)
4. FVG is classified as IMBALANCE → price respected the zone, structure confirmed it
Scenario B - INDUCEMENT:
1. FVG forms at bar 100
2. Price immediately reverses through the FVG
3. FVG gets invalidated at bar 102 (before structure confirmation)
4. FVG is classified as INDUCEMENT → liquidity trap, price didn't respect it
Without the state machine tracking structure validation timing, you cannot make this distinction. The liquidity detection algorithm queries the market structure state continuously to determine zone classification.
This is why market structure and liquidity must be deeply integrated in the same indicator - they are not independent features combined together, but interdependent components of the same analytical framework.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 PROPRIETARY FEATURES (WHY INVITE-ONLY)
1. Multi-Timeframe (MTF) Integration
Overlays higher timeframe FVG zones directly on your chart using request.security() with custom pure functions. This required extensive development to handle state-free detection while maintaining accuracy across timeframe switches.
2. Advanced Trend Statistics
Statistical analysis engine that calculates:
• Continuation Rate - Probability of Break of Structure (BOS) after pullback
Formula: (Total BOS) / (BOS + Reversals) × 100
Helps identify trending vs choppy market conditions
• Streak Analysis - Tracks consecutive continuations before reversal
Compares current streak to historical average (separate for uptrend/downtrend)
Color-coded risk assessment (green: below avg, yellow: at avg, red: above avg)
• Extension Ratios - Measures momentum strength using σ-filtered averages
Calculates how much new highs/lows exceed previous relative to pullback zone
Filters outliers using standard deviation to provide clean averages
These metrics required custom pattern recognition algorithms to identify valid retest zones and measure extensions accurately.
3. Adaptive Breakout Detection
Dynamic threshold adjustment based on leg amplitude:
• Normal legs: use standard threshold (1-5%)
• Large legs (>2.5x avg): threshold auto-reduced to 0.001%
This prevents missed breakouts on strong directional moves while maintaining noise filtering on typical price action.
4. Zone Size Intelligence
Proprietary filtering system that:
• Tracks historical zone sizes (separate arrays for TF and MTF)
• Calculates rolling averages (last 50 zones)
• Filters abnormally small zones (default: <15% of avg rejected)
• Prevents chart clutter from micro-FVGs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 WHAT YOU GET
Market Structure Tracking:
• Automatic swing high/low labeling (H1, H2... L1, L2...)
• Real-time validation progress in info table
• Instant structure updates on timeframe switch
• No repainting - confirmed points are locked
Liquidity Zones (Current TF):
• Imbalance zones (green/red) - validated institutional interest
• Inducement zones (orange/blue) - liquidity traps
• Automatic lifecycle tracking (active vs touched zones)
• Configurable retracement % to mark zones as touched
Multi-Timeframe Zones:
• Higher TF FVG overlay (e.g., Daily zones on 4H chart)
• Distinct colors (purple/fuchsia) for easy identification
• Separate size filtering for MTF zones
• Confluence detection between timeframes
Trend Analysis Table:
• Continuation Rate with color-coded thresholds
• Current Streak vs historical average
• Streak Average UP/DN (trend persistence)
• Extension UP/DN (momentum strength)
• All metrics update in real-time
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ CONFIGURATION
Market Structure:
• Min Confirmation Candles (1-100, default: 6)
• Required Pullback % (1-50%, default: 10%)
• Breakout Threshold (0-20%, default: 5%)
Liquidity Zones:
• Zone Size Tolerance (10-99%, default: 85%) - strictness of size filter
• Zone Retracement % (0-100%, default: 0%) - touch sensitivity
• Inactive Zones Transparency (50-99%, default: 90%)
• Individual color controls for each zone type
Multi-Timeframe:
• MTF Timeframe selector
• Separate colors for MTF demand/supply zones
• Independent size filtering
Display:
• Toggle Market Structure Table
• Toggle Trend Analysis Table
• Dark/Light theme
• Replay Mode for TradingView bar replay
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHO BENEFITS
• SMC/ICT Traders - Automate structure markup and FVG identification
• Multi-Timeframe Analysts - See higher TF liquidity without chart switching
• Strategy Developers - Use trend statistics to refine entry/exit rules
• Learners - Understand market structure through real-time validation display
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 IMPORTANT NOTES
• Use on higher timeframes (4H, Daily) for cleaner structure
• Enable Replay Mode when using TradingView bar replay
• This is an analysis tool, not a signal generator
• Combine with your own strategy and risk management
• The free lite version "Market Structure HighLow + Liquidity " on my profile lacks MTF and trend statistics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY CLOSED-SOURCE & INVITE-ONLY
The custom algorithms include:
• State machine transition logic with 5+ states
• Custom pattern recognition for retest zones
• Statistical analysis with outlier filtering
• Adaptive threshold calculations
• Multi-timeframe pure function architecture
These represent months of development, testing, and refinement. The invite-only model allows me to:
• Provide dedicated support to users
• Gather feedback for continuous improvement
• Maintain the quality and exclusivity of the tool
This is not a simple combination of built-in indicators or public code. The logic and algorithms were developed from scratch - this does not use or combine existing public indicators like RSI, MA, Bollinger Bands, MACD, or community scripts.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, trading advice, or any other sort of advice.
Past performance is not indicative of future results. Trading involves substantial risk of loss and is not suitable for every investor. You should carefully consider your investment objectives, level of experience, and risk appetite before making any investment decisions.
The developer assumes no responsibility for any losses or damages resulting from the use of this indicator. Always do your own research and consult with a qualified financial advisor before making any trading decisions.
SITI LEMAN SR MTFSiti Leman Support and Resistance MTF
A multi-timeframe support and resistance indicator that automatically detects key price levels using pivot-based analysis, featuring zone strength tracking and automatic zone expiration.
Features:
Core Features:
- Multi-Timeframe Detection - Analyze S&R from Chart, 15M, 1H, 4H, Daily, or Weekly timeframes
- Dynamic Zones - Automatically drawn support/resistance zones with adjustable margins
- Manipulation Detection - Identifies liquidity sweep zones above resistance and below support
- Smart Signals - Breakouts, Tests, Retests, and Rejection signals with volume confirmation
- False Breakout Filter - Optional filter to avoid signals from failed breakouts
- Swing Labels - Higher Highs, Lower Highs, Higher Lows, Lower Lows with volume data
- Status Table - Real-time display of current bias, resistance, support levels, and zone strength
- Alerts - Built-in alerts for all signal types and high volume spikes
New Features:
- Zone Strength Tracking - Zones become more visible with each test/retest, helping identify the most significant levels
- Zone Expiration - Old untested zones automatically fade out, reducing chart clutter
- Optional ATR-Based Zones - Experimental feature to calculate zone width using ATR instead of percentage
How It Works:
The indicator uses pivot highs/lows to identify significant price levels, then tracks price interaction with these zones. When price breaks through a level, the zone flips from resistance to support (or vice versa). Volume analysis helps confirm the significance of price rejections.
Zone strength is tracked by counting how many times a zone has been tested or retested. Stronger zones (more touches) appear more prominent on the chart. Zones that remain untested for a configurable number of bars will fade to gray, indicating they may be less relevant.
Settings Guide:
Zone Detection Settings:
- Detection Timeframe: Select which timeframe to use for pivot detection
- Detection Length: Number of bars to look back for pivot points (higher = fewer, more significant zones)
- Zone Margin: Controls the thickness of S&R zones
Zone Strength Settings:
- Show Zone Strength: Toggle visibility enhancement for frequently tested zones
- Visibility Boost Per Touch: How much more visible zones become with each touch
Zone Expiration Settings:
- Enable Zone Expiration: Toggle automatic fading of old zones
- Expire After (bars): Number of bars before untested zones start fading
- Expired Zone Transparency: How transparent expired zones become
ATR Zone Settings (Optional):
- Use ATR-Based Zone Width: Switch from percentage-based to ATR-based zone calculation
- ATR Length: Period for ATR calculation
- ATR Multiplier: Multiplier for zone width
Best Used For:
- Identifying key entry/exit zones
- Spotting potential reversals at S&R levels
- Detecting manipulation/stop hunts
- Confirming trend direction via market structure
- Finding the strongest support/resistance levels via zone strength
Trend Strength [OmegaTools]Trend Strength is a quantitative regime oscillator designed to measure directional pressure and trend quality by blending price structure, return-dependence, realized intrabar expansion, and volume participation into a single normalized signal. The goal is not to predict, but to classify market state: when price action is in an expansionary/distributionary phase versus when it is in a contractionary/accumulation phase, so you can align execution and risk with the prevailing environment.
Core concept and methodology
The indicator aggregates four components computed on stable rolling windows and mapped into comparable ranges:
1. Price location / structural positioning (100-bar range)
A normalized price-location metric (position of close within the rolling high–low range) is transformed into a non-linear “strength” profile. This emphasizes meaningful departures from the middle of the range and penalizes indecision, producing a structure-aware contribution rather than a raw oscillator.
2. Return-dependence / directional persistence (100 bars)
A correlation term measures the relationship between the current return (close − close ) and the prior price level (close ). This helps detect environments where movement is more persistent or more mean-reverting, providing a statistical component that complements pure price-location signals.
3. Realized expansion / volatility proxy (50-bar accumulation, 300-bar normalization)
Intrabar expansion is approximated via the absolute candle body relative to the full range, aggregated over a short window to represent realized “effort” and then normalized over a longer window. This captures whether price is moving with meaningful body expansion versus compressing and stalling.
4. Volume participation (11-bar accumulation, 300-bar normalization)
A rolling volume sum is normalized over a longer window to quantify participation. This helps separate “thin” moves from moves supported by broader activity, without relying on exchange-specific volume assumptions.
The final oscillator is a weighted blend of these four normalized components, scaled for readability. The output is intentionally centered around two actionable regimes rather than a symmetric overbought/oversold framework.
How to read the oscillator
Trend Strength is designed around two main thresholds:
- Distribution / Expansion regime (oscillator above 0)
When the oscillator is above 0, the market is classified as being in a higher-pressure expansion regime. This often corresponds to directional continuation potential, stronger impulse behavior, and reduced suitability for tight mean-reversion tactics.
- Accumulation / Contraction regime (oscillator below −1.3)
When the oscillator is below −1.3, the market is classified as being in a contraction/accumulation regime. This frequently corresponds to compression, rotation, and lower directional efficiency, where breakouts may be more fragile and mean-reversion tactics may be more appropriate (depending on instrument and session conditions).
Values between 0 and −1.3 are treated as transitional/neutral, where the market is not clearly committing to either regime.
Continuous Mode vs Standard Mode
Trend Strength includes an optional Continuous Mode to improve interpretability during regime transitions:
- Standard Mode colors only when the oscillator is firmly in one of the two regimes (above 0 or below −1.3). Neutral zones remain uncolored, keeping the display conservative.
- Continuous Mode adds persistence logic: once a regime is confirmed, intermediate values are rendered with a lighter shade of the last confirmed regime until the opposite regime is confirmed. This reduces visual noise, helps maintain a consistent directional bias framework, and is particularly useful for intraday execution and session trend management.
Visual design and bar coloring
The oscillator line is color-coded:
- Purple: distribution / expansion regime
- Orange: accumulation / contraction regime
Neutral/transitional values are displayed in grey (or lightly shaded in Continuous Mode based on last confirmed regime).
Optionally, the indicator can color price bars using the same regime logic, allowing rapid at-a-glance regime recognition directly on the chart.
Practical use cases
- Regime filter for strategies: enable trend-following logic only in expansion regimes; enable mean-reversion or range logic in contraction regimes.
- Risk adjustment: increase/decrease position sizing or tighten/widen stops based on regime classification.
- Confirmation layer: combine with structure tools (market structure, VWAP, key levels) to validate whether conditions support continuation or imply compression.
- Session management: identify when a session is behaving as a trend day versus a rotational day, improving trade selection and reducing overtrading.
Notes
Trend Strength is a regime classifier and contextual tool. It does not guarantee future direction and should be integrated into a complete decision process (risk management, market structure, session context, and instrument-specific behavior).
© OmegaTools
Sigmoid Allocation Indicator & DashboardTL;DR This sigmoid-based allocation indicator tells you percentage of your portfolio to invest based on how much the market has dropped.
Market at all-time high? → Stay defensive, invest less (e.g., 30%)
Market crashed hard? → Get aggressive, invest more (e.g., 100%)
The "sigmoid" part just means the transition between these two extremes follows a smooth S-shaped curve.
Description
This indicator is a sigmoid-based allocation system that dynamically adjusts a portfolio exposure based on market drawdown.
It compares multiple steepness curves (K values) to find your optimal risk profile for leveraged ETF strategies, but it can also be used to scale in-out from stocks, crypto and to understand whether to use leverage or not.
The Sigmoid Allocation Dashboard helps you to dynamically adjust a portfolio allocation based on how much a market has dropped from its all-time high.
I've implemented it using a sigmoid (S-curve) function, that dynamically calculates the optimal allocation percentages. Depending on the market conditions, the S curves transition between defensive and aggressive allocations.
The Math Behind It (if you are a geek like me)
This indicator uses the sigmoid function to create smooth S-curve transitions:
α(D) = α_min + (α_max - α_min) × σ(k × (D - D_mid))
Where:
σ(x) = 1 / (1 + e^(-x)) ← Standard sigmoid function
You can also check it here:
// Sigmoid function: σ(x) = 1 / (1 + e^(-x))
sigmoid(float x) =>
1.0 / (1.0 + math.exp(-x))
// Alpha calculation: α(D) = α_min + (α_max - α_min) × σ(k × (D - D_mid))
calcAlpha(float drawdown, float k, float a_min, float a_max, float d_midpoint) =>
sig_input = k * (drawdown - d_midpoint) / 100.0
a_min + (a_max - a_min) * sigmoid(sig_input)
User parameters (you can tweak this):
Allocation Min (%): Your baseline allocation when markets are at ATH (default: 30%)
Allocation Max (%): Your maximum allocation during deep drawdowns (default: 100%)
D_mid (%): The drawdown level where you want to be at the midpoint (default: 25%)
Why do I like sigmoid and not a linear line?
Unlike linear models, the sigmoid creates "floors" and "ceilings" for your allocation. It transitions smoothly, no sudden jumps, and you never exceed your defined min/max bounds.
Understand the K Values (Steepness)
The K parameter controls how quickly your allocation shifts from defensive to aggressive.
Lower K (for example K=5) will give you a gradual transition, but at 0% drawdown you are already at a 46% allocation.
A higher like (like K=40) will give you a sharp transition, but at 0% drawdown you are close to the minimum allocation. On the other hand, a higher K will give close to 100% allocation when the markets are at new lows.
The example below illustrates this well, then the S&P 500 reached new lows in October 2022:
Different K values will affect the sigmoid curves (and you allocations differently). The chart below illustrates well how K affects the sigmoid curves:
Read the Dashboard
The main dashboard shows:
Current drawdown from ATH
Allocation % for each K value
Suggested action (Defensive → MAX LONG)
Use the Reference Chart
The static reference panel shows what your allocation would be at various drawdown levels (0%, 10%, 20%, 30%, 40%, 50%), helping you plan ahead.
Identify Zones
The color-coded chart background shows:
- 🟢 Green Zone: Aggressive positioning - "Buy the Dip"
- 🟡 Yellow Zone: Transition zone - Scaling in/out
- 🔴 Red Zone: Defensive positioning - Protect ya gains
Use Cases
Use case 1: Leveraged ETF Portfolio Management (this is my main use case)
When holding leveraged ETFs like TQQQ or UPRO, volatility makes it important to:
- Reduce exposure near all-time highs (when crashes hurt most)
- Increase exposure during drawdowns (when recovery potential is highest)
Example Strategy:
- At ATH: Hold 30% TQQQ, 70% cash/bonds or other uncorrelated assets
- At 25% drawdown: Hold 65% TQQQ, 35% cash/bonds
- At 40%+ drawdown: Hold 100% TQQQ
Use case 2: Diversified Leveraged Portfolio
Compare different K values for different assets:
- Use K = 10 for broad market (QQQ/SPY exposure via TQQQ/UPRO)
- Use K = 25 for sector bets (TECL, SOXL, TMF) that you want to scale into faster
Use case 3: Systematic Rebalancing Signals
Use the alerts to trigger rebalancing:
- Alert when K3 allocation crosses above 90% (time to add)
- Alert when drawdown exceeds your D_mid threshold
- Alert when market returns to within 5% of ATH
Tips for Best Results
It works best in longer time frames
Adjust the ATR lookback window
Match your risk tolerance level
I use this for index investing and stocks and haven't tried with crypto
Thanks for using the indicator and let me know if you have any feedback :)
- Henrique Centieiro






















