Machine Learning-Inspired Supply & Demand Zones [AlgoPoint]This indicator is a Smart Supply & Demand Zone tool, developed with principles inspired by Machine Learning (ML). It intelligently filters out market noise, allowing you to focus only on the most significant zones where institutional order flow is likely present.
💡 How It Works: Why Is This Indicator "Smart"?
Unlike traditional indicators that only measure simple price movements, this script uses an algorithm that asks the same critical questions an experienced market analyst would to qualify a zone:
- 1. Price Imbalance: How fast and aggressively did the price leave the zone? Our algorithm measures the body size of the "departure candle" relative to the current market volatility (ATR). A zone is only considered if it was formed by an explosive move that is statistically significant, indicating a major imbalance between buyers and sellers.
- 2. Volume Confirmation: Did the "smart money" participate in this move? The script checks if the volume on the departure candle was significantly higher than the recent average volume. A spike in volume confirms that the move was backed by institutional interest, adding strength and validity to the zone.
- 3. Valid Pivot Structure: Did the zone originate from a meaningful swing high or low? The algorithm first identifies a valid pivot structure, ensuring that zones are not drawn from insignificant or random price fluctuations.
Only when a potential zone passes these three critical tests—our "quality filter"—is it drawn on your chart.
🚀 Features & How to Use
Using the indicator is straightforward. You will see two primary types of boxes on your chart:
* 🟥 Red Box (Supply Zone): An area of potential resistance where selling pressure is likely to be strong. Look for potential shorting opportunities as the price approaches this zone.
* 🟩 Green Box (Demand Zone): An area of potential support where buying pressure is likely to be strong. Look for potential long opportunities as the price pulls back into this zone.
Dynamic Zone Management
This indicator is not static; it lives and breathes with the market:
- Fresh Zone: A newly formed zone appears in its full, vibrant color. These are the highest-probability zones as they have not yet been re-tested.
- Broken / Flipped Zone: You have full control over what happens when a zone is broken! In the settings, you can choose:
- Delete Zone: The zone will be removed completely when the price closes through it.
- Show as Broken (Flip): When broken, the zone will turn gray, stop extending, and remain on your chart. This is extremely useful for identifying Support/Resistance Flips, where a broken demand zone becomes new resistance, or a broken supply zone becomes new support.
⚙️ Settings & Customization
Fine-tune the indicator to match your personal trading style via the settings menu:
- Breakout Behavior: The most powerful feature. Choose between Delete Zone and Show as Broken (Flip) to customize your chart.
- Zone Finding Logic: Control the indicator's sensitivity.
- Selective: Requires both strong imbalance and high volume. Finds fewer, but higher-quality, zones.
- Moderate: Requires either strong imbalance or high volume. Finds more potential zones.
- Sensitivity Settings: Adjust the ATR Multiplier and Volume Multiplier to make the criteria for a "strong" zone stricter or looser.
Göstergeler ve stratejiler
ADX Tide ZonesADX Tide Zones – Adaptive Momentum & Trend Strength Framework
Overview
ADX Tide Zones – Professional is a dynamic trend-strength visualizer designed for traders who want to interpret momentum with precision and context. By combining the Average Directional Index (ADX) with adaptive threshold logic, the indicator segments price action into distinct “tide zones” that reflect varying levels of market strength: Calm, Rising, Strong, and Falling Tides. These zones transform raw ADX readings into an interpretable framework that highlights when markets are consolidating, building momentum, trending strongly, or losing strength.
Unlike standard ADX readings, which can be difficult to interpret in real time, ADX Tide Zones translate momentum shifts into a continuous, color-coded system that traders can instantly read. Whether applied to scalping, intraday, or swing trading, the indicator offers a consistent methodology for identifying actionable opportunities across assets and timeframes.
How It Works
The foundation of ADX Tide Zones lies in momentum analysis via the ADX. By measuring the strength (not direction) of a trend, ADX provides an objective read on when markets are gaining or losing energy. ADX Tide Zones enhances this by applying threshold logic to classify ADX values into four distinct states:
Calm Tide : Low ADX values indicate sideways or consolidating conditions.
Rising Tide : ADX increases past a threshold, signaling momentum building.
Strong Tide : ADX remains elevated, confirming robust and sustained trend strength.
Falling Tide : ADX declines after strength, hinting at exhaustion or early reversal setups.
These states are displayed on the chart through adaptive visualizations (zones, bar colors, or overlays), offering real-time clarity on when to expect expansion, continuation, or contraction in price action.
Interpretation
Trend Analysis : By mapping transitions between tides, traders can instantly gauge whether markets are in accumulation, expansion, or exhaustion phases. Rising/Strong Tides reinforce trend continuation, while Falling Tides highlight weakening conditions.
Volatility & Risk Assessment : Shifts between Calm → Rising Tide often precede volatility expansions. Falling Tides can signal a period of compression or corrective moves, warning traders to manage risk proactively.
Market Context : The indicator does not dictate direction; instead, it overlays strength on top of price action, allowing traders to combine it with directional tools such as moving averages, order blocks, or liquidity zones for confirmation.
Strategy Integration
ADX Tide Zones adapts seamlessly to a wide range of trading strategies by translating momentum dynamics into actionable frameworks:
Trend Following : Traders can align with dominant flows by entering positions when the indicator confirms a Rising Tide or Strong Tide. These conditions signal persistent directional strength, making them ideal for continuation setups. Combining directional bias with ADX confirmation reduces the risk of trading against prevailing momentum.
Breakout Trading : When the market transitions from Calm Tide into a Rising Tide, it often precedes a volatility expansion. This shift highlights breakout conditions where accumulation gives way to impulsive price movement. Traders can use this transition as a timing tool to catch early entries into new momentum phases.
Exhaustion Reversals : Strong Tide phases don’t last forever—when they begin to fade into Falling Tide, it can mark trend fatigue or liquidity exhaustion. This offers contrarian traders an early edge in spotting overextended moves and positioning for corrective pullbacks or full reversals.
Multi-Timeframe Analysis : By overlaying higher timeframe tide zones on intraday or scalping charts, traders can filter noise and trade in alignment with larger flows. For example, combining a daily Rising Tide bias with a 15-minute breakout confirmation can significantly improve entry precision while reducing exposure to false signals.
Advanced Techniques
For traders seeking an extra edge, ADX Tide Zones can be pushed further with advanced methods:
Volume & Liquidity Confirmation : Pair the tide transitions with volume spikes, order flow, or liquidity sweep tools. When directional strength confirmed by the ADX coincides with institutional activity, it validates setups and increases probability of follow-through.
Cross-Asset Synchronization : Momentum rarely exists in isolation. Monitoring tide shifts across correlated instruments (e.g., majors vs. USD, or indices vs. risk assets) can uncover synchronized volatility events. These correlations help traders identify whether a move is isolated noise or part of a broader systemic trend.
Threshold Optimization : The sensitivity of ADX Tide Zones can be fine-tuned for different trading objectives. Lower thresholds heighten responsiveness, capturing micro-moves suitable for scalpers. Higher thresholds filter minor fluctuations, isolating major structural swings that align with swing or position trading.
Contextual Trade Management : Instead of using static stops or targets, traders can adapt risk management dynamically by tracking tide progression. For example, a trade initiated during Rising Tide may remain valid as long as conditions sustain, but partial profits or tighter stops can be applied once the zone shifts to Calm Tide.
Inputs & Customization
ADX Length : Define the lookback period for ADX calculation.
Threshold Levels : Adjust sensitivity for Calm, Rising, Strong, and Falling Tides.
Zone Visualization : Choose between bar coloring, background shading, or overlays.
Color Customization : Configure bullish, bearish, neutral, and tide-specific colors.
Multi-Timeframe Options : Enable tide readings from higher timeframes for confirmation.
Why Use ADX Tide Zones
ADX Tide Zones turns the complexity of momentum analysis into a visual system that highlights when markets are gearing up for moves, trending with conviction, or running out of steam. By combining adaptive ADX interpretation with customizable thresholds, traders can:
Anticipate breakouts before volatility expands.
Confirm the strength behind price trends.
Spot exhaustion phases early to secure profits or prepare for reversals.
Adapt strategies seamlessly between scalping, intraday, and swing trading.
With its balance of simplicity and depth, ADX Tide Zones provides a structured lens for reading market momentum, equipping traders with the clarity needed to execute with discipline and confidence.
jsonbuilderLibrary "jsonbuilder"
JsonBuilder for easiest way to generate json string
JSONBuilder(pairs)
Create JSONBuilder instance
Parameters:
pairs (array) : Pairs list, not required for users
method addField(this, key, value, kind)
Add Json Object
Namespace types: _JSONBuilder
Parameters:
this (_JSONBuilder)
key (string) : Field key
value (string) : Field value
kind (series Kind) : Kind value
method execute(this)
Create json string
Namespace types: _JSONBuilder
Parameters:
this (_JSONBuilder)
method addArray(this, key, value)
Add Json Array
Namespace types: _JSONBuilder
Parameters:
this (_JSONBuilder)
key (string) : Field key
value (array<_JSONBuilder>) : Object value array
method addObject(this, key, value)
Add Json Object
Namespace types: _JSONBuilder
Parameters:
this (_JSONBuilder)
key (string) : Field key
value (_JSONBuilder) : Object value
_JSONBuilder
JSONBuilder type
Fields:
pairs (array) : Pairs data
POC Migration Velocity (POC-MV) [PhenLabs]📊POC Migration Velocity (POC-MV)
Version: PineScript™v6
📌Description
The POC Migration Velocity indicator revolutionizes market structure analysis by tracking the movement, speed, and acceleration of Point of Control (POC) levels in real-time. This tool combines sophisticated volume distribution estimation with velocity calculations to reveal hidden market dynamics that conventional indicators miss.
POC-MV provides traders with unprecedented insight into volume-based price movement patterns, enabling the early identification of continuation and exhaustion signals before they become apparent to the broader market. By measuring how quickly and consistently the POC migrates across price levels, traders gain early warning signals for significant market shifts and can position themselves advantageously.
The indicator employs advanced algorithms to estimate intra-bar volume distribution without requiring lower timeframe data, making it accessible across all chart timeframes while maintaining sophisticated analytical capabilities.
🚀Points of Innovation
Micro-POC calculation using advanced OHLC-based volume distribution estimation
Real-time velocity and acceleration tracking normalized by ATR for cross-market consistency
Persistence scoring system that quantifies directional consistency over multiple periods
Multi-signal detection combining continuation patterns, exhaustion signals, and gap alerts
Dynamic color-coded visualization system with intensity-based feedback
Comprehensive customization options for resolution, periods, and thresholds
🔧Core Components
POC Calculation Engine: Estimates volume distribution within each bar using configurable price bands and sophisticated weighting algorithms
Velocity Measurement System: Tracks the rate of POC movement over customizable lookback periods with ATR normalization
Acceleration Calculator: Measures the rate of change of velocity to identify momentum shifts in POC migration
Persistence Analyzer: Quantifies how consistently POC moves in the same direction using exponential weighting
Signal Detection Framework: Combines trend analysis, velocity thresholds, and persistence requirements for signal generation
Visual Rendering System: Provides dynamic color-coded lines and heat ribbons based on velocity and price-POC relationships
🔥Key Features
Real-time POC calculation with 10-100 configurable price bands for optimal precision
Velocity tracking with customizable lookback periods from 5 to 50 bars
Acceleration measurement for detecting momentum changes in POC movement
Persistence scoring to validate signal strength and filter false signals
Dynamic visual feedback with blue/orange color scheme indicating bullish/bearish conditions
Comprehensive alert system for continuation patterns, exhaustion signals, and POC gaps
Adjustable information table displaying real-time metrics and current signals
Heat ribbon visualization showing price-POC relationship intensity
Multiple threshold settings for customizing signal sensitivity
Export capability for use with separate panel indicators
🎨Visualization
POC Connecting Lines: Color-coded lines showing POC levels with intensity based on velocity magnitude
Heat Ribbon: Dynamic colored ribbon around price showing POC-price basis intensity
Signal Markers: Clear exhaustion top/bottom signals with labeled shapes
Information Table: Real-time display of POC value, velocity, acceleration, basis, persistence, and current signal status
Color Gradients: Blue gradients for bullish conditions, orange gradients for bearish conditions
📖Usage Guidelines
POC Calculation Settings
POC Resolution (Price Bands): Default 20, Range 10-100. Controls the number of price bands used to estimate volume distribution within each bar
Volume Weight Factor: Default 0.7, Range 0.1-1.0. Adjusts the influence of volume in POC calculation
POC Smoothing: Default 3, Range 1-10. EMA smoothing period applied to the calculated POC to reduce noise
Velocity Settings
Velocity Lookback Period: Default 14, Range 5-50. Number of bars used to calculate POC velocity
Acceleration Period: Default 7, Range 3-20. Period for calculating POC acceleration
Velocity Significance Threshold: Default 0.5, Range 0.1-2.0. Minimum normalized velocity for continuation signals
Persistence Settings
Persistence Lookback: Default 5, Range 3-20. Number of bars examined for persistence score calculation
Persistence Threshold: Default 0.7, Range 0.5-1.0. Minimum persistence score required for continuation signals
Visual Settings
Show POC Connecting Lines: Toggle display of colored lines connecting POC levels
Show Heat Ribbon: Toggle display of colored ribbon showing POC-price relationship
Ribbon Transparency: Default 70, Range 0-100. Controls transparency level of heat ribbon
Alert Settings
Enable Continuation Alerts: Toggle alerts for continuation pattern detection
Enable Exhaustion Alerts: Toggle alerts for exhaustion pattern detection
Enable POC Gap Alerts: Toggle alerts for significant POC gaps
Gap Threshold: Default 2.0 ATR, Range 0.5-5.0. Minimum gap size to trigger alerts
✅Best Use Cases
Identifying trend continuation opportunities when POC velocity aligns with price direction
Spotting potential reversal points through exhaustion pattern detection
Confirming breakout validity by monitoring POC gap behavior
Adding volume-based context to traditional technical analysis
Managing position sizing based on POC-price basis strength
⚠️Limitations
POC calculations are estimations based on OHLC data, not true tick-by-tick volume distribution
Effectiveness may vary in low-volume or highly volatile market conditions
Requires complementary analysis tools for complete trading decisions
Signal frequency may be lower in ranging markets compared to trending conditions
Performance optimization needed for very short timeframes below 1-minute
💡What Makes This Unique
Advanced Estimation Algorithm: Sophisticated method for calculating POC without requiring lower timeframe data
Velocity-Based Analysis: Focus on POC movement dynamics rather than static levels
Comprehensive Signal Framework: Integration of continuation, exhaustion, and gap detection in one indicator
Dynamic Visual Feedback: Intensity-based color coding that adapts to market conditions
Persistence Validation: Unique scoring system to filter signals based on directional consistency
🔬How It Works
Volume Distribution Estimation:
Divides each bar into configurable price bands for volume analysis
Applies sophisticated weighting based on OHLC relationships and proximity to close
Identifies the price level with maximum estimated volume as the POC
Velocity and Acceleration Calculation:
Measures POC rate of change over specified lookback periods
Normalizes values using ATR for consistent cross-market performance
Calculates acceleration as the rate of change of velocity
Signal Generation Process:
Combines trend direction analysis using EMA crossovers
Applies velocity and persistence thresholds to filter signals
Generates continuation, exhaustion, and gap alerts based on specific criteria
💡Note:
This indicator provides estimated POC calculations based on available OHLC data and should be used in conjunction with other analysis methods. The velocity-based approach offers unique insights into market structure dynamics but requires proper risk management and complementary analysis for optimal trading decisions.
BE-Fib Channel 2 Sided Trading█ Overview:
"BE-Fib Channel 2 Sided Trading" indicator is built with the thought of 2 profound setups named "Cup & Handle (C&H)" and "Fibonacci Channel Trading (FCT)" with the context of "day trading" or with a minimum holding period.
█ Similarities, Day Trading Context & Error Patterns:
While the known fact is that both C&H and FCT provide setups with lesser risk with bigger returns, they both share the similar "Base Pattern".
Note: Inverse of the above Image shall switch the setups between long vs short.
Since the indicator is designed for smaller time-frame candles, there may be instances where the "base pattern" does not visually resemble a Cup & Handle (C&H) pattern. However, patterns are validated using pivot points. The points labeled "A" and "C" can be equal or slightly slanted. Settings of the Indicator allows traders a flexibility to control the angle of these points to spot the strategies according to set conditions. Therefore, understanding the nuances of these patterns is crucial for effective decision-making.
█ 2 Sided Edge: FCT suggests to take trade closer to the yellow line to get better RR ratio. this leaves a small chance of doubt as to; what if price is intended to break the Yellow line thereby activating the C&H.
Wait for the confirmation is a Big FOMO with a compromised RR.
Hence, This indicator is designed to handle both the patterns based on the strength, FIFO and pattern occurring delay.
█ How to Use this Indicator:
Step 1: Enable the Show Sample Sensitivity option to understand the angle of yellow line shown in the sample image. By enabling this option, On the last bar you shall see 4 lines being plotted depicting the max angle which is acceptable for both long and short trades.
Note: Angle can be controlled via setting "Sensitivity".
Higher Sensitivity --> Higher Setup identification --> can lead to failed setups due to 2 sided trading.
Lower Sensitivity --> Lower Setup identification --> can increase the changes of being right.
Step 2: Adjust the look back & look forward periods which shall be used for identifying patterns.
Note: Smaller values can lead to more setups being identified but can hamper the performance of the indicator while increasing the chances of failures. larger values identifies more significant setup but leads to more waiting period thereby compromising on the RR.
Step 3: Adjust the Base Range.
Note: Smaller values can lead to more setups being identified but can hamper the performance of the indicator while increasing the chances of failures. larger values identifies more significant setup but leads to more Risk on play.
Step 4: set the Entry level for FCT & Set the SL for Both FCT & C&H and Target Reward ratio for C&H.
█ Features of Indicator & How it works:
1. Patterns are being identified using Pivot Points method.
2. Tracks & validates both the setups simultaneously on every candle and traded one at a time based on FIFO, New setups found in-between, Defined Entry Levels while on wait for the other pattern to get activated.
3. Alerts added for trade events.
4. FCT setups are generally traded with trailed SL level and increasing Target level on every completed bar. while C&H has the standard SL & TP level with no Trail SL option.
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.
Ultra Volume DetectorNative Volume — Auto Levels + Ultra Label
What it does
This indicator classifies volume bars into four categories — Low, Medium, High, and Ultra — using rolling percentile thresholds. Instead of fixed cutoffs, it adapts dynamically to recent market activity, making it useful across different symbols and timeframes. Ultra-high volume bars are highlighted with labels showing compacted values (K/M/B/T) and the appropriate unit (shares, contracts, ticks, etc.).
Core Logic
Dynamic thresholds: Calculates percentile levels (e.g., 50th, 80th, 98th) over a user-defined window of bars.
Categorization: Bars are colored by category (Low/Med/High/Ultra).
Ultra labeling: Only Ultra bars are labeled, preventing chart clutter.
Optional MA: A moving average of raw volume can be plotted for context.
Alerts: Supports both alert condition for Ultra events and dynamic alert() messages that include the actual volume value at bar close.
How to use
Adjust window size: Larger windows (e.g., 200+) provide stable thresholds; smaller windows react more quickly.
Set percentiles: Typical defaults are 50 for Medium, 80 for High, and 98 for Ultra. Lower the Ultra percentile to see more frequent signals, or raise it to isolate only extreme events.
Read chart signals:
Bar colors show the category.
Labels appear only on Ultra bars.
Alerts can be set up for automatic notification when Ultra volume occurs.
Why it’s unique
Adaptive: Uses rolling statistics, not static thresholds.
Cross-asset ready: Adjusts units automatically depending on instrument type.
Efficient visualization: Focuses labels only on the most significant events, reducing noise.
⚠️ Disclaimer: This tool is for educational and analytical purposes only. It does not provide financial advice. Always test and manage risk before trading live
Big Orders Detector - Whale Activity SpotterDetect Institutional & Whale Trading Activity with Volume Analysis
This indicator helps traders identify significant buy/sell orders (whale activity) by analyzing volume spikes and price movements. Perfect for spotting institutional entries and exits.
📊 Key Features:
Volume Spike Detection - Identifies when volume exceeds average by customizable multiplier
Price Movement Analysis - Tracks significant price changes with adjustable threshold
Smart Direction Detection - Distinguishes between big buy and sell orders
Visual Markers - Clear arrows, background highlights, and detailed labels
Flexible Settings - Fully customizable parameters for different trading styles
Statistics Table - Optional real-time order count tracking
Alert System - Built-in alerts for automated notifications
⚙️ How It Works:
The indicator combines volume analysis with price movement detection to identify unusual market activity. When volume significantly exceeds the moving average AND price shows meaningful movement, it marks these as potential whale orders.
🎯 Best Used For:
Crypto markets with high volume activity
Forex pairs during major news events
Stock trading around earnings/announcements
Identifying institutional accumulation/distribution
📈 Settings Guide:
Volume Multiplier (3.0) - How many times above average volume (recommended minimum: 3.0)
Volume Period (20) - Moving average period for volume
Price Threshold (1.5%) - Minimum price change requirement
Visual Options - Toggle arrows, labels, and background highlights
💡 Trading Tips:
Use on liquid markets with consistent volume
Combine with support/resistance levels
Higher timeframes show more significant orders
Adjust sensitivity based on market volatility
⚠️ Important Notes:
Not financial advice - for educational purposes only
Past performance doesn't guarantee future results
Always use proper risk management
Test parameters on your specific markets
Perfect for swing traders, day traders, and anyone looking to spot whale activity in their favorite markets!
Swing Chart V2Indicator support Trader to see chart structure.
Youtube: CMaster System
Contact: +84 903 167 137
线-美元指数灯1️⃣ 设计目的
帮助交易者快速判断当前市场风险状态,会自动匹配当前品种数据
将宏观美元走势与主币种短期趋势结合,给出 红/橙/绿三色风险提示
2️⃣ 数据来源与逻辑
宏观因素
参考美元指数(DXY)日线涨幅
作用:美元走强 → 全球风险资产承压 → 风险增加
主币种短期趋势
EMA斜率(1小时)判断趋势方向
RSI(1小时)判断超买/超卖状态
风险评分系统
每个条件满足则计1分
分数规则:
2分及以上 → 红灯(高风险,建议暂停策略)
1分 → 橙灯(中风险,小仓谨慎)
0分 → 绿灯(低风险,可正常操作)
1️⃣ Design Purpose
Helps traders quickly assess current market risk.
Combines macro dollar trends with short-term trends of the underlying currency to generate red, orange, and green risk alerts.
2️⃣ Data Source and Logic
Macro Factors
References to the daily gains of the US Dollar Index (DXY)
Impact: A stronger US dollar → pressure on global risk assets → increased risk
Short-term trends of underlying currencies
EMA slope (1-hour) determines trend direction
RSI (1-hour) determines overbought/oversold conditions
Risk Scoring System
Each condition met is assigned 1 point.
Scoring Rules:
2 points and above = Red (High risk, recommend pausing the strategy)
1 point = Orange (Medium risk, caution with small positions)
0 points = Green (Low risk, normal operation)
Elliott Wave Rule EngineWhat this tool does
The indicator scans price for two concurrent swing structures—a Small (shorter-degree) and a Large (higher-degree) set—then applies an Elliott/NeoWave rule engine to the most recent 5-swing motive (1-2-3-4-5) or 3-swing corrective (A-B-C). It produces:
Blue lines for Small swings and Orange lines for Large swings.
A rule dashboard (optional) showing PASS/FAIL/WARN for core rules & guidelines.
Buy/Sell labels when (a) a valid motive completes and (b) loop “consensus,” alignment, and scoring gates are satisfied.
Reading the chart
Small swings: thin blue segments, built from your Small settings.
Large swings: thicker orange segments, from your Large settings.
Background tint: faint green when a motive (impulse/diagonal) is valid right now on Small.
Labels (if enabled):
“1…5” or “A-B-C” markers on the latest detected structure.
Buy/Sell label at the last pivot when all gates pass; text may include a score %.
How it works
For both Small and Large degrees the script:
- Loops over all (left, right) combinations you specify (e.g., Small Left = 3..6, Right = 0..0) and calls ta.pivothigh/low.
- Aggregates the results:
- Keeps the most extreme pivot found in the loop (highest high or lowest low) that’s newer than the last accepted swing.
- Gates acceptance by minimum % change versus the last opposite swing (inside the loop) and a post-aggregation filter (Small Minimum swing %, Large Minimum swing %).
- Merges back-to-back same-type swings (HH or LL) by keeping only the more extreme one.
- Keeps only the last N=lookbackWaves swings (default 100).
- Consensus (used for signals) comes from the loop counts:
- sBuyConsensus = small L-count / total-combos (bullish bias)
- sSellConsensus = small H-count / total-combos (bearish bias)
(and the same for Large). This is a data-driven “how many combos agreed” measure.
2) Rule engine (Impulse/Diagonal vs. Corrective)
When there are at least 6 Small swings, the engine tests 1-2-3-4-5:
Hard rules (must pass for an Impulse):
- Wave-2 not > 100% of Wave-1 (no retrace beyond start of W1).
- Wave-3 not the shortest among 1,3,5.
- Wave-4 doesn’t overlap Wave-1 (if it does, structure may be a Diagonal).
- Diagonal eligibility: Rules 1 & 2 pass but Rule 3 fails ⇒ eligible as a Diagonal (
Guidelines (7 checks, count toward a threshold you set):
- W2 retraces a Fib level (within ±fibTol).
- W4 retraces a Fib level (within ±fibTol).
- W3 strongest momentum (speed = |Δprice| / bars).
- Alternation: W2 vs W4 have meaningfully different “sharpness” (price per bar), threshold altSlopeThr.
- Proportion (Price): |W1| and |W3| within propTolP× each other.
- Proportion (Time): W1W3 and W2W4 durations within propTolT×.
- W5 weaker than W3 (momentum divergence proxy).
A Motive is valid if:
- Impulse: all 3 hard rules pass and guideline passes ≥ Min guideline passes.
- Diagonal: diagonal-eligible and guideline passes ≥ Min guideline passes.
- if motive fails, the engine still evaluates ABC as Zigzag and Flat to populate the table:
- Zigzag: B shallower than ~0.618A; C ≈ A or 1.618A (±fibTol).
- Flat: B ≥ ~0.9A; expanded flat if B > 1.0A and C in *A; “running” note if C < A.
3) Signal logic (consensus-gated & scored)
Signals fire only on new Small pivots and only if a Small motive just validated:Direction comes from the motive’s W1 (up = bull, down = bear).
Consensus checks (from the loop):
Use Sell consensus if the last pivot is a High, or Buy consensus if it’s a Low.Require it ≥ Min SMALL loop consensus and ahead of the opposite side by at least Min consensus margin.If you also require Large quality: check the corresponding Large consensus ≥ Min LARGE loop consensus.
Alignment: If Require small/large directional alignment is ON, Small and Large directions must match (or the Large motive must be complete).
Score:
- If Large not required: finalScore = smallConsensus × smallQuality.
- If Large required: finalScore = smallConsensus × smallQuality × largeQuality.
- Need finalScore ≥ Min final score.
When all gates pass, you’ll see “Buy xx%” or “Sell xx%” at the pivot.
Inputs (explained):
- Smaller Wave Swing Detection (Looped)
- Small Left Min / Max (default 3..6): ta.pivot* left widths to scan.
- Small Right Min / Max (default 0..0): right widths to scan (0 = earliest confirmation).
- Small Minimum swing % (post-aggregation) (0.3%): filters out tiny swings after the loop.
- Larger Wave Swing Detection (Looped)
- Large Left Min / Max (100..200) and Right Min/Max (0..0): higher-degree scan (defaults are big; adjust for intraday).
- Large Minimum swing % (post-aggregation) (1.5%).
- Loop Filters (inside the loop)
- Small loop min % change (0.20%): a candidate pivot counts only if move vs. last opposite Small swing ≥ this.
- Large loop min % change (1.50%): same idea for Large.
Rule Engine Tolerances
- Fibonacci tolerance (±%) (0.05 = 5%): closeness to Fib levels.
-Same-degree TIME proportion max (x) (2.00×) and PRICE proportion max (x) (3.00×).
- Alternation slope ratio threshold (0.10): higher = stricter alternation.
- Min guideline passes (0–7) (5): threshold for motive validity.
- Signal Probability (Loop Consensus)
- Min SMALL loop consensus (0.60).
- Min LARGE loop consensus (0.50) (used only if Large validation matters).
- Min consensus margin vs opposite (0.10): e.g., 0.60 vs 0.45 fails (margin 0.15 passes).
Require LARGE 1–5 valid (or diagonal) for signal (off by default).
Min final score (0.20): gate on the composite score.
Annotate label with score % (on).
WARN (orange): guideline not met—pattern can still be valid if total passes ≥ Min guideline passes.
FAQ
Q: Why did I get a diagonal instead of an impulse?
A: Wave-4 overlapped Wave-1 (Rule 3). If Rules 1 & 2 pass and guidelines meet your minimum, it’s eligible as a Diagonal.
Q: Where do Buy/Sell labels come from?
A: Only after a valid Small motive at a new pivot, and only if consensus, alignment, and final score gates pass (per your settings).
Q: It “missed” a wave in hindsight.
A: Pivots require right bars to confirm; extremely tight settings can filter that swing; adjust Small min % or ranges.
Q: Are there repaints?
A: No, It uses standard pivot confirmation; until a pivot is confirmed, recent swings can evolve. After confirmation, lines/labels are stable.
Limitations & disclaimers
Elliott/NeoWave rules are heuristics; markets are messy. Treat outputs as structured context, not certainty.
Consensus is pattern-scan agreement, not probability of profit Not investment advice; always couple with risk management.
Three-Bar Reversal/ContinuationThis indicator identifies a three-bar expansion pattern based on range and volume, designed to highlight moments when the market pushes strongly, pauses, and then resumes with confirmation.
Detection Logic
* Bar (two bars ago) must show sufficient strength, determined by the number of conditions met.
* Bar (one bar ago) must be neutral (strength = 0), marking a brief pause.
*Bar (current bar) must continue the expansion, with range and volume greater than the prior bar.
(Bar is used as a safeguard to prevent repeated detection during ongoing strong moves)
Strength Scoring
Each bar is scored 0–3 based on which of the following conditions it satisfies:
* Range exceeds a multiple of the recent average
* Volume exceeds a multiple of the recent average
* Range × volume exceeds a multiple of the recent average
The detection level input controls how many of these conditions must hold to classify a bar as “strong.” This allows tuning from permissive (1 condition) to strict (all 3 conditions).
Parameters & Utility
* length: Lookback period for moving averages of span, volume, and span×volume. Larger values smooth the averages, reducing false positives; smaller values increase sensitivity.
* coeff: Multiplicative threshold to define an unusually strong bar. Higher values reduce frequency but increase reliability.
* detectLevel: Minimum number of conditions that must be met for a bar to count as “strong.”
* showCont: Whether to allow continuation signals away from local extrema (if false, only reversals near highs/lows are considered).
* symbolUp / symbolDown: Customizable plotting symbols for bullish/bearish signals.
* showStrength: Plots tiny dots indicating the strength of each bar (1–3).
Rationale
This structure captures a recurring market motif: strong push → brief pause → renewed push, where the renewed activity is confirmed by both price expansion and volume. Using a combination of statistical thresholds (range, volume, range×volume) and price structure ensures that signals are both measurable and visually interpretable.
Usage Notes
* This setup allows traders to visually or systematically identify potential reversal or continuation points while controlling sensitivity to noise.
* Designed as a mechanical filter rather than a fully automated trading system. Signals highlight notable activity but do not dictate entry, exit, or risk management.
* Works best when combined with trend/context filters or higher-timeframe analysis.
* Adjust the parameters based on the volatility of the instrument and timeframe.
Signal Strength AnalysisTraining Guide — Signal Strength Analysis
1. What this tool is
This is an all-in-one analysis dashboard that:
• Tracks market structure (order blocks, trendlines, support/resistance).
• Reads technical indicators (RSI, MACD, Bollinger Bands).
• Measures volume, volatility, momentum, and price positioning.
• Confirms buy/sell signals with multiple filters.
• Keeps performance records (win rate, PnL, signal strength).
• Presents everything in a visual table for quick decision support.
👉 It is a learning and training tool — not a broker strategy. It helps learners practice multi-factor analysis in a structured way.
________________________________________
2. Step-by-step workflow for learners
Step 1 – Market Overview
The dashboard starts with:
• Last Price → current market close.
• Daily Change % → price vs. yesterday.
• Volume Ratio → compares today’s volume to the average.
💡 Learners can check if the market is calm, trending, or under unusual activity.
________________________________________
Step 2 – Technical Indicators
• RSI (Relative Strength Index)
o 70 = Overbought, <30 = Oversold.
o A progress bar shows strength visually.
• MACD (Moving Average Convergence Divergence)
o “Bull” if histogram > 0, “Bear” if < 0.
o Helps track momentum shifts.
• Bollinger Band Position
o Where price sits between upper & lower bands.
o 80% = Overbought zone, <20% = Oversold zone.
💡 Learners use this to spot overextended moves and potential reversals.
________________________________________
Step 3 – Order Block Analysis
• Buy OB Level / Sell OB Level
o Price zones where buyers or sellers concentrated.
• OB Status
o 🟢 Buy Active → bullish setup.
o 🔴 Sell Active → bearish setup.
o ⚪ Waiting → no clear signal.
💡 Helps students understand how institutions leave “footprints” in price zones.
________________________________________
Step 4 – Volume Analysis
• Bull Volume vs. Bear Volume
o Cumulative measurement of buy vs. sell pressure.
o Progress bars show balance.
• Volume Spike
o “🔥 High” when today’s volume is unusually strong.
💡 Shows when participation supports a move (important for validation).
________________________________________
Step 5 – Signal Strength
• A score out of 100% based on:
1. RSI extremes (overbought/oversold).
2. Volume spike confirmation.
3. MACD trend confirmation.
4. Overall EMA trend alignment.
• Win Rate → % of successful signals tracked.
• Total PnL → running performance.
💡 Learners can practice weighing multiple signals instead of relying on one indicator.
________________________________________
Step 6 – Market Conditions & Risk
• Trend Check → bullish, bearish, or neutral from EMAs.
• ATR Filter → rejects signals if volatility is too low.
• Risk Management Alerts → marks TP/SL hits for both long and short trades.
💡 This trains learners to always tie signals to risk/reward management.
________________________________________
3. How it helps learners
• Structured Thinking: Instead of chasing random indicators, they get a full framework.
• Practical Filters: Combines momentum, volume, and volatility so signals are stronger.
• Visual Reinforcement: Table sections show conditions in color-coded, easy-to-read cells.
• Performance Tracking: Builds discipline by recording wins/losses, not just entries.
• Risk Awareness: Alerts teach that managing exits is as important as finding entries.
________________________________________
4. Deep dive into dashboard sections
Section What It Teaches How Learners Use It
🔍 Market Overview Price, change %, volume context Judge if market is trending or consolidating
📈 Technical Analysis RSI, MACD, BB position Identify overbought/oversold, momentum shifts
🎯 Order Block Analysis Institutional levels Practice spotting zones where smart money acts
📊 Volume Analysis Buyer vs seller activity Confirm if move is real or weak
⚡ Signal Strength Composite score + Win Rate Learn weighting multiple signals together
🎲 Market Conditions & Risk Trend + volatility + alerts Build habit of risk-managed decisions
________________________________________
5. Suggested classroom exercises
1. Trend vs. Countertrend Study
o When OB says “Buy” but RSI shows overbought, what happens?
o Learners compare outcomes.
2. Volume Confirmation
o Log trades with & without volume spikes.
o Discuss why volume validation matters.
3. Signal Strength Calibration
o Watch how strength % changes when multiple indicators align.
o Practice “confidence ranking” before entries.
4. Risk Discipline Drill
o Focus only on TP/SL hits.
o Learners note whether following system exits improved results.
________________________________________
6. Key takeaways for learners
• No single indicator works alone — this tool forces multi-factor thinking.
• Volume and volatility filters prevent false signals.
• Performance tracking builds accountability.
• Color-coded dashboards simplify complex information.
• Alerts + risk management remind that exit discipline is vital.
________________________________________
⚠️ Important disclaimer:
This script is an educational tool only. It demonstrates how traders can combine multiple analyses into one framework. It should not be used as financial advice or a live trading strategy without testing, risk controls, and professional guidance.
________________________________________
Mean-Reversion Indicator_V2_SamleeOverview
This is the second version of my mean reversion indicator. It combines a moving average with adaptive standard deviation bands to detect when the price deviates significantly from its mean. The script provides automatic entry/exit signals, real-time PnL tracking, and shaded trade zones to make mean reversion trading more intuitive.
Core Logic
Mean benchmark: Simple Moving Average (MA).
Volatility bands: Standard deviation of the spread (close − MA) defines upper and lower bands.
Trading rules:
Price breaks below the lower band → Enter Long
Price breaks above the upper band → Enter Short
Price reverts to MA → Exit position
What’s different vs. classic Bollinger/Keltner
Bandwidth is based on the standard deviation of the price–MA spread, not raw closing prices.
Entry signals use previous-bar confirmation to reduce intrabar noise.
Exit rule is a mean-touch condition, rather than fixed profit/loss targets.
Enhanced visualization:
A shaded box dynamically shows the distance between entry and current/exit price, making it easy to see profit/loss zones over the holding period.
Instant PnL labels display current position side (Long/Short/Flat) and live profit/loss in both pips and %.
Entry and exit points are clearly marked on the chart with labels and exact prices.
These visualization tools go beyond what most indicators provide, giving traders a clearer, more practical view of trade evolution.
Key Features
Automatic detection of position status (Long / Short / Flat).
Chart labels for entries (“Entry”) and exits (“Exit”).
Real-time floating PnL calculation in both pips and %.
Info panel (top-right) showing entry price, current price, position side, and PnL.
Dynamic shading between entry and current/exit price to visualize profit/loss zones.
Usage Notes & Risk
Mean reversion may underperform in strong trending markets; parameters (len_ma, len_std, mult) should be validated per instrument and timeframe.
Works best on relatively stable, mean-reverting pairs (e.g., AUDNZD).
Risk management is essential: use independent stop-loss rules (e.g., limit risk to 1–2% of equity per trade).
This script is provided for educational purposes only and is not financial advice.
Martingale Strategy Simulator [BackQuant]Martingale Strategy Simulator
Purpose
This indicator lets you study how a martingale-style position sizing rule interacts with a simple long or short trading signal. It computes an equity curve from bar-to-bar returns, adapts position size after losing streaks, caps exposure at a user limit, and summarizes risk with portfolio metrics. An optional Monte Carlo module projects possible future equity paths from your realized daily returns.
What a martingale is
A martingale sizing rule increases stake after losses and resets after a win. In its classical form from gambling, you double the bet after each loss so that a single win recovers all prior losses plus one unit of profit. In markets there is no fixed “even-money” payout and returns are multiplicative, so an exact recovery guarantee does not exist. The core idea is unchanged:
Lose one leg → increase next position size
Lose again → increase again
Win → reset to the base size
The expectation of your strategy still depends on the signal’s edge. Sizing does not create positive expectancy on its own. A martingale raises variance and tail risk by concentrating more capital as a losing streak develops.
What it plots
Equity – simulated portfolio equity including compounding
Buy & Hold – equity from holding the chart symbol for context
Optional helpers – last trade outcome, current streak length, current allocation fraction
Optional diagnostics – daily portfolio return, rolling drawdown, metrics table
Optional Monte Carlo probability cone – p5, p16, p50, p84, p95 aggregate bands
Model assumptions
Bar-close execution with no slippage or commissions
Shorting allowed and frictionless
No margin interest, borrow fees, or position limits
No intrabar moves or gaps within a bar (returns are close-to-close)
Sizing applies to equity fraction only and is capped by your setting
All results are hypothetical and for education only.
How the simulator applies it
1) Directional signal
You pick a simple directional rule that produces +1 for long or −1 for short each bar. Options include 100 HMA slope, RSI above or below 50, EMA or SMA crosses, CCI and other oscillators, ATR move, BB basis, and more. The stance is evaluated bar by bar. When the stance flips, the current trade ends and the next one starts.
2) Sizing after losses and wins
Position size is a fraction of equity:
Initial allocation – the starting fraction, for example 0.15 means 15 percent of equity
Increase after loss – multiply the next allocation by your factor after a losing leg, for example 2.00 to double
Reset after win – return to the initial allocation
Max allocation cap – hard ceiling to prevent runaway growth
At a high level the size after k consecutive losses is
alloc(k) = min( cap , base × factor^k ) .
In practice the simulator changes size only when a leg ends and its PnL is known.
3) Equity update
Let r_t = close_t / close_{t-1} − 1 be the symbol’s bar return, d_{t−1} ∈ {+1, −1} the prior bar stance, and a_{t−1} the prior bar allocation fraction. The simulator compounds:
eq_t = eq_{t−1} × (1 + a_{t−1} × d_{t−1} × r_t) .
This is bar-based and avoids intrabar lookahead. Costs, slippage, and borrowing costs are not modeled.
Why traders experiment with martingale sizing
Mean-reversion contexts – if the signal often snaps back after a string of losses, adding size near the tail of a move can pull the average entry closer to the turn
Behavioral or microstructure edges – some rules have modest edge but frequent small whipsaws; size escalation may shorten time-to-recovery when the edge manifests
Exploration and stress testing – studying the relationship between streaks, caps, and drawdowns is instructive even if you do not deploy martingale sizing live
Why martingale is dangerous
Martingale concentrates capital when the strategy is performing worst. The main risks are structural, not cosmetic:
Loss streaks are inevitable – even with a 55 percent win rate you should expect multi-loss runs. The probability of at least one k-loss streak in N trades rises quickly with N.
Size explodes geometrically – with factor 2.0 and base 10 percent, the sequence is 10, 20, 40, 80, 100 (capped) after five losses. Without a strict cap, required size becomes infeasible.
No fixed payout – in gambling, one win at even odds resets PnL. In markets, there is no guaranteed bounce nor fixed profit multiple. Trends can extend and gaps can skip levels.
Correlation of losses – losses cluster in trends and in volatility bursts. A martingale tends to be largest just when volatility is highest.
Margin and liquidity constraints – leverage limits, margin calls, position limits, and widening spreads can force liquidation before a mean reversion occurs.
Fat tails and regime shifts – assumptions of independent, Gaussian returns can understate tail risk. Structural breaks can keep the signal wrong for much longer than expected.
The simulator exposes these dynamics in the equity curve, Max Drawdown, VaR and CVaR, and via Monte Carlo sketches of forward uncertainty.
Interpreting losing streaks with numbers
A rough intuition: if your per-trade win probability is p and loss probability is q=1−p , the chance of a specific run of k consecutive losses is q^k . Over many trades, the chance that at least one k-loss run occurs grows with the number of opportunities. As a sanity check:
If p=0.55 , then q=0.45 . A 6-loss run has probability q^6 ≈ 0.008 on any six-trade window. Across hundreds of trades, a 6 to 8-loss run is not rare.
If your size factor is 1.5 and your base is 10 percent, after 8 losses the requested size is 10% × 1.5^8 ≈ 25.6% . With factor 2.0 it would try to be 10% × 2^8 = 256% but your cap will stop it. The equity curve will still wear the compounded drawdown from the sequence that led to the cap.
This is why the cap setting is central. It does not remove tail risk, but it prevents the sizing rule from demanding impossible positions
Note: The p and q math is illustrative. In live data the win rate and distribution can drift over time, so real streaks can be longer or shorter than the simple q^k intuition suggests..
Using the simulator productively
Parameter studies
Start with conservative settings. Increase one element at a time and watch how the equity, Max Drawdown, and CVaR respond.
Initial allocation – lower base reduces volatility and drawdowns across the board
Increase factor – set modestly above 1.0 if you want the effect at all; doubling is aggressive
Max cap – the most important brake; many users keep it between 20 and 50 percent
Signal selection
Keep sizing fixed and rotate signals to see how streak patterns differ. Trend-following signals tend to produce long wrong-way streaks in choppy ranges. Mean-reversion signals do the opposite. Martingale sizing interacts very differently with each.
Diagnostics to watch
Use the built-in metrics to quantify risk:
Max Drawdown – worst peak-to-trough equity loss
Sharpe and Sortino – volatility and downside-adjusted return
VaR 95 percent and CVaR – tail risk measures from the realized distribution
Alpha and Beta – relationship to your chosen benchmark
If you would like to check out the original performance metrics script with multiple assets with a better explanation on all metrics please see
Monte Carlo exploration
When enabled, the forecast draws many synthetic paths from your realized daily returns:
Choose a horizon and a number of runs
Review the bands: p5 to p95 for a wide risk envelope; p16 to p84 for a narrower range; p50 as the median path
Use the table to read the expected return over the horizon and the tail outcomes
Remember it is a sketch based on your recent distribution, not a predictor
Concrete examples
Example A: Modest martingale
Base 10 percent, factor 1.25, cap 40 percent, RSI>50 signal. You will see small escalations on 2 to 4 loss runs and frequent resets. The equity curve usually remains smooth unless the signal enters a prolonged wrong-way regime. Max DD may rise moderately versus fixed sizing.
Example B: Aggressive martingale
Base 15 percent, factor 2.0, cap 60 percent, EMA cross signal. The curve can look stellar during favorable regimes, then a single extended streak pushes allocation to the cap, and a few more losses drive deep drawdown. CVaR and Max DD jump sharply. This is a textbook case of high tail risk.
Strengths
Bar-by-bar, transparent computation of equity from stance and size
Explicit handling of wins, losses, streaks, and caps
Portable signal inputs so you can A–B test ideas quickly
Risk diagnostics and forward uncertainty visualization in one place
Example, Rolling Max Drawdown
Limitations and important notes
Martingale sizing can escalate drawdowns rapidly. The cap limits position size but not the possibility of extended adverse runs.
No commissions, slippage, margin interest, borrow costs, or liquidity limits are modeled.
Signals are evaluated on closes. Real execution and fills will differ.
Monte Carlo assumes independent draws from your recent return distribution. Markets often have serial correlation, fat tails, and regime changes.
All results are hypothetical. Use this as an educational tool, not a production risk engine.
Practical tips
Prefer gentle factors such as 1.1 to 1.3. Doubling is usually excessive outside of toy examples.
Keep a strict cap. Many users cap between 20 and 40 percent of equity per leg.
Stress test with different start dates and subperiods. Long flat or trending regimes are where martingale weaknesses appear.
Compare to an anti-martingale (increase after wins, cut after losses) to understand the other side of the trade-off.
If you deploy sizing live, add external guardrails such as a daily loss cut, volatility filters, and a global max drawdown stop.
Settings recap
Backtest start date and initial capital
Initial allocation, increase-after-loss factor, max allocation cap
Signal source selector
Trading days per year and risk-free rate
Benchmark symbol for Alpha and Beta
UI toggles for equity, buy and hold, labels, metrics, PnL, and drawdown
Monte Carlo controls for enable, runs, horizon, and result table
Final thoughts
A martingale is not a free lunch. It is a way to tilt capital allocation toward losing streaks. If the signal has a real edge and mean reversion is common, careful and capped escalation can reduce time-to-recovery. If the signal lacks edge or regimes shift, the same rule can magnify losses at the worst possible moment. This simulator makes those trade-offs visible so you can calibrate parameters, understand tail risk, and decide whether the approach belongs anywhere in your research workflow.
How to Reposition A Table CellOVERVIEW
Using table functions in Pine Script is one of the most effective methods for reporting and interpreting data in a readable manner. However, the built-in capabilities for dynamically repositioning table location are limited. To extend these limitations, a small intervention to the script may be required. This indicator exemplifies how such intervention can be modeled.
CONCEPTS
This indicator provides comprehensive control over table positioning through several user-defined parameters that work together to create flexible display options.
Text Parameters : These five string inputs allow users to define the content displayed in the table. Each parameter accepts custom text that will be displayed as separate rows within the table cell. (The relevant parameters are designed as examples. When implementing the code into your own scripts, you can use series string variables instead of the those inputs.)
Horizontal Offset : This integer parameter controls the horizontal positioning of the table content. Negative values shift the table content to the left, while positive values move it to the right. The offset is multiplied by a spacing factor (currently set to 4) to provide more noticeable movement. This parameter is particularly useful when you need to avoid overlapping with other chart elements or align multiple indicators.
Vertical Offset : This integer parameter manages the vertical positioning by adding line breaks above or below the content. Negative values push the content downward by adding line breaks at the beginning, while positive values elevate the content by adding line breaks at the end. This creates effective vertical spacing without affecting the table's base position.
Table Position : This parameter accepts values from 1 to 9, corresponding to the standard TradingView table positions arranged in a 3x3 grid format (1-3: top row, 4-6: middle row, 7-9: bottom row). This serves as the base positioning before any offset adjustments are applied, providing users with familiar reference points for initial placement.
FUNCTION
The core functionality centers on the custom f_position() function, which processes text positioning based on horizontal and vertical offset values. For vertical positioning, it adds line breaks before or after content depending on the offset direction. For horizontal positioning, it splits the text by rows and adds calculated spaces to each row, maintaining proper alignment across multi-line content. The spacing uses a fixed multiplier of 4, providing good balance between precision and visible movement.
ORIGINALITY & NOTES
Tihs indicator,
introduces a novel approach to table positioning that goes beyond TradingView's standard 9-position limitation by implementing custom offset calculations that allow pixel-level control over table placement.
serves as an educational resource, demonstrating advanced Pine Script techniques for UI manipulation that can be adapted for various custom indicator developments.
is particularly valuable for developers creating complex dashboard layouts or educational materials where precise positioning is crucial. The modular design of the positioning function makes it easily adaptable for other projects requiring similar functionality.
I hope it helps everyone, Always combine with risk management principles and market context awareness. I hope it helps everyone. Trade as safely as possible. Best of luck!
Live Market - Performance MonitorLive Market — Performance Monitor
Study material (no code) — step-by-step training guide for learners
________________________________________
1) What this tool is — short overview
This indicator is a live market performance monitor designed for learning. It scans price, volume and volatility, detects order blocks and trendline events, applies filters (volume & ATR), generates trade signals (BUY/SELL), creates simple TP/SL trade management, and renders a compact dashboard summarizing market state, risk and performance metrics.
Use it to learn how multi-factor signals are constructed, how Greeks-style sensitivity is replaced by volatility/ATR reasoning, and how a live dashboard helps monitor trade quality.
________________________________________
2) Quick start — how a learner uses it (step-by-step)
1. Add the indicator to a chart (any ticker / timeframe).
2. Open inputs and review the main groups: Order Block, Trendline, Signal Filters, Display.
3. Start with defaults (OB periods ≈ 7, ATR multiplier 0.5, volume threshold 1.2) and observe the dashboard on the last bar.
4. Walk the chart back in time (use the last-bar update behavior) and watch how signals, order blocks, trendlines, and the performance counters change.
5. Run the hands-on labs below to build intuition.
________________________________________
3) Main configurable inputs (what you can tweak)
• Order Block Relevant Periods (default ~7): number of consecutive candles used to define an order block.
• Min. Percent Move for Valid OB (threshold): minimum percent move required for a valid order block.
• Number of OB Channels: how many past order block lines to keep visible.
• Trendline Period (tl_period): pivot lookback for detecting highs/lows used to draw trendlines.
• Use Wicks for Trendlines: whether pivot uses wicks or body.
• Extension Bars: how far trendlines are projected forward.
• Use Volume Filter + Volume Threshold Multiplier (e.g., 1.2): requires volume to be greater than multiplier × average volume.
• Use ATR Filter + ATR Multiplier: require bar range > ATR × multiplier to filter noise.
• Show Targets / Table settings / Colors for visualization.
________________________________________
4) Core building blocks — what the script computes (plain language)
Price & trend:
• Spot / LTP: current close price.
• EMA 9 / 21 / 50: fast, medium, slow moving averages to define short/medium trend.
o trend_bullish: EMA9 > EMA21 > EMA50
o trend_bearish: EMA9 < EMA21 < EMA50
o trend_neutral: otherwise
Volatility & noise:
• ATR (14): average true range used for dynamic target and filter sizing.
• dynamic_zone = ATR × atr_multiplier: minimum bar range required for meaningful move.
• Annualized volatility: stdev of price changes × sqrt(252) × 100 — used to classify volatility (HIGH/MEDIUM/LOW).
Momentum & oscillators:
• RSI 14: overbought/oversold indicator (thresholds 70/30).
• MACD: EMA(12)-EMA(26) and a 9-period signal line; histogram used for momentum direction and strength.
• Momentum (ta.mom 10): raw momentum over 10 bars.
Mean reversion / band context:
• Bollinger Bands (20, 2σ): upper, mid, lower.
o price_position measures where price sits inside the band range as 0–100.
Volume metrics:
• avg_volume = SMA(volume, 20) and volume_spike = volume > avg_volume × volume_threshold
o volume_ratio = volume / avg_volume
Support & Resistance:
• support_level = lowest low over 20 bars
• resistance_level = highest high over 20 bars
• current_position = percent of price between support & resistance (0–100)
________________________________________
5) Order Block detection — concept & logic
What it tries to find: a bar (the base) followed by N candles in the opposite direction (a classical order block setup), with a minimum % move to qualify. The script records the high/low of the base candle, averages them, and plots those levels as OB channels.
How learners should think about it (conceptual):
1. An order block is a signature area where institutions (theory) left liquidity — often seen as a large bar followed by a sequence of directional candles.
2. This indicator uses a configurable number of subsequent candles to confirm that the pattern exists.
3. When found, it stores and displays the base candle’s high/low area so students can see how price later reacts to those zones.
Implementation note for learners: the tool keeps a limited history of OB lines (ob_channels). When new OBs exceed the count, the oldest lines are removed — good practice to avoid clutter.
________________________________________
6) Trendline detection — idea & interpretation
• The script finds pivot highs and lows using a symmetric lookback (tl_period and half that as right/left).
• It then computes a trendline slope from successive pivots and projects the line forward (extension_bars).
• Break detection: Resistance break = close crosses above the projected resistance line; Support break = close crosses below projected support.
Learning tip: trendlines here are computed from pivot points and time. Watch how changing tl_period (bigger = smoother, fewer pivots) alters the trendlines and break signals.
________________________________________
7) Signal generation & filters — step-by-step
1. Primary triggers:
o Bullish trigger: order block bullish OR resistance trendline break.
o Bearish trigger: bearish order block OR support trendline break.
2. Filters applied (both must pass unless disabled):
o Volume filter: volume must be > avg_volume × volume_threshold.
o ATR filter: bar range (high-low) must exceed ATR × atr_multiplier.
o Not in an existing trade: new trades only start if trade_active is false.
3. Trend confirmation:
o The primary trigger is only confirmed if trend is bullish/neutral for buys or bearish/neutral for sells (EMA alignment).
4. Result:
o When confirmed, a long or short trade is activated with TP/SL calculated from ATR multiples.
________________________________________
8) Trade management — what the tool does after a signal
• Entry management: the script marks a trade as trade_active and sets long_trade or short_trade flags.
• TP & SL rules:
o Long: TP = high + 2×ATR ; SL = low − 1×ATR
o Short: TP = low − 2×ATR ; SL = high + 1×ATR
• Monitoring & exit:
o A trade closes when price reaches TP or SL.
o When TP/SL hit, the indicator updates win_count and total_pnl using a very simple calculation (difference between TP/SL and previous close).
o Visual lines/labels are drawn for TP and updated as the trade runs.
Important learner notes:
• The script does not store a true entry price (it uses close in its P&L math), so PnL is an approximation — treat this as a learning proxy, not a position accounting system.
• There’s no sizing, slippage, or fee accounted — students must manually factor these when translating to real trades.
• This indicator is not a backtesting strategy; strategy.* functions would be needed for rigorous backtest results.
________________________________________
9) Signal strength & helper utilities
• Signal strength is a composite score (0–100) made up of four signals worth 25 points each:
1. RSI extreme (overbought/oversold) → 25
2. Volume spike → 25
3. MACD histogram magnitude increasing → 25
4. Trend existence (bull or bear) → 25
• Progress bars (text glyphs) are used to visually show RSI and signal strength on the table.
Learning point: composite scoring is a way to combine orthogonal signals — study how changing weights changes outcomes.
________________________________________
10) Dashboard — how to read each section (walkthrough)
The dashboard is split into sections; here's how to interpret them:
1. Market Overview
o LTP / Change%: immediate price & daily % change.
2. RSI & MACD
o RSI value plus progress bar (overbought 70 / oversold 30).
o MACD histogram sign indicates bullish/bearish momentum.
3. Volume Analysis
o Volume ratio (current / average) and whether there’s a spike.
4. Order Block Status
o Buy OB / Sell OB: the average base price of detected order blocks or “No Signal.”
5. Signal Status
o 🔼 BUY or 🔽 SELL if confirmed, or ⚪ WAIT.
o No-trade vs Active indicator summarizing market readiness.
6. Trend Analysis
o Trend direction (from EMAs), market sentiment score (composite), volatility level and band/position metrics.
7. Performance
o Win Rate = wins / signals (percentage)
o Total PnL = cumulative PnL (approximate)
o Bull / Bear Volume = accumulated volumes attributable to signals
8. Support & Resistance
o 20-bar highest/lowest — use as nearby reference points.
9. Risk & R:R
o Risk Level from ATR/price as a percent.
o R:R Ratio computed from TP/SL if a trade is active.
10. Signal Strength & Active Trade Status
• Numeric strength + progress bar and whether a trade is currently active with TP/SL display.
________________________________________
11) Alerts — what will notify you
The indicator includes pre-built alert triggers for:
• Bullish confirmed signal
• Bearish confirmed signal
• TP hit (long/short)
• SL hit (long/short)
• No-trade zone
• High signal strength (score > 75%)
Training use: enable alerts during a replay session to be notified when the indicator would have signalled.
________________________________________
12) Labs — hands-on exercises for learners (step-by-step)
Lab A — Order Block recognition
1. Pick a 15–30 minute timeframe on a liquid ticker.
2. Use default OB periods (7). Mark each time the dashboard shows a Buy/Sell OB.
3. Manually inspect the chart at the base candle and the following sequence — draw the OB zone by hand and watch later price reactions to it.
4. Repeat with OB periods 5 and 10; note stability vs noise.
Lab B — Trendline break confirmation
1. Increase trendline period (e.g., 20), watch trendlines form from pivots.
2. When a resistance break is flagged, compare with MACD & volume: was momentum aligned?
3. Note false breaks vs confirmed moves — change extension_bars to see projection effects.
Lab C — Filter sensitivity
1. Toggle Use Volume Filter off, and record the number and quality of signals in a 2-day window.
2. Re-enable volume filter and change threshold from 1.2 → 1.6; note how many low-quality signals are filtered out.
Lab D — Trade management simulation
1. For each signalled trade, record the time, close entry approximation, TP, SL, and eventual hit/miss.
2. Compute actual PnL if you had entered at the open of the next bar to compare with the script’s PnL math.
3. Tabulate win rate and average R:R.
Lab E — Performance review & improvement
1. Build a spreadsheet of signals over 30–90 periods with columns: Date, Signal type, Entry price (real), TP, SL, Exit, PnL, Notes.
2. Analyze which filters or indicators contributed most to winners vs losers and adjust weights.
________________________________________
13) Common pitfalls, assumptions & implementation notes (things to watch)
• P&L simplification: total_pnl uses close as a proxy entry price. Real entry/exit prices and slippage are not recorded — so PnL is approximate.
• No position sizing or money management: the script doesn’t compute position size from equity or risk percent.
• Signal confirmation logic: composite "signal_strength" is a simple 4×25 point scheme — explore different weights or additional signals.
• Order block detection nuance: the script defines the base candle and checks the subsequent sequence. Be sure to verify whether the intended candle direction (base being bullish vs bearish) aligns with academic/your trading definition — read the code carefully and test.
• Trendline slope over time: slope is computed using timestamps; small differences may make lines sensitive on very short timeframes — using bar_index differences is usually more stable.
• Not a true backtester: to evaluate performance statistically you must transform the logic into a strategy script that places hypothetical orders and records exact entry/exit prices.
________________________________________
14) Suggested improvements for advanced learners
• Record true entry price & timestamp for accurate PnL.
• Add position sizing: risk % per trade using SL distance and account size.
• Convert to strategy. (Pine Strategy)* to run formal backtests with equity curves, drawdowns, and metrics (Sharpe, Sortino).
• Log trades to an external spreadsheet (via alerts + webhook) for offline analysis.
• Add statistics: average win/loss, expectancy, max drawdown.
• Add additional filters: news time blackout, market session filters, multi-timeframe confirmation.
• Improve OB detection: combine wick/body, volume spike at base bar, and liquidity sweep detection.
________________________________________
15) Glossary — quick definitions
• ATR (Average True Range): measure of typical range; used to size targets and stops.
• EMA (Exponential Moving Average): trend smoothing giving more weight to recent prices.
• RSI (Relative Strength Index): momentum oscillator; >70 overbought, <30 oversold.
• MACD: momentum oscillator using difference of two EMAs.
• Bollinger Bands: volatility bands around SMA.
• Order Block: a base candle area with subsequent confirmation candles; a zone of institutional interest (learning model).
• Pivot High/Low: local turning point defined by candles on both sides.
• Signal Strength: combined score from multiple indicators.
• Win Rate: proportion of signals that hit TP vs total signals.
• R:R (Risk:Reward): ratio of potential reward (TP distance) to risk (entry to SL).
________________________________________
16) Limitations & assumptions (be explicit)
• This is an indicator for learning — not a trading robot or broker connection.
• No slippage, fees, commissions or tie-in to real orders are considered.
• The logic is heuristic (rule-of-thumb), not a guarantee of performance.
• Results are sensitive to timeframe, market liquidity, and parameter choices.
________________________________________
17) Practical classroom / study plan (4 sessions)
• Session 1 — Foundations: Understand EMAs, ATR, RSI, MACD, Bollinger Bands. Run the indicator and watch how these numbers change on a single day.
• Session 2 — Zones & Filters: Study order blocks and trendlines. Test volume & ATR filters and note changes in false signals.
• Session 3 — Simulated trading: Manually track 20 signals, compute real PnL and compare to the dashboard.
• Session 4 — Improvement plan: Propose changes (e.g., better PnL accounting, alternative OB rule) and test their impact.
________________________________________
18) Quick reference checklist for each signal
1. Was an order block or trendline break detected? (primary trigger)
2. Did volume meet threshold? (filter)
3. Did ATR filter (bar size) show a real move? (filter)
4. Was trend aligned (EMA 9/21/50)? (confirmation)
5. Signal confirmed → mark entry approximation, TP, SL.
6. Monitor dashboard (Signal Strength, Volatility, No-trade zone, R:R).
7. After exit, log real entry/exit, compute actual PnL, update spreadsheet.
________________________________________
19) Educational caveat & final note
This tool is built for training and analysis: it helps you see how common technical building blocks combine into trade ideas, but it is not a trading recommendation. Use it to develop judgment, to test hypotheses, and to design robust systems with proper backtesting and risk control before risking capital.
________________________________________
20) Disclaimer (must include)
Training & Educational Only — This material and the indicator are provided for educational purposes only. Nothing here is investment advice or a solicitation to buy or sell financial instruments. Past simulated or historical performance does not predict future results. Always perform full backtesting and risk management, and consider seeking advice from a qualified financial professional before trading with real capital.
________________________________________
Ultra Degen Indicator🚨 Ultra Degen Indicator 🚨
Ready to YOLO your way to the moon or get rekt trying?
The Ultra Degen Indicator is your ultimate co-pilot for navigating the wild world of crypto. This isn't your grandpa's boring, slow-moving indicator. This is pure, unadulterated degen energy, designed to help you catch pumps and dump your bags before it's too late.
We've turbocharged the classic Supertrend by adding a high-octane RSI filter. This means no more waiting for slow signals. We're getting in early and getting out fast.
What's under the hood?
Supercharged Supertrend: A lean, mean, trend-following machine that cuts through the noise to tell you whether to long or short.
RSI Momentum Filter: The secret sauce! We use RSI to confirm that the momentum is in your favor. No more buying on weak bounces or selling into strong pumps. If the Supertrend flashes a buy signal, the RSI checks for bullish momentum. If the RSI isn't feeling it, we sit on our hands and wait for a better entry.
Multi-Timeframe (MTF) Support: Want to catch a quick scalp but trade with the big boys' trend? No problem. The Ultra Degen Indicator lets you set a higher timeframe to filter your trades, so you can snipe entries on the 5-minute chart while staying aligned with the daily trend. This is how you avoid getting rekt by a whale.
This indicator is for the true degen who understands that sometimes, you just gotta ape in. Use it wisely, have fun, and may your portfolio never see a red candle again.
DYOR. NFA. LFG. 🚀
FREE Camel-Style Cycle Projector V2This indicator helps visualize repeating market cycles by detecting pivot lows and projecting when the next cycle low may occur.
How it works
• Pivot detection: Uses left/right bars to confirm swing lows. Filters are included (minimum % move and optional ATR separation) so only significant lows are counted.
• Cycle averaging: The script records the time between past pivot lows. It then calculates the average (and standard deviation) of the last N intervals.
• Projection: A future “Cycle Low ETA” is calculated as:
last pivot low time + average interval.
If that projection is already in the past, the script rolls forward by whole average intervals until it lies strictly in the future.
• Time window: Around the ETA, a shaded projection window is drawn. Traders can choose whether this is based on a multiple of the standard deviation or a percentage of the average.
• Visualization:
• Vertical line = projected cycle low.
• Shaded box = timing window.
• Label = humanized countdown (weeks/days/hours/minutes).
• HUD = status, ETA info, number of intervals used.
• Optional “Camel row” under the chart (triangle • W • 🐪 • cycle length in weeks) to make cycles easier to spot at a glance.
How to use
• Select your timeframe (works on intraday and higher).
• Allow pivots to accumulate; once the HUD shows Status: OK, the script begins projecting cycle lows.
• Use the ETA line and window as context: they do not provide direct buy/sell signals, but rather help estimate when the market is statistically more likely to form a new cycle low.
• Best used together with price structure, liquidity levels, support/resistance, and your own trading strategy.
Notes
• Works with any market supported on TradingView (crypto, stocks, forex, indices).
• Filters can be tuned to reduce noise:
• Increase % move or ATR multiplier to focus on larger, more meaningful lows.
• This tool is designed for cycle timing analysis only. It does not predict exact prices or guarantee market outcomes
Natal & Transit Planetary Aspect Table📐 Natal & Transit Planetary Aspect Table
This open-source TradingView indicator displays a customizable table of astrological aspects between natal (first trade or custom date) planetary positions and current/live transits. Built in Pine Script v6, it leverages the AstroLib library for accurate geocentric or heliocentric longitude calculations, supporting a range of financial assets and historical events. Ideal for astro-finance enthusiasts, it highlights major and minor aspects with orbs, applying/separating status, and color-coded visuals. Supports 10 planetary bodies in geocentric mode (Sun, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto) or 11 in heliocentric mode (adds Earth).
Why Use This Indicator?
Astrology offers a unique lens for market analysis by examining planetary alignments relative to an asset's "birth" date (e.g., first trade), potentially revealing cycles, trends, and timing insights that complement technical and fundamental strategies. This tool empowers traders to integrate astro-finance principles, visualizing cosmic influences that may correlate with price movements, reversals, or volatility—backed by historical presets and customizable options for personalized research.
Key Features:
- 23 preset natal dates for assets like BTC, ETH, NYSE, and more (e.g., BTC genesis block on 2009-01-03), with credits to Susan Abbott Gidel for most of the first trade dates from her book " Trading In Sync With Commodities: Introducing Astrology To Your Technical Toolbox ."
- Manual natal and transit timestamp inputs for flexibility.
- Supports geocentric (default) or heliocentric views (displayed as 𝒢 or ℋ in the table), with adjustable observer location (latitude, longitude, timezone).
- Configurable aspects: Conjunction (☌), Opposition (☍), Trine (△), Square (□), Sextile (⚹), and minors like Semi-Sextile (⚺), Quincunx (⚻), etc., with user-defined orbs and colors.
- Applying (a) or separating (s) status is determined by comparing the orb on the current bar to the previous one—if decreasing, applying; if increasing, separating. This simplified approach may differ from traditional astrological methods that consider planetary speeds, directions (direct/retrograde), and which body is faster/slower.
- Table displays planet symbols or names, degrees/signs with tooltips showing exact longitude (e.g., hovering over a planet symbol reveals its precise degree), and aspect symbols/tags (e.g., ⚹a for applying sextile).
- Tooltip on the dates cell to view the exact transit and natal dates for easy tracking.
- Live mode updates with chart timeframe; test mode allows the user to move the transit date historically or to the future via a custom timestamp.
- Customizable table position, text size, colors, and visibility.
How to Use:
1. Add the indicator to your TradingView chart.
2. Select a preset or manual natal date in settings.
3. Choose live transits or test mode with a custom timestamp.
4. Enable/disable aspects and adjust orbs/colors as needed.
5. Hover over cells for detailed tooltips (e.g., exact orb and applying/separating status).
Powered by @BarefootJoey AstroLib for ephemeris data. For best accuracy, verify positions against external sources.
Smart Market Structure🔹 What it does:
Detects swing highs & lows automatically
Marks Break of Structure (BOS) and Market Structure Shifts (MSS) in real time
Plots Order Blocks and auto-removes them if invalidated
Colors candles by market structure bias (bullish / bearish)
Comes with a built-in Dashboard showing:
Last BOS & MSS direction
Current trend bias
Swings since last MSS
Active Bullish/Bearish OB count
A Trend Strength Meter to gauge momentum
🔹 Goal:
To give traders a clearer picture of price action, so instead of staring at raw candles and second-guessing, you get structure + context instantly.
Source: www.reddit.com
X-Scalp by LogicatX-Scalp by Logicat — Clean-Range MTF Scalper
Turn noisy intraday action into clear, actionable scalps. X-Scalp builds “Clean Range” zones only when three timeframes agree (default: M30/M15/M5), then waits for a single, high-quality M5 confirmation to print a BUY/SELL label. It’s fast, simple, and ruthlessly focused on precision.
What it does
Clean Range zones: Drawn from the last completed M30 candle only when M30/M15/M5 align (all green or all red).
Size filter (pips): Ignore tiny, low-value ranges with a configurable minimum height (auto-pip detection included).
Extend-until-mitigated: Zones stretch right and “freeze” on first mitigation (close inside or close beyond, your choice). Optional fade when mitigated.
Laser M5 entries (one per box):
Red M5 bar inside a green zone → SELL
Green M5 bar inside a red zone → BUY
Prints once per zone on the closed M5 candle—no spam.
Quality of life: Keep latest N zones, customizable colors, optional H4 reference lines, alert conditions for both zone creation and entries.
Why traders love it
Clarity: Filters chop; you see only aligned zones and one clean trigger.
Speed: Designed for scalpers on FX, XAU/USD, indices, and more.
Control: Tune lookback, pip threshold, mitigation logic, and visuals to fit your playbook.
Tips
Use on liquid sessions for best results.
Combine with your risk model (fixed R, partials at mid/edge, etc.).
Backtest different pip filters per symbol.
Disclaimer: No indicator guarantees profits. Trade responsibly and manage risk.