Power Hour Trendlines [LuxAlgo]The Power Hour Trendlines indicator is based on Power Hours detection, and includes up to three displayed trendlines derived from the closing prices of all the bars within the last user-selected Power Hours.
Users can edit the time of Power Hours, choose how many sessions to take into account, enable or disable any trendlines, and change their colors.
🔶 USAGE
The Power Hour is defined as the last hour of the trading session and is set by default from 3:00 p.m. to 4:00 p.m. New York time. During this period, volume and volatility enter the market. Traders using higher timeframes may use this period to enter or exit positions by placing MOC (Market on Close) orders.
This tool works under the hypothesis that prices made during power hours (periods with high trading activity) are more relevant when used for the construction of trendlines.
An initial trendline is fit using linear regression; prices from power hours located above this initial fit are used for the upper trendline, while the ones below the fit are used for the lower one.
As with any trendline, traders can analyze the slope to determine the market's direction:
Positive slope: The market is trending up.
Negative slope: The market is trending down.
No slope: The market is trending sideways.
As we can see in the image, Nasdaq and Bitcoin are clearly in downtrends, gold is clearly in an uptrend, and the euro/U.S. dollar is in a sideways market over the last visible sessions.
As you can see, the trend lines may or may not be parallel to each other. The wider the area, the more volatile the data. The narrower the area, the less volatile the data. Let's look at an example.
In the image, the Dow30 and the euro/U.S. dollar have opposite behaviors. The volatility above the middle trendline is growing in the first case but shrinking in the second. In both cases, the volatility in the bottom area seems steady, so there are no big surprises there.
Traders can adjust the number of sessions for calculations, making the tool ideal for analyzing price behavior over different time frames.
As the image shows, we can clearly see how the market behaves over different time periods. XLY has been moving down over the last 10, 20, and 40 sessions, with a steeper decline over shorter periods. However, it has been moving sideways over the last 70 sessions.
One of the main uses of trendlines is to provide key support and resistance. In the image, SPY is shown with trendlines over the last 20 sessions. These lines provide excellent reference points for trading and observing price behavior in those areas, such as whether prices are accepted or rejected, which may trigger a response from other traders.
🔹 Not Allowed Timeframes
For obvious reasons, timeframes larger than 1H are not allowed. The Power Hour is defined as the last hour of the trading session. The tool will display a warning message if the timeframe is longer than 60 minutes.
🔶 SETTINGS
Power Hour (NY Time): Choose a custom Power Hour in New York time
Sessions Memory: Select how many Power Hours to take into account for calculations.
🔹 Style
Top: Enable or disable the top line and choose the line and background colors.
Middle: Enable or disable the middle line and choose the line color.
Bottom: Enable or disable the bottom line and choose the line and background colors.
Background: Enable or disable the background color for top and bottom lines.
Indicators and strategies
Apex Adaptive Trail [Neuro-Core]⚡ Apex Adaptive Trail
Apex Adaptive Trail is not just another trend-following indicator. It is a complete trading system powered by a "Neuro-Core" logic engine that evaluates trend quality in real-time, filtering out noise and adapting dynamically to market volatility.
Unlike standard Supertrends that provide static signals regardless of market conditions, Apex calculates a live Confidence Score (0-100%) for every trade, allowing you to distinguish between high-probability setups and weak signals.
🧬 Key Features
1. "Neuro-Core" Engine & Confidence Scoring The script constantly analyzes 4 confluence factors to assign a quality score to the trend:
EMA Baseline: Is price positioned correctly relative to the trend baseline?
ADX Momentum: Is there sufficient trend strength (>20)?
Chop Index: Is the market trending or ranging/choppy?
MTF Alignment: Does the Daily trend confirm the current direction? The result is a Confidence % displayed directly on the dashboard.
2. Two-Tier "Impact" Signals
BUY / SELL: Standard signals with Confidence > 75%. Solid for regular entries.
MAX 🔥: "Ultra Strong" signals with Confidence > 90%. These appear only when all filters are green and probability is maximized.
3. Adaptive Risk Management (Smart ATR) The market is not static. Apex reads current volatility:
High Volatility: The Trailing Stop automatically widens to prevent "whipsaws" (getting stopped out by noise).
Low Volatility: The stop tightens to protect profits faster.
4. Integrated Synthetic Heikin Ashi The script calculates Heikin Ashi smoothing internally to determine the trend. This allows you to keep your chart on Standard Candles for price action analysis, while enjoying the noise-reduction benefits of Heikin Ashi for the trend logic.
📊 The Analytics Dashboard
Located in the corner, it provides an instant X-Ray of the market:
Confidence: The quality score of the current signal (with dynamic emojis).
Active Filters: Shows how many confluence filters are currently passed (e.g., 3/4).
Market Mode: Tells you if the market is Volatile, Quiet, or Normal.
Trend Bias: The underlying trend direction.
Est. Win Rate: A real-time simulation based on historical signals (Entry vs. Trend Flip Exit).
🛠️ How to Use
Setup: Works on all timeframes, but excels on 15m, 1H, and 4H. Ideal for Crypto, Forex, and Indices.
Entry: Wait for an APEX BUY or SELL signal.
Pro Tip: Prioritize signals with the 🔥 emoji (MAX) or Confidence > 80%.
Trade Management:
Use the dotted TP1 and TP2 lines for partial profit taking.
Use the Trailing Stop line (the edge of the colored cloud) as your dynamic Stop Loss.
Visual Filter: The "Confidence Cloud" becomes more transparent when the trend is weak. If the cloud is fading out, exercise caution.
⚙️ Customizable Settings
Synthetic Heikin Ashi: Toggle the internal smoothing on/off.
Dynamic Targets: Choose if TPs should be fixed at entry or move dynamically with volatility.
Filters: You can individually enable/disable EMA, ADX, Chop, and MTF logic to suit your trading style.
⚠️ Disclaimer This tool is designed to assist in trading decisions, not to replace them. The Estimated Win Rate is based on the historical data loaded on the chart and does not guarantee future performance. Always manage your risk responsibly.
Please leave a like 👍 if you find this script useful and drop a comment with your feedback!
Volatility Regimes | GainzAlgo📊 OVERVIEW:
=========
This is a comprehensive ATR-based trading system designed for professional
traders who need advanced volatility analysis, precise trade management, and
intelligent market regime detection. The indicator combines multiple proven
volatility concepts into one powerful, customizable tool.
⭐ WHY THIS SYSTEM IS UNIQUE AND WORTHY OF PUBLICATION:
====================================================
This is not simply a collection of ATR-based indicators placed together.
It represents a unified volatility analysis framework where each component
is specifically designed to work in concert with the others, creating a
complete trading workflow that cannot be replicated by using multiple
separate indicators.
🔗 SYNERGISTIC INTEGRATION - How Components Work Together:
🧠 1. CONTEXT-AWARE ANALYSIS
The Volatility Regime Detection acts as the "brain" of the system,
classifying market conditions into 4 distinct phases. Every other
component then adapts its behavior based on this regime classification:
- ATR Bands expand/contract with regime changes
- Stop Loss distances automatically adjust (tighter in compression,
wider in high volatility)
- Take Profit targets scale proportionally to current regime
- Signal sensitivity filters itself based on market phase
📐 2. UNIFIED VOLATILITY FOUNDATION
All calculations share a single ATR baseline calculation, ensuring
internal consistency across the entire system. When ATR changes, every
element updates in perfect synchronization:
- Bands recalculate from the same ATR value
- Risk management levels use the same volatility measurement
- Regime classification and signals reference identical data
🛡️ 3. INTEGRATED RISK MANAGEMENT
The system doesn't just show WHERE to enter - it calculates HOW MUCH
to risk:
- Dynamic Stop Loss adapts to current ATR automatically
- Position Size Calculator uses the dynamic stop to compute exact quantities
- Take Profit levels scale proportionally, maintaining optimal risk:reward
✅ 4. TWO-STAGE SIGNAL CONFIRMATION
The alert system creates a logical progression:
Step 1: Volatility Breakout → Market energy is building
Step 2: Trend Confirmation → Direction confirmed with volatility support
This prevents false breakouts by requiring both volatility AND direction.
🏦 5. PROFESSIONAL WORKFLOW INTEGRATION
The system mirrors how institutional traders analyze markets:
Phase 1: Assess regime → What's the market doing?
Phase 2: Identify setup → Where's the opportunity?
Phase 3: Calculate risk → What's my exposure?
Phase 4: Set targets → Where do I take profit?
Phase 5: Monitor regime → When do conditions change?
❌ WHY NOT USE SEPARATE INDICATORS?
- Separate ATR Bands: Don't know about regime changes, remain static
- Separate Regime Indicator: Doesn't automatically adjust stop/targets
- Separate Position Calculator: Doesn't know your actual ATR-based stop
- Manual Integration: Requires constant mental calculation and cross-referencing
🧮 DETAILED CALCULATION METHODOLOGY:
=================================
📏 ATR (AVERAGE TRUE RANGE) CALCULATION:
- True Range = Maximum of:
1. Current High - Current Low
2. Absolute value of (Current High - Previous Close)
3. Absolute value of (Current Low - Previous Close)
- ATR = Simple Moving Average of True Range over specified period (default: 14)
📊 DYNAMIC ATR BANDS:
- Upper Band = Current Close + (ATR × Band Multiplier)
- Lower Band = Current Close - (ATR × Band Multiplier)
- Band 1: 1.0× ATR (closest support/resistance)
- Band 2: 2.0× ATR (intermediate zone)
- Band 3: 3.0× ATR (extended zone)
🌡️ VOLATILITY REGIME CLASSIFICATION:
Step 1: Calculate ATR Baseline
- Baseline ATR = SMA or EMA of ATR over long period (default: 50 bars)
- This represents "normal" volatility for the instrument
Step 2: Calculate ATR Ratio
- ATR Ratio = Current ATR ÷ Baseline ATR
- Example: If current ATR = 70 and baseline = 50, ratio = 1.40
Step 3: Classify Regime Based on Ratio
- COMPRESSION: Ratio < 0.70 (ATR is 30% below normal)
Market consolidating, volatility contracting, energy building
- EXPANSION: Ratio between 1.15 and 1.40 (ATR is 15-40% above normal)
Volatility breaking out, early phase of directional movement
- HIGH VOLATILITY: Ratio > 1.40 (ATR is 40%+ above normal)
Strong sustained trend with high participation
- EXHAUSTION: ATR declining after high volatility period
Requires: Previous high ratio + declining ATR over X bars (default: 5)
Trend maturity, potential reversal or consolidation approaching
🛑 DYNAMIC STOP LOSS CALCULATION:
- For Long Positions: Stop Loss = Entry Price - (ATR × SL Multiplier)
- For Short Positions: Stop Loss = Entry Price + (ATR × SL Multiplier)
- Default Multiplier: 2.0× ATR
- Adjusts automatically: Wider in high volatility, tighter in compression
🎯 TAKE PROFIT LEVELS:
- TP1 = Entry Price ± (ATR × TP1 Multiplier)
- TP2 = Entry Price ± (ATR × TP2 Multiplier)
- TP3 = Entry Price ± (ATR × TP3 Multiplier)
- Direction (+ or -) depends on trade direction
📦 POSITION SIZE CALCULATION:
Formula: Position Size = Account Risk Amount ÷ Stop Loss Distance
Step-by-step:
1. Risk Amount = Account Size × (Risk Percentage ÷ 100)
2. Stop Distance = |Entry Price - Stop Loss Price|
3. Position Size = Risk Amount ÷ Stop Distance
📈 ATR PERCENTILE RANKING:
- >80% = Extremely high volatility
- 20-80% = Normal volatility range
- <20% = Extremely low volatility
🌀 VOLATILITY CONTRACTION PATTERN:
Detects extended low-volatility periods indicating imminent breakout.
🧭 TREND DETECTION SIGNALS:
Bullish: Price > MA AND Current ATR > ATR MA
Bearish: Price < MA AND Current ATR > ATR MA
⚡ VOLATILITY BREAKOUT SIGNALS:
Triggered when ATR exceeds its moving average by a defined threshold.
🧩 CORE FEATURES:
==============
1. ATR BANDS (Dynamic Support/Resistance)
2. VOLATILITY REGIME DETECTION
3. DYNAMIC STOP LOSS SYSTEM
4. MULTIPLE TAKE PROFIT LEVELS
5. SUPPORT & RESISTANCE LEVELS
6. RISK MANAGEMENT CALCULATOR
7. ATR PERCENTILE RANKING
8. VOLATILITY CONTRACTION PATTERN
9. TREND DETECTION SIGNALS
10. VOLATILITY BREAKOUT SIGNALS
⚙️ RECOMMENDED SETTINGS BY TRADING STYLE:
======================================
DAY TRADING • SWING TRADING • POSITION TRADING • SCALPING
📘 HOW TO USE THIS INDICATOR:
==========================
STEP 1: Identify Market Regime
STEP 2: Wait for Entry Signal
STEP 3: Set Stop Loss
STEP 4: Set Take Profits
STEP 5: Position Sizing
STEP 6: Monitor & Manage
🔔 ALERT SYSTEM:
=============
Alerts for volatility breakouts, trend changes, regime transitions,
ATR band crossings, contraction completion, and percentile extremes.
🎨 CUSTOMIZATION:
==============
All visuals, thresholds, multipliers, colors, alerts, and risk parameters
can be fully customized.
⚠️ IMPORTANT DISCLAIMER:
=====================
This indicator is a volatility analysis tool and does NOT provide financial advice.
Past performance does not guarantee future results.
All trading involves substantial risk.
All trading decisions are the sole responsibility of the user.
HTF Pivots SignalsIntroduction :
HPS (HTF Pivot Signals) provides traders with a systematic approach to Higher Timeframe structure analysis and signal confirmation. Designed for traders seeking to identify confirmed structure changes, this indicator detects HTF pivot interactions and generates entry signals when price confirms beyond chart timeframe pivot levels. The indicator helps analysts identify key structure breaks, momentum shifts, and high-probability entry points based on confirmed pivot interactions.
Description :
HPS is rooted in the principle that Higher Timeframe structure changes provide context for lower timeframe price action. When an HTF pivot is interacted with (mitigated), it signals a potential opportunity for a mean reversal. The indicator then waits for confirmation on the chart timeframe before generating a signal, ensuring only confirmed setups are highlighted.
Main indicator screenshot showing HTF pivots and confirmation signals
The system operates by detecting pivot highs and lows on a higher timeframe, tracking when these pivots are interacted with, and confirming signals when price closes beyond chart timeframe pivot levels. This two-step process—interaction followed by confirmation—filters out false signals and provides only actionable setups.
HPS automatically calculates the optimal higher timeframe pairing (typically 15-16x the chart timeframe) or allows manual selection. The indicator remains stable and non-repainting, offering traders reliable, unchanged levels within the given time period. Pivot cleanup is managed by mitigation order rather than age, ensuring the most recent interactions remain visible while older ones are removed systematically.
Key Features:
Automatic HTF Selection: The indicator automatically calculates the optimal higher timeframe pairing based on your chart timeframe, typically using 15-16x multiples (e.g., 5m → 1h, 15m → 4h, 1h → 1D). For a more dynamic experience, the Automatic feature autonomously adjusts the higher timeframe pairing based on the current chart timeframe, ensuring accurate alignment with structure analysis. Manual override is available for custom timeframe selection.
Confirmed Pivot Detection: HPS only displays confirmed HTF pivots that have been interacted with. Unlike basic pivot indicators that show all pivots, HPS requires pivot interaction before displaying, eliminating noise and focusing on actionable structure changes. Pivots are marked with PH (Pivot High) and PL (Pivot Low) labels when enabled.
Signal Confirmation System: When an HTF pivot is interacted with, a pending signal is created signaling a potential mean reversal opportunity. The signal confirms when price closes beyond the chart timeframe pivot level—pivot low for bearish signals, pivot high for bullish signals. Confirmed signals display with OB+ (bullish) or OB- (bearish) labels and extending confirmation lines that mark the entry level.
Mitigation-Based Cleanup: Pivot cleanup is managed by mitigation order rather than age. The system maintains the latest mitigated pivots while removing older ones based on interaction time. This ensures recent interactions remain visible while preventing chart clutter. The maximum number of mitigated pivots displayed is configurable based on the max pivots setting.
Customizable Display: Full control over visual elements including pivot highs/lows visibility, pivot labels (PH/PL), confirmation lines, colors, and line width. Confirmation line labels (OB+/OB-) always display regardless of label toggle settings, ensuring signal visibility. Adjust the maximum number of pivots displayed to match your charting style and analysis needs.
Stop Level Calculation: Automatically calculates stop levels based on the maximum price (for bearish signals) or minimum price (for bullish signals) from signal creation to confirmation. These levels represent the risk point for each confirmed signal, providing clear risk management reference points.
Stop level calculation visualization
Multi-Timeframe Compatibility: Works across all TradingView timeframes and market types including Forex, Crypto, Stocks, and Futures. The automatic HTF selection adapts to any chart timeframe, providing consistent structure analysis regardless of the trading instrument or timeframe selected.
Multi-timeframe compatibility example
Usage Guidance :
Add HPS (HTF Pivot Signals) to your TradingView chart.
Select your preferred HTF pairing (Automatic or Manual) and adjust display settings to match your visual preferences.
Monitor for HTF pivot interactions—when price mitigates an HTF pivot, a pending signal is created signaling a potential mean reversal opportunity. Wait for confirmation when price closes beyond the chart timeframe pivot level, indicated by OB+ or OB- labels.
Use the confirmation lines and stop levels to identify entry points and manage risk. Combine with your existing analysis methods to enhance structure-based trading decisions.
Step-by-step usage guide
Terms and Conditions
Our charting tools are products provided for informational and educational purposes only and do not constitute financial, investment, or trading advice. Our charting tools are not designed to predict market movements or provide specific recommendations. Users should be aware that past performance is not indicative of future results and should not be relied upon for making financial decisions. By using our charting tools, the purchaser agrees that the seller and the creator are not responsible for any decisions made based on the information provided by these charting tools. The purchaser assumes full responsibility and liability for any actions taken and the consequences thereof, including any loss of money or investments that may occur as a result of using these products. Hence, by purchasing these charting tools, the customer accepts and acknowledges that the seller and the creator are not liable nor responsible for any unwanted outcome that arises from the development, the sale, or the use of these products. Finally, the purchaser indemnifies the seller from any and all liability. If the purchaser was invited through the Friends and Family Program, they acknowledge that the provided discount code only applies to the first initial purchase. The purchaser is therefore responsible for cancelling – or requesting to cancel – their subscription in the event that they do not wish to continue using the product at full retail price. If the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable. We hold no reimbursement, refund, or chargeback policy. Once these Terms and Conditions are accepted by the Customer, before purchase, no reimbursements, refunds or chargebacks will be provided under any circumstances.
By continuing to use these charting tools, the user acknowledges and agrees to the Terms and Conditions outlined in this legal disclaimer.
Volume Profile: HVN, LVN & DeltaDescription field:
Volume Profile: HVN, LVN & Delta is a high-performance, optimized structural analysis tool designed to visualize the distribution of volume over price levels.
Unlike standard Volume Profile indicators that often suffer from "Loop takes too long" runtime errors on high resolutions, this script utilizes a mathematically optimized binning algorithm. This allows for a smooth loading experience even with high precision settings, providing deep insights into market structure without lagging the chart.
1. Key Concepts & Features
This indicator breaks down market data into several key components to help traders identify where value has been established and where price has been rejected.
Rolling Volume Profile: The profile is calculated based on a rolling window of bars (user-defined period). This ensures the data is always relevant to the current market context, dynamically updating as price moves.
HVN (High Volume Nodes): Displayed as colored zones, these represent prices where a significant amount of trading occurred.
Significance: These areas indicate market acceptance and often act as strong Support or Resistance (magnets).
LVN (Low Volume Nodes): Displayed as subtle gray strips, these are areas with very little volume (gaps in the profile).
Significance: These represent price rejection or rapid movement. Price often moves quickly through LVNs to reach the next HVN.
Delta Coloring: The profile bins are colored based on Delta (Buying Volume vs. Selling Volume).
Teal: Net Buying pressure in that price zone.
Maroon: Net Selling pressure.
Value Area (VA) & PoC:
PoC (Point of Control): The single price level with the highest volume.
VA (Value Area): The range where 70% (customizable) of the total volume occurred.
Structural Pivots: The script plots recent Pivot Highs and Lows, but filters them based on Volume. A pivot is only highlighted if it carries significant volume relative to the PoC, filtering out "noise" pivots.
Real-Time Dashboard: A compact panel displaying:
Distance from PoC, VAH, and VAL.
Net Delta for the period.
Current Trend status relative to the EMA 50.
2. How to Use This Indicator
This tool is designed for Auction Market Theory traders. Here are practical ways to interpret the signals:
A. Determining Trend State
Inside Value (Range Bound): When price is strictly between VAH (Value Area High) and VAL (Value Area Low), the market is in balance. Strategies often focus on mean reversion towards the PoC.
Outside Value (Imbalance): When price breaks and holds above VAH or below VAL, it signals a potential trend initiation or a search for new value.
B. Using HVN and LVN
HVN Defense: If price retraces to an HVN (High Volume Node), look for a reaction. Since fair value was established here previously, institutional orders often reside here.
LVN Acceleration: If price enters an LVN, expect increased volatility. Since there is little liquidity in these zones, price tends to "jump" through them until it finds the next HVN.
C. Delta Analysis
Look at the dashboard or the profile color. If price is rising but the Total Delta is negative (Red), it may indicate a "weak high" or absorption, suggesting a potential reversal.
3. Technical Optimization (Why this script?)
Calculating Volume Profiles on Pine Script is computationally expensive. Standard methods loop through every past bar for every price level, leading to timeouts.
This script solves this by:
Direct Indexing: Calculating the bin index mathematically rather than via search loops.
Smart Memory Management: Using explicit array clearing and garbage collection on the last bar.
Safety Breaks: Implementing fail-safes in the Value Area calculation to prevent infinite loops during flat markets.
4. Settings
Rolling Period: How far back the profile looks (Default: 150 bars).
Resolution: The vertical precision of the histogram (Default: 70). Note: Higher resolution = more detail but more CPU load.
HVN/LVN Thresholds: The percentage of PoC volume required to tag a zone as High or Low volume.
Pivot Vol Filter: Filters out weak pivot points that do not possess enough volume structure.
Disclaimer: This indicator is for educational and analytical purposes only. It does not provide financial advice.
Quantum RCI Fusionrepresents a significant evolution in oscillator-based scalping. Unlike standard indicators that rely on raw price data, this script utilizes a "Quantum Engine": a combination of Rank Correlation Index (RCI) mathematics and Hull Moving Average (HMA) pre-smoothing to eliminate market noise before it even affects the signal.
This tool is designed for Scalpers and Day Traders who need precision entries and, more importantly, an intelligent exit strategy that doesn't close trades prematurely during minor pullbacks.
🚀 Key Features:
⚡ Quantum Engine (Array + Smooth): Built on an optimized array structure with HMA pre-filtering. It detects the true market rank correlation while ignoring choppy price action.
🛡️ Trend Shield Logic: The unique "Shield" feature keeps you in the trade even if the fast signal crosses down, provided the Baseline Trend (RCI 30) remains strong. Captures the full move, not just the breakout.
📊 Live Performance Dashboard: A real-time table tracks your simulated Wins, Losses, and Win Rate % for the current session, giving you instant feedback on market conditions.
🧠 Intelligent Filtering: Combines ADX (trend strength) and Impulse (momentum velocity) to filter out weak setups.
🔔 Rich Alerts: Ready for automation with detailed messages containing Entry Price, TP, and SL levels.
How it Works: It analyzes three distinct time-horizons of price rank (Fast, Confirm, Slow). A signal is generated only when:
Momentum crosses in an extreme zone (Overbought/Oversold).
ADX confirms sufficient volatility.
The price "Impulse" is strong enough to validate the move.
USER MANUAL: How to Trade with Quantum RCI
1. The Setup
Timeframe: Optimized for 1m, 5m, and 15m (Scalping). It works on H1/H4 for Swing trading but requires wider SL settings.
Assets: Highly effective on Crypto (BTC, ETH, SOL) and Volatile Forex Pairs (GBPUSD, XAUUSD).
Source Data: By default, it uses close. Try changing the "Source" in settings to Heikin Ashi closing price for smoother trends.
2. The Strategy (Entry Rules)
The indicator paints Triangles on the chart (Green for Buy, Pink for Sell).
LONG Signal: Occurs when the Fast RCI crosses UP from the Oversold zone (< -80), confirmed by ADX and Momentum.
SHORT Signal: Occurs when the Fast RCI crosses DOWN from the Overbought zone (> 80), confirmed by filters.
3. The Exit Logic (The "Shield")
This is the most important part. The indicator manages exits dynamically:
TP/SL Hits: Based on the ATR multiplier in settings (Standard: 2.0 TP / 1.5 SL).
Tech Exit (X Icon): A standard exit when momentum fades.
Shield Break (Yellow Circle): This is the Trend Follower. If the "Trend Shield" (RCI 30) is active (thick green/red line), the indicator ignores minor crosses. It will only signal an exit when the main trend actually breaks. This allows you to ride waves longer.
4. The Dashboard & Statistics
Status: Shows if a trade is currently simulating LONG, SHORT, or SCANNING.
Win Rate: Shows the % of successful signals since the indicator was loaded.
Reset: Use the "Reset Statistics" toggle in settings to clear data (useful when switching sessions, e.g., from London to New York).
💡 Pro Tip:
If the ADX Filter says "WAIT" on the dashboard, the market is ranging/flat. Avoid taking trades manually, even if you see a crossover, or wait for the ADX to turn "READY".
Smart Money Concept, Modern ViewSmart Money Concept, Modern View (SMCMV)
Institutional Volume Flow Analysis with VWMA Matrix
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 OVERVIEW
SMCMV is an advanced institutional-grade indicator that combines Volume-Weighted Moving Average (VWMA) matrix analysis with sophisticated volume decomposition to detect buyer and seller entry points. The indicator provides a comprehensive real-time dashboard displaying market structure, volume dynamics, and validated trading signals.
Key Features:
• Dual Volume Model: Geometry-based (candle range split) and Intrabar (precise LTF data)
• 10-Period VWMA Spectrum: Multi-timeframe support/resistance matrix (7, 13, 19, 23, 31, 41, 47, 67, 83, 97)
• 5-Layer Scoring System: 100-point institutional-grade signal quality assessment
• State Machine Signal Engine: Validated entry/exit signals with timer and range confirmation
• Real-time Prediction Engine: Candle-by-candle buyer/seller probability estimation
• High Volume Node Detection: Automatic identification of significant volume zones
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 DASHBOARD REFERENCE
1) NOW VECTOR (Current Market State)
This section captures the immediate market conditions:
• FLOW ANGLE: Directional angle of price movement in degrees (from VWMA-5). Positive = bullish, Negative = bearish.
• LTP: Last Traded Price - current close price.
• NET FLOW (Δ): Volume Delta - net difference between buying and selling volume. Shows ⚡+ or ⚡-.
• LIQUIDITY: Total volume on the current bar (K/M format).
• BUY VOL: Estimated buying volume based on selected model.
• SELL VOL: Estimated selling volume.
• BID PRES.: Buying volume as percentage of total volume.
• ASK PRES.: Selling volume as percentage of total volume.
• DIRECTION: Current state with hysteresis: BULL (🐂), BEAR (🐻), or NEUT (⚪).
2) DATA QUALITY / CONFIG
Configuration status and data integrity monitoring:
• VOL MODEL: INTRABAR (uses LTF data) or GEOMETRY (estimates from candle structure).
• IB LTF: Intrabar Lower Timeframe for precise volume decomposition.
• MODE: Micro (7 periods: 7-47) or Macro (10 periods: 7-97).
• IB OK: Intrabar data validity - OK or NO.
• IB STREAK: Consecutive bars with valid intrabar data.
• LATENCY: Data freshness indicator. ✓ = current, ↺ = using historical reference.
3) STRUCTURE RADAR
Market structure analysis showing price position relative to VWMA matrix:
• WIRES ▲/▼: Count of VWMAs above (resistance) and below (support).
• RES: Nearest Resistance - shows MA period, "ZN RES", or "BLUE SKY".
• SUPP: Nearest Support - shows MA period, "ZN SUPP", or "FREE FALL".
4) ACTIVE INTERACTION
Real-time analysis of price interaction with key levels:
• Header Status: "⚠ TESTING SUPPLY (ASK SIDE)" / "⚠ TESTING DEMAND (BID SIDE)" / "--- NO KEY INTERACTION ---"
• TARGET: Active level being tested (MA period or zone type).
• TEST LEVEL: Exact price level being tested.
• SCORE: Total score (0-100%) with letter grade .
• VOLUME POWER: Volume ratio vs historical average (e.g., "2.5x").
• BREAKOUT: "CONFIRMED" if attacking volume exceeds defending, "REJECTED" otherwise.
• DELTA DIR: "ALIGNED" if delta matches accumulation trend, "CONFLICT" if opposing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 5-LAYER SCORING SYSTEM (100 Points Total)
Layer 1: Volume Quality (Max 25 pts)
• Mass (0-10): Volume ratio vs average. 0.5x=0, 1.0x=5, 2.0x=8, 3.0x+=10
• Spike (0-8): Volume Z-Score intensity
• Trend (0-7): Volume trend alignment with price direction
Layer 2: Battle Structure (Max 25 pts)
• Break (0-10): Breakout intensity ratio (attacker vs defender)
• Dom (0-8): Internal dominance ratio
• Pres (0-7): Pressure imbalance percentage
Layer 3: Flow & Energy (Max 20 pts)
• Delta (0-8): Delta alignment with accumulation trend
• Accel (0-6): Delta acceleration
• Mom (0-6): Flow momentum
Layer 4: Geometry (Max 15 pts)
• Impact (0-7): Impact angle directness
• Vec (0-5): Vector alignment
• PriceZ (0-3): Price Z-Score position
Layer 5: Army Structure (Max 15 pts)
• Stack (0-5): MA stack depth
• Conf (0-5): Confluence percentage
• Trend (0-5): Trend alignment count (7>13, 13>23, 23>97)
Grade Scale:
• A+ = 90-100 pts (Exceptional)
• A = 80-89 pts (Strong)
• B+ = 70-79 pts (Good)
• B = 60-69 pts (Moderate)
• C+ = 50-59 pts (Below average)
• C/D/F = Below 50 pts (Weak)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5) SIGNAL STATUS PANEL
Real-time signal state machine status:
• Header: "🐂 BUYERS ACTIVE" / "🐻 SELLERS ACTIVE" / "⏳ VALIDATING..." / "⏸ RANGE / FLAT"
• LOCK PRICE: Price at which signal was locked/confirmed.
• RANGE ±: Validation range percentage.
• POSITION: Price vs lock: "▲ ABOVE" / "▼ BELOW" / "● AT LOCK"
• DISTANCE: Percentage distance from lock price.
• vs RANGE: Position vs validation range: "IN_RANGE" / "ABOVE" / "BELOW"
• VAL TICKS: Validation progress (current/required ticks).
6) REALTIME PREDICTION PANEL
Candle prediction engine:
• WINNER: Predicted dominant side: "BUYERS" / "SELLERS" / "NEUTRAL"
• CONFIDENCE: Prediction confidence percentage.
• ACCURACY: Historical prediction accuracy (session-specific).
• BUY/SELL PROB: Individual probabilities for each side.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷️ SIGNAL LABELS REFERENCE
• 🐂 BUYER ENTRY (Green): Confirmed buyer entry signal. Validation complete.
• 🐻 SELLER ENTRY (Red): Confirmed seller entry signal. Validation complete.
• 🔻 REVERSAL BUY→SELL (Magenta): Reversal from buyer to seller position.
• 🔺 REVERSAL SELL→BUY (Cyan): Reversal from seller to buyer position.
• ⏹ EXIT → FLAT (Gray): Position exit to flat/neutral state.
• ⬆ BUYER STRONGER (Small Green): Lock price updated higher during buyer state.
• ⬇ SELLER STRONGER (Small Red): Lock price updated lower during seller state.
Display Modes:
• Minimal: Icon only (hover for tooltip details)
• Normal: Icon + Price level
• Detailed: Full information (price, score, grade)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 CHART ELEMENTS
VWMA Spectrum Lines
Colored gradient lines representing the 10-period VWMA matrix. Color progresses from light blue (fast: 7-period) through purple to orange (slow: 97-period). These act as dynamic support/resistance levels weighted by volume.
High Volume Node Lines
• Blue Lines: High Buy Volume zones - potential demand areas
• Red Lines: High Sell Volume zones - potential supply areas
• Yellow Lines: Overlapping zones (buy + sell extremes) - high conflict areas
Lock Price Line & Range Band
• Dashed Line: Locked price level (green for buyers, red for sellers)
• Dotted Lines: Upper/lower bounds of validation range
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ INPUT SETTINGS GUIDE
Volume Model
• Calculation Method: "Geometry (Candle-Range Split)" for universal compatibility or "Intrabar (Precise)" for accurate buy/sell separation.
• Intrabar LTF: Lower timeframe for Intrabar mode (e.g., "1" for 1-minute).
Direction Filter
• Direction Trigger Angle: Threshold for directional state change (default: 1.5°)
• Neutral Reset Angle: Threshold for returning to neutral (default: 0.7°)
Testing Filter
• Level Proximity (%): How close price must be to "test" a level (default: 0.25%)
• Require Wick Touch: If enabled, requires high/low to touch proximity band.
Signal Validation
• Lock Range (%): Price range for validation (default: 0.5%)
• Validation Ticks: Consecutive bars required (default: 3)
• Validation Time: Minimum seconds for real-time confirmation (default: 5)
• Minimum Hold Bars: Stay in position for at least this many bars (default: 5)
• Exit Mode: "Reversal Only" / "Signal Loss" / "Price Stop"
• Stop Loss (%): Exit threshold (default: 1.0%)
Signal Score Filter
• Score Range Minimum: Minimum score for signal generation (default: 10%)
• Score Range Maximum: Maximum score threshold (default: 100%)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 USAGE RECOMMENDATIONS
1. Start with Macro mode to see the complete VWMA spectrum, then switch to Micro for cleaner charts.
2. Use Intrabar mode when your broker provides lower timeframe data.
3. Focus on high-grade signals (B+ or better) for higher probability setups.
4. Wait for validation to complete before acting on signals.
5. Use the Lock Price line as your reference for position management.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ IMPORTANT NOTES
• This indicator is designed for educational and analytical purposes.
• Always combine with proper risk management and additional confirmation.
• Past performance and signal quality do not guarantee future results.
• The prediction accuracy is session-specific and resets on chart reload.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Volume-Based Indicator — Data Granularity & Table Guide
1) Critical warning about data granularity (read first)
Important: This indicator is built entirely on volume-derived calculations (volume, volume delta, and related flow metrics). Because of that, its precision is only as good as the granularity and history of the data you feed it.
The most granular view is a tick-based interval (e.g., 1T = one trade/tick). If tick-based intervals are not available for your symbol or your plan, the closest time-based approximation is a 1-second chart (1S).
If you enable any "high-precision / intrabar" options (anything that relies on the smallest updates), make sure you understand which TradingView plan you are using, because intrabar historical depth (how many bars you can load) varies by plan. More history generally means more stable baselines for volume statistics, regime detection, and long lookback features.
Plan-related notes (TradingView)
TradingView limits how many intrabar historical bars can be loaded, depending on your plan. The exact limits are defined by TradingView and can change over time, but as of the current documentation, the intrabar limits are:
• Basic: 5,000 bars
• Essential: 10,000 bars
• Plus: 10,000 bars
• Premium: 20,000 bars
• Expert: 25,000 bars
• Ultimate: 40,000 bars
Tick charts / tick-based intervals are currently positioned as a feature of professional-tier plans (e.g., Expert/Elite/Ultimate). Availability may also vary by symbol and data feed.
Smart Candlestick Pattern Filter [MarkitTick]💡 This Script is a sophisticated technical analysis tool designed to identify, grade, and display over 40 distinct candlestick formations based on a proprietary strength and context filtering system. Unlike standard pattern finders that often clutter charts with conflicting signals, this script utilizes a hierarchy logic to display only the most significant pattern detected on any given candle, ensuring chart clarity and actionable data.
● Originality and Utility
The primary utility of this script lies in its filtering engine. Standard indicators often flag every minor Doji or Spinning Top, creating noise. This indicator categorizes patterns into five distinct levels of strength, ranging from simple indecision to very strong reversal or continuation signals.
Furthermore, it incorporates a Trend Context filter, which checks the relationship between price and a Simple Moving Average (SMA). This ensures that reversal patterns (like Hammers) are prioritized during downtrends, while continuation patterns are highlighted during established moves, reducing false positives.
● Methodology
The indicator evaluates price action using specific ratios between the Open, High, Low, and Close, alongside the body size relative to the total range. It assigns a strength score to each detected pattern.
• Pattern Strength Grading
Strength 1 (Indecision): Includes patterns like Doji, Spinning Tops, Dragonfly, and Gravestone Dojis. These signal a pause in momentum.
Strength 2 (Weak): Includes patterns like Hanging Man, Inverted Hammer, Belt Holds, and In-Neck lines. These suggest potential movement but often require confirmation.
Strength 3 (Moderate): Includes classic reversals like Hammers, Shooting Stars, Haramis, Dark Cloud Cover, and Piercing Lines.
Strength 4 (Strong): Includes major signals like Engulfing patterns, Morning/Evening Stars, and Marubozu candles.
Strength 5 (Very Strong): Reserved for rare, high-probability multi-candle formations like Three White Soldiers, Three Black Crows, Rising/Falling Three Methods, and Breakaway gaps.
The script calculates all potential patterns for the current bar and then compares their strength scores. Only the pattern with the highest strength is displayed. If the Show Trend Context option is enabled, the script further validates the pattern against the current market direction (determined by the SMA and slope) before plotting.
● How to Use
Traders can use this tool to identify potential entry and exit points based on the strength of the signal.
• Visual Signals
Patterns are labeled directly on the chart:
Green Labels/Text: Indicate Bullish patterns.
Red Labels/Text: Indicate Bearish patterns.
Gray/White Labels: Indicate Indecision or Weak patterns.
Hovering over any label provides the full name of the pattern and its strength rating (e.g., "Bullish Engulfing - Strength: Strong").
• Trading Logic
High Strength Signals (Levels 4-5): These can be used as primary triggers for trend reversals or strong continuations.
Moderate Signals (Level 3): Useful for adding confluence to existing analysis or anticipating a setup.
Indecision (Level 1): Often useful for taking profits or tightening stop-losses, as they indicate the current trend may be stalling.
● Settings
Show Only Strong Patterns: When enabled, filters out Strength 1, 2, and 3, showing only the most significant signals (Strength >= 4).
Max Patterns to Display: Limits the number of historical labels to prevent chart clutter.
Max Candles to Check Engulfing: Adjusts how far back the script looks to validate the size of an engulfing candle.
Trend Detection Period: Sets the length of the SMA used to determine the background trend context.
Show Only Trend-Appropriate Patterns: If checked, bullish reversals are only shown in downtrends, and bearish reversals in uptrends.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Statistical Trend Forecast Pro📈 OverviewStatistical Trend Forecast Pro
is an advanced predictive tool designed to project future price action based on rigorous statistical analysis. Unlike standard lagging indicators (like Moving Averages), this script calculates the exact trajectory of the current trend using Linear Regression (Least Squares Method) and projects a "Cone of Uncertainty" into the future.This tool answers three critical questions for any trader:What is the true direction (Slope) of the current trend?Where is the price statistically likely to go (Target)?When does a move become statistically extreme (Breakout/Reversal)?
🧠 Theoretical BackgroundThe core engine of this indicator uses Covariance to calculate the precise slope and intercept of the price relative to time.The Forecast Line: A projection of the regression line into the future.The Cone of Uncertainty: Financial markets follow a "Random Walk" component. This indicator models volatility dispersion using a square-root-of-time function ($\sqrt{t}$). This means the further we look into the future, the wider the channel becomes, reflecting the natural increase in uncertainty.
✨ Key FeaturesDual-Threshold System (Visual vs. Alerts):Visual Channel: Draw the cone at a standard level (e.g., 2.0 Sigma) to see the general context.Background Alerts: Set alerts at a higher threshold (e.g., 3.0 Sigma) to be notified only during extreme volatility events, keeping your chart clean but your surveillance tight.Smart Dashboard:A customizable table displays the exact Trend Slope, Target Price, and Volatility Range in real-time.Includes color-coding (Green/Red) to instantly identify trend direction.Advanced Alert Engine:Breakout: Triggered when price exits the statistical cone.Re-Entry (Mean Reversion): Triggered when price returns into the cone after an excursion.Trend Filtering: Option to ignore signals that go against the main slope.Polyline Rendering: Uses Pine Script v6 dynamic polylines for smooth, curved visualization of the uncertainty cone (no blocky steps).Source Flexibility: Supports hlc3 (Typical Price) or hl2 input sources to reduce noise from candle wicks.
📚 User Manual & StrategiesStrategy 1: The "Volatility Squeeze" BreakoutSetup: Look for the cone to become narrow (low historical volatility).Trigger: Price breaks out of the cone's upper or lower boundary with a steep slope.Confirmation: The Dashboard Slope turns bright Green (Bullish) or Red (Bearish).Logic: A breakout from a low-volatility statistical range often signals the start of a new impulsive trend.Strategy 2: Mean Reversion (The "Rubber Band")Setup: Price extends far beyond the cone (e.g., hitting the 3.0 Sigma invisible wall).Trigger: Use the "Re-Entry" Alert. Wait for the price to close back inside the cone.Target: The central dashed orange line (The Regression Mean).Logic: Prices rarely stay at 3+ standard deviations for long. A return to the mean is statistically probable.Strategy 3: Trend Following with ConfluenceSetup: Enable "Filter by Trend" in the settings.Action: Only take Long trades if the Forecast Slope is positive, or Short trades if negative. Use the central dashed line as a dynamic trailing stop or support level.
⚙️ Settings GuideLookback Length: The number of past bars used to calculate the trend. (Default: 30)Forecast Horizon: How many bars into the future to project. (Default: 20)Widening Factor: Controls how fast the cone opens up. Higher values = wider cone end (more uncertainty).Alert Trigger (Sigma): The multiplier for backend alerts. Set this higher than the "Visual Channel" to filter noise.Source Data: Recommended set to hlc3 to include wicks in the calculation, or close for standard analysis.
⚠️ Disclaimer:This tool provides statistical projections based on past data. It does not guarantee future performance. Use it as part of a comprehensive trading strategy with proper risk management.
Stochastic Extreme Oscillator [MatrixQuantLabs]Stochastic Extreme Oscillator is an enhanced stochastic-based oscillator designed to highlight market extremes, momentum shifts, and potential reversal zones with improved visual clarity and signal filtering.
This indicator builds upon the classic Stochastic Oscillator by focusing on extreme zone behavior, peak & trough signals, and optional divergence detection, making it suitable for both discretionary and systematic traders.
Key Features
Extreme Zone Visualization
• Multi-level overbought (80–100) and oversold (0–20) zones with adaptive color intensity help assess the strength and risk level of market extremes at a glance.
Momentum-Aware Coloring
• The %D line dynamically changes color based on its position relative to the zero line, providing an intuitive view of bullish, neutral, and bearish momentum states.
Peak & Trough Signals
• Optional bullish and bearish signals are triggered only when %K / %D cross occurs inside extreme zones, helping filter out low-quality signals in mid-range conditions.
Regular Divergence Detection
• Built-in bullish and bearish divergence detection based on pivot structure, allowing early identification of potential trend reversals.
Clean & Focused Design
• The indicator emphasizes the %D line as the primary signal source, while %K is used internally for logic, keeping the chart uncluttered and easy to read.
Customization
• Adjustable %K / %D lengths and smoothing
• Toggle peak & trough signals on/off
• Optional divergence detection with configurable pivot sensitivity
• Designed to work across different markets and timeframes
Usage Notes
• Best used as a momentum and extreme-condition oscillator, not as a standalone trading system
• Signals are most effective when combined with trend context, price structure, or higher-timeframe analysis
• Divergence signals may appear with delay due to pivot confirmation logic
Disclaimer
This indicator is intended for educational and analytical purposes only and does not constitute financial advice. Always apply proper risk management and confirm signals with additional analysis.
FIBOtomgoodcar v1Fibonacci Levels, Code Names, Usage Strategies, Colors
78.6% (fib_786_buy) 💰 Buy Trap (78.6%) A very important entry point (Buy Trap). Considered the deepest level of the consolidation before the uptrend continues. Blue
61.8% (fib_618_buy) 💰 Buy Trap (61.8%) The most common entry point (Buy Trap). When the price consolidates in an uptrend: Green
50.0% 50.00% Mid-trend consolidation level. Yellow
127.2% (fib_1272_sell) 🎯 127.2% target (sell trap) Profit target (Target/Sell Trap) for uptrend trading after the price breaks through the previous High. Orange
161.8% (fib_1618_sell) 🎯 161.8% target (sell trap) Profit target (Target/Sell Trap) The most important and popular for Fibonacci extensions. Red
I created this indicator to help traders who know nothing about trading. It might be worthless if you don't use it. Only 200 baht for this amazing indicator.
ORB W/ Custom time FramesRelease Notes: Simplified ORB (Opening Range Breakout)
This indicator is a streamlined, high-performance tool designed to identify the Opening Range—one of the most widely used concepts by professional floor traders and institutional scalpers. It marks the high, low, and midpoint of the initial balance of the market, providing you with a "map" for the rest of the trading session.
Key Features
Customizable Timeframes: Define your opening range window (e.g., the first 5, 15, or 30 minutes) regardless of what timeframe you are currently viewing.
Custom Session Support: Choose between standard market hours (09:30–16:00) or define your own custom window (e.g., the London Open or the first hour of "Power Hour").
Real-Time Midpoint Calculation: Automatically plots the 50% Equilibrium level between the high and low, serving as a pivot point for intraday bias.
Dynamic Updating: During the ORB window, the lines adjust in real-time as new highs or lows are set. Once the window expires, the levels lock in place to act as support and resistance.
Clean Visuals: Utilizes a lightweight line drawing system that is easy on your GPU and keeps the chart clutter-free.
Why This is Essential for Scalping
Scalpers rely on volatility and clear "lines in the sand." The Opening Range Breakout (ORB) provides exactly that:
The "Opening Drive": If price breaks the ORB High with high volume, scalpers look for quick "long" momentum plays. Conversely, a break below the ORB Low signals a bearish trend.
The Midpoint Pivot: The 50% level (Mid) is often treated as the "Fair Value" of the morning. If price is above the mid, the bias is bullish; if below, the bias is bearish.
Stop Loss / Take Profit Anchor: The ORB High and Low act as natural areas for placing stops or targets. A failed breakout that returns inside the range often targets the opposite side of the box.
BUYSELL WIN [Label Edition]Fibonacci Levels, Code Names, Usage Strategies, Colors
78.6% (fib_786_buy) 💰 Buy Trap (78.6%) A very important entry point (Buy Trap). Considered the deepest level of the consolidation before the uptrend continues. Blue
61.8% (fib_618_buy) 💰 Buy Trap (61.8%) The most common entry point (Buy Trap). When the price consolidates in an uptrend: Green
50.0% 50.00% Mid-trend consolidation level. Yellow
127.2% (fib_1272_sell) 🎯 127.2% target (sell trap) Profit target (Target/Sell Trap) for uptrend trading after the price breaks through the previous High. Orange
161.8% (fib_1618_sell) 🎯 161.8% target (sell trap) Profit target (Target/Sell Trap) The most important and popular for Fibonacci extensions. Red
I created this indicator to help traders who know nothing about trading. It might be worthless if you don't use it. Only 200 baht for this amazing indicator.
Pulse Wave Analyzer [Scalping-Algo]TITLE: Pulse Wave Analyzer
DESCRIPTION:
📊 PULSE WAVE ANALYZER
A dynamic momentum oscillator that tracks price deviation with adaptive thresholds.
🎯 HOW TO USE:
• Above 0 = Bullish | Below 0 = Bearish
• Above +2.0 = Overbought (look for shorts)
• Below -2.0 = Oversold (look for longs)
• Yellow diamond = Momentum reversal point
• Green ▲ = Long entry | Red ▼ = Short entry
⚙️ SETTINGS:
• Period: 14
• Upper Threshold: 2.0
• Lower Threshold: -2.0
• Dynamic Adjustment: ON
🎨 SIGNALS:
• Green zone fill = Oversold area
• Red zone fill = Overbought area
• Circle markers = Divergence detected
🔔 ALERTS:
• Long/Short entries
• Zone entries
• Baseline crosses
• Divergences
TAGS: momentum, oscillator, oversold, overbought, divergence, signals, reversal
[turpsy]MOR-Fractal-Opening RangeThis script combines the Midnight Opening Range and the Fractal identification that I have published individually before. The original authors have been credited too.
The combination helps to reduce multiple indicators on your chart. Also, you can enable or disable the MOR.
Moreso, with the previous separate indicators, the current opening range and historical opening range do not show on 4hr timeframe, in this combined one, I have fixed that. the current opening range shows up to daily and weekly timeframe.
It also shows the 1st presented fair value gap, pivot points are also identified based on the session.
Cosmic Volume Analyzer [JOAT]
Cosmic Volume Analyzer - Astrophysics Edition
Overview
Cosmic Volume Analyzer is an open-source oscillator indicator that applies astrophysics-inspired concepts to volume analysis. It classifies volume into buy/sell categories, calculates volume flow, detects accumulation/distribution phases, identifies climax volume events, and uses gravitational and stellar mass analogies to visualize volume dynamics.
What This Indicator Does
The indicator calculates and displays:
Volume Classification - Categorizes each bar as CLIMAX_BUY, CLIMAX_SELL, HIGH_BUY, HIGH_SELL, NORMAL_BUY, or NORMAL_SELL
Volume Flow - Percentage showing buy vs sell pressure over a lookback period
Buy/Sell Volume - Separated volume based on candle direction
Accumulation/Distribution - Phase detection using Money Flow Multiplier
Volume Oscillator - Fast vs slow volume EMA comparison
Gravitational Pull - Volume-weighted price attraction metric
Stellar Mass Index - Volume ratio combined with price momentum
Black Hole Detection - Identifies extremely low volume periods (liquidity voids)
Supernova Events - Detects extreme volume with extreme price movement
Orbital Cycles - Sine-wave based cyclical visualization
How It Works
Volume classification uses volume ratio and candle direction:
classifyVolume(series float vol, series float close, series float open) =>
float avgVol = ta.sma(vol, 20)
float volRatio = avgVol > 0 ? vol / avgVol : 1.0
if volRatio > 1.5
if close > open
classification := "CLIMAX_BUY"
else
classification := "CLIMAX_SELL"
else if volRatio > 1.2
// HIGH_BUY or HIGH_SELL
else
// NORMAL_BUY or NORMAL_SELL
Volume flow separates buy and sell volume over a period:
calculateVolumeFlow(series float vol, series float close, simple int period) =>
float currentBuyVol = close > open ? vol : 0.0
float currentSellVol = close < open ? vol : 0.0
// Accumulate in buffers
float flow = (buyVolume - sellVolume) / totalVol * 100
Accumulation/Distribution uses the Money Flow Multiplier:
float mfm = ((close - low) - (high - close)) / (high - low)
float mfv = mfm * vol
float adLine = ta.cum(mfv)
if adLine > adEMA and ta.rising(adLine, 3)
phase := "ACCUMULATION"
else if adLine < adEMA and ta.falling(adLine, 3)
phase := "DISTRIBUTION"
Gravitational pull uses volume-weighted price distance:
gravitationalPull(series float vol, series float price, simple int period) =>
float massCenter = ta.vwma(price, period)
float distance = math.abs(price - massCenter)
float mass = vol / ta.sma(vol, period)
float gravity = distance > 0 ? mass / (distance * distance) : 0.0
Signal Generation
Signals are generated based on volume conditions:
Buy Climax: Volume exceeds 2 standard deviations above average on bullish candle
Sell Climax: Volume exceeds 2 standard deviations above average on bearish candle
Strong Buy Flow: Volume flow exceeds positive threshold (default 45%)
Strong Sell Flow: Volume flow exceeds negative threshold (default -45%)
Supernova: Volume 3x average AND price change 3x average
Black Hole: Volume 2 standard deviations below average
Dashboard Panel (Top-Right)
Volume Class - Current volume classification
Volume Flow - Buy/sell flow percentage
Buy Volume - Accumulated buy volume
Sell Volume - Accumulated sell volume
A/D Phase - ACCUMULATION/DISTRIBUTION/NEUTRAL
Volume Strength - Normalized volume strength
Gravity Pull - Current gravitational metric
Stellar Mass - Current stellar mass index
Cosmic Field - Combined cosmic field strength
Black Hole - Detection status and void strength
Signal - Current actionable status
Visual Elements
Volume Ratio Columns - Colored bars showing normalized volume
Volume Flow Line - Main oscillator showing flow direction
Flow EMA - Smoothed flow for trend reference
Volume Oscillator - Area plot showing fast/slow comparison
Gravity Field - Area plot showing gravitational pull
Orbital Cycle - Circle plots showing cyclical pattern
Stellar Mass Line - Line showing mass index
Climax Markers - Fire emoji for buy climax, snowflake for sell climax
Supernova Markers - Diamond shapes for extreme events
Black Hole Markers - X-cross for liquidity voids
A/D Phase Background - Subtle background color based on phase
Input Parameters
Volume Period (default: 20) - Period for volume calculations
Distribution Levels (default: 5) - Granularity of distribution analysis
Flow Threshold (default: 1.5) - Multiplier for flow significance
Accumulation Period (default: 14) - Period for A/D calculation
Gravitational Analysis (default: true) - Enable gravity metrics
Black Hole Detection (default: true) - Enable void detection
Stellar Mass Calculation (default: true) - Enable mass index
Orbital Cycles (default: true) - Enable cyclical visualization
Supernova Detection (default: true) - Enable extreme event detection
Suggested Use Cases
Identify accumulation phases for potential long entries
Watch for distribution phases as potential exit signals
Use climax volume as potential exhaustion indicators
Monitor volume flow for directional bias
Avoid trading during black hole (low liquidity) periods
Watch for supernova events as potential trend acceleration
Timeframe Recommendations
Best on 15m to Daily charts. Volume analysis requires sufficient trading activity for meaningful readings.
Limitations
Volume data quality varies by exchange and instrument
Buy/sell separation is based on candle direction, not actual order flow
Astrophysics concepts are analogies, not literal physics
A/D phase detection may lag during rapid transitions
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
SMC Ultimate: Command Center @darshaksscTitle: SMC Ultimate: Command Center
Description: This indicator is a specialized Smart Money Concepts (SMC) toolkit meticulously adjusted and optimized for the unique volatility and volume profiles of the Indian markets, specifically Nifty 50 and Bank Nifty.
Unlike other SMC tools, this version uses displacement logic tuned to the Average True Range (ATR) of Indian indices to identify high-probability Institutional Order Blocks while filtering out retail noise.
Key Features:
1). Institutional Order Blocks: Automatically detects and plots Supply/Demand zones where significant institutional volume (displacement) has entered the market.
2). Optimized for Nifty/BankNifty: Sensitivity parameters have been adjusted to handle the explosive moves often seen in the NSE sessions.
3). Live Command Center: A movable, high-detail dashboard that tracks:
4). Real-Time Day High/Low: Accurate intraday tracking that resets with each session.
5). Volume Force: Measures current volume relative to the average to spot institutional activity.
6).Trend Bias (50 EMA): Immediate directional context.
7). Momentum (RSI) & Strength (ADX): To confirm if a breakout is genuine or a trap.
8). Auto-Mitigation: Zones are automatically removed once price closes through them, ensuring a clean and professional workspace.
9). Theme Support: Includes built-in Light and Dark mode options for the dashboard to match any chart setup.
How to Use:
1). Identify the Zone: Wait for a Green (Demand) or Red (Supply) box to form.
2). Confirm Bias: Use the "TREND" and "VOL FORCE" metrics in the dashboard to confirm institutional intent.
3). Wait for Retest: High-probability entries occur when price returns to test a fresh zone without closing through it.
Disclaimer: This script is for educational and technical analysis purposes only. It is fully TradingView Policy compliant and does not repaint.
DeeptestDeeptest: Quantitative Backtesting Library for Pine Script
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ OVERVIEW
Deeptest is a Pine Script library that provides quantitative analysis tools for strategy backtesting. It calculates over 100 statistical metrics including risk-adjusted return ratios (Sharpe, Sortino, Calmar), drawdown analysis, Value at Risk (VaR), Conditional VaR, and performs Monte Carlo simulation and Walk-Forward Analysis.
█ WHY THIS LIBRARY MATTERS
Pine Script is a simple yet effective coding language for algorithmic and quantitative trading. Its accessibility enables traders to quickly prototype and test ideas directly within TradingView. However, the built-in strategy tester provides only basic metrics (net profit, win rate, drawdown), which is often insufficient for serious strategy evaluation.
Due to this limitation, many traders migrate to alternative backtesting platforms that offer comprehensive analytics. These platforms require other language programming knowledge, environment setup, and significant time investment—often just to test a simple trading idea.
Deeptest bridges this gap by bringing institutional-level quantitative analytics directly to Pine Script. Traders can now perform sophisticated analysis without leaving TradingView or learning complex external platforms. All calculations are derived from strategy.closedtrades.* , ensuring compatibility with any existing Pine Script strategy.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ ORIGINALITY AND USEFULNESS
This library is original work that adds value to the TradingView community in the following ways:
1. Comprehensive Metric Suite: Implements 112+ statistical calculations in a single library, including advanced metrics not available in TradingView's built-in tester (p-value, Z-score, Skewness, Kurtosis, Risk of Ruin).
2. Monte Carlo Simulation: Implements trade-sequence randomization to stress-test strategy robustness by simulating 1000+ alternative equity curves.
3. Walk-Forward Analysis: Divides historical data into rolling in-sample and out-of-sample windows to detect overfitting by comparing training vs. testing performance.
4. Rolling Window Statistics: Calculates time-varying Sharpe, Sortino, and Expectancy to analyze metric consistency throughout the backtest period.
5. Interactive Table Display: Renders professional-grade tables with color-coded thresholds, tooltips explaining each metric, and period analysis cards for drawdowns/trades.
6. Benchmark Comparison: Automatically fetches S&P 500 data to calculate Alpha, Beta, and R-squared, enabling objective assessment of strategy skill vs. passive investing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ KEY FEATURES
Performance Metrics
Net Profit, CAGR, Monthly Return, Expectancy
Profit Factor, Payoff Ratio, Sample Size
Compounding Effect Analysis
Risk Metrics
Sharpe Ratio, Sortino Ratio, Calmar Ratio (MAR)
Martin Ratio, Ulcer Index
Max Drawdown, Average Drawdown, Drawdown Duration
Risk of Ruin, R-squared (equity curve linearity)
Statistical Distribution
Value at Risk (VaR 95%), Conditional VaR
Skewness (return asymmetry)
Kurtosis (tail fatness)
Z-Score, p-value (statistical significance testing)
Trade Analysis
Win Rate, Breakeven Rate, Loss Rate
Average Trade Duration, Time in Market
Consecutive Win/Loss Streaks with Expected values
Top/Worst Trades with R-multiple tracking
Advanced Analytics
Monte Carlo Simulation (1000+ iterations)
Walk-Forward Analysis (rolling windows)
Rolling Statistics (time-varying metrics)
Out-of-Sample Testing
Benchmark Comparison
Alpha (excess return vs. benchmark)
Beta (systematic risk correlation)
Buy & Hold comparison
R-squared vs. benchmark
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ QUICK START
Basic Usage
//@version=6
strategy("My Strategy", overlay=true)
// Import the library
import Fractalyst/Deeptest/1 as *
// Your strategy logic
fastMA = ta.sma(close, 10)
slowMA = ta.sma(close, 30)
if ta.crossover(fastMA, slowMA)
strategy.entry("Long", strategy.long)
if ta.crossunder(fastMA, slowMA)
strategy.close("Long")
// Run the analysis
DT.runDeeptest()
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ METRIC EXPLANATIONS
The Deeptest table displays 23 metrics across the main row, with 23 additional metrics in the complementary row. Each metric includes detailed tooltips accessible by hovering over the value.
Main Row — Performance Metrics (Columns 0-6)
Net Profit — (Final Equity - Initial Capital) / Initial Capital × 100
— >20%: Excellent, >0%: Profitable, <0%: Loss
— Total return percentage over entire backtest period
Payoff Ratio — Average Win / Average Loss
— >1.5: Excellent, >1.0: Good, <1.0: Losses exceed wins
— Average winning trade size relative to average losing trade. Breakeven win rate = 100% / (1 + Payoff)
Sample Size — Count of closed trades
— >=30: Statistically valid, <30: Insufficient data
— Number of completed trades. Includes 95% confidence interval for win rate in tooltip
Profit Factor — Gross Profit / Gross Loss
— >=1.5: Excellent, >1.0: Profitable, <1.0: Losing
— Ratio of total winnings to total losses. Uses absolute values unlike payoff ratio
CAGR — (Final / Initial)^(365.25 / Days) - 1
— >=10%: Excellent, >0%: Positive growth
— Compound Annual Growth Rate - annualized return accounting for compounding
Expectancy — Sum of all returns / Trade count
— >0.20%: Excellent, >0%: Positive edge
— Average return per trade as percentage. Positive expectancy indicates profitable edge
Monthly Return — Net Profit / (Months in test)
— >0%: Profitable month average
— Average monthly return. Geometric monthly also shown in tooltip
Main Row — Trade Statistics (Columns 7-14)
Avg Duration — Average time in position per trade
— Mean holding period from entry to exit. Influenced by timeframe and trading style
Max CW — Longest consecutive winning streak
— Maximum consecutive wins. Expected value = ln(trades) / ln(1/winRate)
Max CL — Longest consecutive losing streak
— Maximum consecutive losses. Important for psychological risk tolerance
Win Rate — Wins / Total Trades
— Higher is better
— Percentage of profitable trades. Breakeven win rate shown in tooltip
BE Rate — Breakeven Trades / Total Trades
— Lower is better
— Percentage of trades that broke even (neither profit nor loss)
Loss Rate — Losses / Total Trades
— Lower is better
— Percentage of unprofitable trades. Together with win rate and BE rate, sums to 100%
Frequency — Trades per month
— Trading activity level. Displays intelligently (e.g., "12/mo", "1.5/wk", "3/day")
Exposure — Time in market / Total time × 100
— Lower = less risk
— Percentage of time the strategy had open positions
Main Row — Risk Metrics (Columns 15-22)
Sharpe Ratio — (Return - Rf) / StdDev × sqrt(Periods)
— >=3: Excellent, >=2: Good, >=1: Fair, <1: Poor
— Measures risk-adjusted return using total volatility. Annualized using sqrt(252) for daily
Sortino Ratio — (Return - Rf) / DownsideDev × sqrt(Periods)
— >=2: Excellent, >=1: Good, <1: Needs improvement
— Similar to Sharpe but only penalizes downside volatility. Can be higher than Sharpe
Max DD — (Peak - Trough) / Peak × 100
— <5%: Excellent, 5-15%: Moderate, 15-30%: High, >30%: Severe
— Largest peak-to-trough decline in equity. Critical for risk tolerance and position sizing
RoR — Risk of Ruin probability
— <1%: Excellent, 1-5%: Acceptable, 5-10%: Elevated, >10%: Dangerous
— Probability of losing entire trading account based on win rate and payoff ratio
R² — R-squared of equity curve vs. time
— >=0.95: Excellent, 0.90-0.95: Good, 0.80-0.90: Moderate, <0.80: Erratic
— Coefficient of determination measuring linearity of equity growth
MAR — CAGR / |Max Drawdown|
— Higher is better, negative = bad
— Calmar Ratio. Reward relative to worst-case loss. Negative if max DD exceeds CAGR
CVaR — Average of returns below VaR threshold
— Lower absolute is better
— Conditional Value at Risk (Expected Shortfall). Average loss in worst 5% of outcomes
p-value — Binomial test probability
— <0.05: Significant, 0.05-0.10: Marginal, >0.10: Likely random
— Probability that observed results are due to chance. Low p-value means statistically significant edge
Complementary Row — Extended Metrics
Compounding — (Compounded Return / Total Return) × 100
— Percentage of total profit attributable to compounding (position sizing)
Avg Win — Sum of wins / Win count
— Average profitable trade return in percentage
Avg Trade — Sum of all returns / Total trades
— Same as Expectancy (Column 5). Displayed here for convenience
Avg Loss — Sum of losses / Loss count
— Average unprofitable trade return in percentage (negative value)
Martin Ratio — CAGR / Ulcer Index
— Similar to Calmar but uses Ulcer Index instead of Max DD
Rolling Expectancy — Mean of rolling window expectancies
— Average expectancy calculated across rolling windows. Shows consistency of edge
Avg W Dur — Avg duration of winning trades
— Average time from entry to exit for winning trades only
Max Eq — Highest equity value reached
— Peak equity achieved during backtest
Min Eq — Lowest equity value reached
— Trough equity point. Important for understanding worst-case absolute loss
Buy & Hold — (Close_last / Close_first - 1) × 100
— >0%: Passive profit
— Return of simply buying and holding the asset from backtest start to end
Alpha — Strategy CAGR - Benchmark CAGR
— >0: Has skill (beats benchmark)
— Excess return above passive benchmark. Positive alpha indicates genuine value-added skill
Beta — Covariance(Strategy, Benchmark) / Variance(Benchmark)
— <1: Less volatile than market, >1: More volatile
— Systematic risk correlation with benchmark
Avg L Dur — Avg duration of losing trades
— Average time from entry to exit for losing trades only
Rolling Sharpe/Sortino — Dynamic based on win rate
— >2: Good consistency
— Rolling metric across sliding windows. Shows Sharpe if win rate >50%, Sortino if <=50%
Curr DD — Current drawdown from peak
— Lower is better
— Present drawdown percentage. Zero means at new equity high
DAR — CAGR adjusted for target DD
— Higher is better
— Drawdown-Adjusted Return. DAR^5 = CAGR if max DD = 5%
Kurtosis — Fourth moment / StdDev^4 - 3
— ~0: Normal, >0: Fat tails, <0: Thin tails
— Measures "tailedness" of return distribution (excess kurtosis)
Skewness — Third moment / StdDev^3
— >0: Positive skew (big wins), <0: Negative skew (big losses)
— Return distribution asymmetry
VaR — 5th percentile of returns
— Lower absolute is better
— Value at Risk at 95% confidence. Maximum expected loss in worst 5% of outcomes
Ulcer — sqrt(mean(drawdown^2))
— Lower is better
— Ulcer Index - root mean square of drawdowns. Penalizes both depth AND duration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ MONTE CARLO SIMULATION
Purpose
Monte Carlo simulation tests strategy robustness by randomizing the order of trades while keeping trade returns unchanged. This simulates alternative equity curves to assess outcome variability.
Method
Extract all historical trade returns
Randomly shuffle the sequence (1000+ iterations)
Calculate cumulative equity for each shuffle
Build distribution of final outcomes
Output
The stress test table shows:
Median Outcome: 50th percentile result
5th Percentile: Worst 5% of outcomes
95th Percentile: Best 95% of outcomes
Success Rate: Percentage of simulations that were profitable
Interpretation
If 95% of simulations are profitable: Strategy is robust
If median is far from actual result: High variance/unreliability
If 5th percentile shows large loss: High tail risk
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WALK-FORWARD ANALYSIS
Purpose
Walk-Forward Analysis (WFA) is the gold standard for detecting strategy overfitting. It simulates real-world trading by dividing historical data into rolling "training" (in-sample) and "validation" (out-of-sample) periods. A strategy that performs well on unseen data is more likely to succeed in live trading.
Method
The implementation uses a non-overlapping window approach following AmiBroker's gold standard methodology:
Segment Calculation: Total trades divided into N windows (default: 12), IS = ~75%, OOS = ~25%, Step = OOS length
Window Structure: Each window has IS (training) followed by OOS (validation). Each OOS becomes the next window's IS (rolling forward)
Metrics Calculated: CAGR, Sharpe, Sortino, MaxDD, Win Rate, Expectancy, Profit Factor, Payoff
Aggregation: IS metrics averaged across all IS periods, OOS metrics averaged across all OOS periods
Output
IS CAGR: In-sample annualized return
OOS CAGR: Out-of-sample annualized return ( THE key metric )
IS/OOS Sharpe: In/out-of-sample risk-adjusted return
Success Rate: % of OOS windows that were profitable
Interpretation
Robust: IS/OOS CAGR gap <20%, OOS Success Rate >80%
Some Overfitting: CAGR gap 20-50%, Success Rate 50-80%
Severe Overfitting: CAGR gap >50%, Success Rate <50%
Key Principles:
OOS is what matters — Only OOS predicts live performance
Consistency > Magnitude — 10% IS / 9% OOS beats 30% IS / 5% OOS
Window count — More windows = more reliable validation
Non-overlapping OOS — Prevents data leakage
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ TABLE DISPLAY
Main Table — Organized into three sections:
Performance Metrics (Cols 0-6): Net Profit, Payoff, Sample Size, Profit Factor, CAGR, Expectancy, Monthly
Trade Statistics (Cols 7-14): Avg Duration, Max CW, Max CL, Win, BE, Loss, Frequency, Exposure
Risk Metrics (Cols 15-22): Sharpe, Sortino, Max DD, RoR, R², MAR, CVaR, p-value
Color Coding
🟢 Green: Excellent performance
🟠 Orange: Acceptable performance
⚪ Gray: Neutral / Fair
🔴 Red: Poor performance
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ IMPLEMENTATION NOTES
Data Source: All metrics calculated from strategy.closedtrades , ensuring compatibility with any Pine Script strategy
Calculation Timing: All calculations occur on barstate.islastconfirmedhistory to optimize performance
Limitations: Requires at least 1 closed trade for basic metrics, 30+ trades for reliable statistical analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ QUICK NOTES
➙ This library has been developed and refined over two years of real-world strategy testing. Every calculation has been validated against industry-standard quantitative finance references.
➙ The entire codebase is thoroughly documented inline. If you are curious about how a metric is calculated or want to understand the implementation details, dive into the source code -- it is written to be read and learned from.
➙ This description focuses on usage and concepts rather than exhaustively listing every exported type and function. The library source code is thoroughly documented inline -- explore it to understand implementation details and internal logic.
➙ All calculations execute on barstate.islastconfirmedhistory to minimize runtime overhead. The library is designed for efficiency without sacrificing accuracy.
➙ Beyond analysis, this library serves as a learning resource. Study the source code to understand quantitative finance concepts, Pine Script advanced techniques, and proper statistical methodology.
➙ Metrics are their own not binary good/bad indicators. A high Sharpe ratio with low sample size is misleading. A deep drawdown during a market crash may be acceptable. Study each function and metric individually -- evaluate your strategy contextually, not by threshold alone.
➙ All strategies face alpha decay over time. Instead of over-optimizing a single strategy on one timeframe and market, build a diversified portfolio across multiple markets and timeframes. Deeptest helps you validate each component so you can combine robust strategies into a trading portfolio.
➙ Screenshots shown in the documentation are solely for visual representation to demonstrate how the tables and metrics will be displayed. Please do not compare your strategy's performance with the metrics shown in these screenshots -- they are illustrative examples only, not performance targets or benchmarks.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW-TO
Using Deeptest is intentionally straightforward. Just import the library and call DT.runDeeptest() at the end of your strategy code in main scope. .
//@version=6
strategy("My Strategy", overlay=true)
// Import the library
import Fractalyst/Deeptest/1 as DT
// Your strategy logic
fastMA = ta.sma(close, 10)
slowMA = ta.sma(close, 30)
if ta.crossover(fastMA, slowMA)
strategy.entry("Long", strategy.long)
if ta.crossunder(fastMA, slowMA)
strategy.close("Long")
// Run the analysis
DT.runDeeptest()
And yes... it's compatible with any TradingView Strategy! 🪄
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ CREDITS
Author: @Fractalyst
Font Library: by @fikira - @kaigouthro - @Duyck
Community: Inspired by the @PineCoders community initiative, encouraging developers to contribute open-source libraries and continuously enhance the Pine Script ecosystem for all traders.
if you find Deeptest valuable in your trading journey, feel free to use it in your strategies and give a shoutout to @Fractalyst -- Your recognition directly supports ongoing development and open-source contributions to Pine Script.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ DISCLAIMER
This library is provided for educational and research purposes. Past performance does not guarantee future results. Always test thoroughly and use proper risk management. The author is not responsible for any trading losses incurred through the use of this code.
Volume-Weighted Price Z-Score [QuantAlgo]🟢 Overview
The Volume-Weighted Price Z-Score indicator quantifies price deviations from volume-weighted equilibrium using statistical standardization. It combines volume-weighted moving average analysis with logarithmic deviation measurement and volatility normalization to identify when prices have moved to statistically extreme levels relative to their volume-weighted baseline, helping traders and investors spot potential mean reversion opportunities across multiple timeframes and asset classes.
🟢 How It Works
The indicator's core methodology lies in its volume-weighted statistical approach, where price displacement is measured through normalized deviations from volume-weighted price levels:
volumeWeightedAverage = ta.vwma(priceSource, lookbackPeriod)
logDeviation = math.log(priceSource / volumeWeightedAverage)
volatilityMeasure = ta.stdev(logDeviation, lookbackPeriod)
The script uses logarithmic transformation to capture proportional price changes rather than absolute differences, ensuring equal treatment of percentage moves regardless of price level:
rawZScore = logDeviation / volatilityMeasure
zScore = ta.ema(rawZScore, smoothingPeriod)
First, it establishes the volume-weighted baseline which gives greater weight to price levels where significant trading occurred, creating a more representative equilibrium point than simple moving averages.
Then, the logarithmic deviation measurement converts the price-to-average ratio into a normalized scale:
logDeviation = math.log(priceSource / volumeWeightedAverage)
Next, statistical normalization is achieved by dividing the deviation by its own historical volatility, creating a standardized z-score that measures how many standard deviations the current price sits from the volume-weighted mean.
Finally, EMA smoothing filters noise while preserving the signal's responsiveness to genuine market extremes:
rawZScore = logDeviation / volatilityMeasure
zScore = ta.ema(rawZScore, smoothingPeriod)
This creates a volume-anchored statistical oscillator that combines price-volume relationship analysis with volatility-adjusted normalization, providing traders with probabilistic insights into market extremes and mean reversion potential based on standard deviation thresholds.
🟢 Signal Interpretation
▶ Positive Values (Above Zero): Price trading above volume-weighted average indicating potential overvaluation relative to volume-weighted equilibrium = Caution on longs, potential mean reversion downward = Short/sell opportunities
▶ Negative Values (Below Zero): Price trading below volume-weighted average indicating potential undervaluation relative to volume-weighted equilibrium = Caution on shorts, potential mean reversion upward = Long/buy opportunities
▶ Zero Line Crosses: Mean reversion transitions where price crosses back through volume-weighted equilibrium, indicating shift from overvalued to undervalued (or vice versa) territory
▶ Extreme Positive Zone (Above +2.5σ default): Statistically rare overvaluation representing 98.8%+ confidence level deviation, indicating extremely stretched bullish conditions with high mean reversion probability = Strong correction warning/short signal
▶ Extreme Negative Zone (Below -2.5σ default): Statistically rare undervaluation representing 98.8%+ confidence level deviation, indicating extremely stretched bearish conditions with high mean reversion probability = Strong buying opportunity signal
▶ ±1σ Reference Levels: Moderate deviation zones (±1 standard deviation) marking common price fluctuation boundaries where approximately 68% of price action occurs under normal distribution
▶ ±2σ Reference Levels: Significant deviation zones (±2 standard deviations) marking unusual price extremes where approximately 95% of price action should be contained under normal conditions
🟢 Features
▶ Preconfigured Presets: Three optimized parameter sets accommodate different analytical approaches, instruments and timeframes. "Default" provides balanced statistical measurement suitable for swing trading and daily/4-hour analysis, offering deviation detection with moderate responsiveness to price dislocations. "Fast Response" delivers heightened sensitivity optimized for intraday trading and scalping on 15-minute to 1-hour charts, using shorter statistical windows and minimal smoothing to capture rapid mean reversion opportunities as they develop. "Smooth Trend" offers conservative extreme identification ideal for position trading on daily to weekly charts, employing extended statistical periods and heavy noise filtering to isolate only the most significant market extremes.
▶ Built-in Alerts: Seven alert conditions enable comprehensive automated monitoring of statistical extremes and mean reversion events. Extreme Overbought triggers when z-score crosses above the extreme threshold (default +2.5σ) signaling rare overvaluation, Extreme Oversold activates when z-score crosses below the negative extreme threshold (default -2.5σ) signaling rare undervaluation. Exit Extreme Overbought and Exit Extreme Oversold alert when prices begin reverting from these statistical extremes back toward the mean. Bullish Mean Reversion notifies when z-score crosses above zero indicating shift to overvalued territory, while Bearish Mean Reversion triggers on crosses below zero indicating shift to undervalued territory. Any Extreme Level provides a combined alert for any extreme threshold breach regardless of direction. These notifications allow you to capitalize on statistically significant price dislocations without continuous chart monitoring.
▶ Color Customization: Six visual themes (Classic, Aqua, Cosmic, Ember, Neon, plus Custom) accommodate different chart backgrounds and visual preferences, ensuring optimal contrast for identifying positive versus negative deviations across trading environments. The adjustable fill transparency control (0-100%) allows fine-tuning of the gradient area prominence between the z-score line and zero baseline, with higher opacity values creating subtle background context while lower values produce bold deviation emphasis. Optional bar coloring extends the z-score gradient directly to the indicator pane bars, providing immediate visual reinforcement of current deviation magnitude and direction without requiring reference to the plotted line itself.
*Note: This indicator requires volume data to function correctly, as it calculates deviations from a volume-weighted price average. Tickers with no volume data or extremely limited volume will not produce meaningful results, i.e., the indicator may display flat lines, erratic values, or fail to calculate properly. Using this indicator on assets without volume data (certain forex pairs, synthetic indices, or instruments with unreported/unavailable volume) will produce unreliable or no results at all. Additionally, ensure your chart has sufficient historical data to cover the selected lookback period, e.g., using a 100-bar lookback on a chart with only 50 bars of history will yield incomplete or inaccurate calculations. Always verify your chosen ticker has consistent, accurate volume information and adequate price history before applying this indicator.
Chart Wolf ToolkitVWAP • PDH/PDL • NY Kill Zone
This indicator is built for traders who trade less, not more.
The Chart Wolf WLR Toolkit standardizes your chart so every decision is made from location, structure, and timing — not indicators, signals, or predictions.
It is designed to support the Wolf Liquidity Reversal (WLR) and Wolf Value Reversion (WVR) trade models.
CVD Flow Labels for Sessions Ranges [AMT Edition]CVD Flow Labels for Session Ranges
Description:
This script provides a session-aware Cumulative Volume Delta (CVD) analysis designed to enhance the “Session Ranges ” framework by combining price extremes with detailed volume flow dynamics. Unlike generic trend or scalping indicators, this tool focuses on identifying aggressive buying and selling pressure, distinguishing between absorption (failed auctions where aggressive flows are rejected) and acceptance (confirmed continuation of flows).
How it works:
CVD Calculation: The script calculates delta for each bar using a choice of Total, Periodic, or EMA-based cumulative methods. Delta represents the net difference between estimated buying and selling volume per bar.
Normalization: By normalizing delta relative to recent volatility, it highlights extreme flows that are statistically significant, making large shifts in market sentiment easier to spot.
Session-Specific Analysis: The indicator separates Asia, London, and New York sessions to allow context-sensitive interpretation of price and volume interactions. Each session’s extremes are monitored, and flow labels are plotted relative to these extremes.
Flow Labels: Bullish and bearish absorption (“ABS”) and acceptance (“ACC WEAK/STRONG”) labels provide immediate visual cues about whether aggressive flows are being absorbed or accepted at key price levels.
Alerts: Configurable alerts trigger when absorption or acceptance occurs, supporting active trading or strategy automation.
Originality & Usefulness:
This script is original because it integrates volume-based auction theory with session-specific market structure, rather than simply showing trend or scalping signals. By combining CVD dynamics with session extreme levels from the “Session Ranges ” script, traders can:
Identify where price is likely to be accepted or rejected.
Confirm aggressive buying or selling flows before entering trades.
Time entries near session extremes with higher probability setups.
How to use:
Apply the “Session Ranges ” to see session highs, lows, and interaction lines.
Use this CVD Flow Labels script to visualize absorption and acceptance at these session levels.
Enter trades based on alignment of session extremes and flow signals:
Absorption at a session extreme may indicate a potential reversal.
Acceptance suggests continuation in the direction of the flow.
Alerts can help manage trades without constant screen monitoring.
This tool is designed to give traders a structured, session-based view of market auctions, providing actionable insights that go beyond typical trend-following or scalping methods. It emphasizes flow analysis and statistical extremes, enabling traders to make more informed decisions grounded in market microstructure.
GCM Price Volume Trend [Dual Signal Ribbon]1. Title
GCM Price Volume Trend
2. Description (Copy & Paste)
Overview
The GCM Price Volume Trend (PVT) is an advanced enhancement of the classic Price Volume Trend indicator. While standard PVT indicators typically use a single signal line, this version introduces a Dual Signal Ribbon System. This allows traders to visualize trend strength, filter out market noise, and identify momentum shifts more accurately.
This script is built upon the foundational logic of the Price Volume Trend indicator by @everget, upgraded here to Pine Script v6 with significant functional additions.
How It Works
The Price Volume Trend (PVT) is similar to On Balance Volume (OBV), but with a key difference: while OBV adds all volume on an up day, PVT adds only a portion of the volume proportional to the percentage price change. This makes PVT a more accurate representation of money flow relative to price movement.
Key Features in This Version
1. Dual Signal Ribbon: Unlike the original single-line version, this indicator plots two signal lines. The area between them acts as a "Cloud" or "Ribbon."
o Green Ribbon: Indicates strong bullish momentum.
o Red Ribbon: Indicates bearish momentum.
o Narrow/Twisting Ribbon: Indicates consolidation or indecision.
2. 7 Smoothing Algorithms: You are no longer limited to just SMA or EMA. You can independently set both signal lines to use:
o SMA (Simple)
o EMA (Exponential)
o WMA (Weighted)
o RMA (Rolling/Wilder's)
o HMA (Hull - Great for reducing lag)
o VWMA (Volume Weighted)
o LSMA (Least Squares / Linear Regression)
3. Visual Customization: Fully standardized coloring system with adjustable opacity for the ribbons to keep your chart clean.
How to Use
• Trend Following: When the main PVT line is above both signal lines and the ribbon is Green, the trend is Bullish.
• Crossovers: A crossover of the PVT line above the Primary Signal (Signal 1) is an early entry warning. A crossover above the Secondary Signal (Signal 2) confirms the trend.
• Divergence: If Price makes a Higher High but the PVT line makes a Lower High (and fails to break above the ribbon), look for a potential reversal.
Settings
• Signal 1 & 2 Type/Length: Customize the sensitivity of the ribbon.
• Style & Colors: Adjust Bull/Bear colors and transparency levels to fit your dark or light theme.
Credits
• Original PVT script logic inspired by @everget.
• Modifications, Dual-Signal logic, and v6 upgrade by @uniGram.
HNY russian version ENGLISH:
Happy New Year Kalman Bands Oscillator 2026
Celebrate the markets with this festive, high-precision tool! It combines a True Kalman Filter for trend direction, Absorption Z-Score for volume elasticity, and Williams VIX Fix to pinpoint reversals. Features include dynamic "smart" bands, festive emoji signals (🎄/🎅), and humorous quotes from famous economists to keep your trading cheerful. Professional analysis meets holiday spirit! 🎆
Key Features:
Smart Bands: Adapt to volatility and volume, showing real market boundaries.
Signals: Clear markers for reversals (🎄/🎅), breakouts, and strong trends with festive emojis.
Humor: Random satirical quotes from Nabiullina, Powell, Satoshi, and others appear on the chart to lighten the mood.
Info-Panel: A full market status summary in the corner of the screen.
The perfect balance between fun and professional technical analysis. Happy New Year and profits in 2026! 🎆
RUSSIAN:
🎄 Новогодний Осциллятор 2026 (Happy New Year True Kalman Oscillator)
Праздничное настроение с серьезной математикой! Этот инструмент объединяет "настоящий" фильтр Калмана для точного определения тренда, анализ Z-Score поглощения обьемов для оценки эластичности цены и Williams VIX Fix для поиска точек разворота.
Ключевые особенности:
Умные Полосы: Адаптируются под волатильность и объемы, показывая реальные границы рынка.
Сигналы: Четкие метки для разворотов (🎄/🎅), пробоев и сильных трендов с праздничными эмодзи.
Юмор: Случайные сатирические цитаты от Набиуллиной, Пауэлла, Сатоши и других появляются на графике, чтобы разрядить обстановку.
Инфо-панель: Полная сводка состояния рынка в углу экрана.
Идеальный баланс между весельем и профессиональным техническим анализом. С Новым Годом и профита в 2026! 🎆






















