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.
อินดิเคเตอร์และกลยุทธ์
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
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.
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.
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
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.
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!
线-美元指数灯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)
Swing Chart V2Indicator support Trader to see chart structure.
Youtube: CMaster System
Contact: +84 903 167 137
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
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.
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.
________________________________________
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.
________________________________________
PnL Bubble [%] | Fractalyst1. What's the indicator purpose?
The PnL Bubble indicator transforms your strategy's trade PnL percentages into an interactive bubble chart with professional-grade statistics and performance analytics. It helps traders quickly assess system profitability, understand win/loss distribution patterns, identify outliers, and make data-driven strategy improvements.
How does it work?
Think of this indicator as a visual report card for your trading performance. Here's what it does:
What You See
Colorful Bubbles: Each bubble represents one of your trades
Blue/Cyan bubbles = Winning trades (you made money)
Red bubbles = Losing trades (you lost money)
Bigger bubbles = Bigger wins or losses
Smaller bubbles = Smaller wins or losses
How It Organizes Your Trades:
Like a Photo Album: Instead of showing all your trades at once (which would be messy), it shows them in "pages" of 500 trades each:
Page 1: Your first 500 trades
Page 2: Trades 501-1000
Page 3: Trades 1001-1500, etc.
What the Numbers Tell You:
Average Win: How much money you typically make on winning trades
Average Loss: How much money you typically lose on losing trades
Expected Value (EV): Whether your trading system makes money over time
Positive EV = Your system is profitable long-term
Negative EV = Your system loses money long-term
Payoff Ratio (R): How your average win compares to your average loss
R > 1 = Your wins are bigger than your losses
R < 1 = Your losses are bigger than your wins
Why This Matters:
At a Glance: You can instantly see if you're a profitable trader or not
Pattern Recognition: Spot if you have more big wins than big losses
Performance Tracking: Watch how your trading improves over time
Realistic Expectations: Understand what "average" performance looks like for your system
The Cool Visual Effects:
Animation: The bubbles glow and shimmer to make the chart more engaging
Highlighting: Your biggest wins and losses get extra attention with special effects
Tooltips: hover any bubble to see details about that specific trade.
What are the underlying calculations?
The indicator processes trade PnL data using a dual-matrix architecture for optimal performance:
Dual-Matrix System:
• Display Matrix (display_matrix): Bounded to 500 trades for rendering performance
• Statistics Matrix (stats_matrix): Unbounded storage for complete statistical accuracy
Trade Classification & Aggregation:
// Separate wins, losses, and break-even trades
if val > 0.0
pos_sum += val // Sum winning trades
pos_count += 1 // Count winning trades
else if val < 0.0
neg_sum += val // Sum losing trades
neg_count += 1 // Count losing trades
else
zero_count += 1 // Count break-even trades
Statistical Averages:
avg_win = pos_count > 0 ? pos_sum / pos_count : na
avg_loss = neg_count > 0 ? math.abs(neg_sum) / neg_count : na
Win/Loss Rates:
total_obs = pos_count + neg_count + zero_count
win_rate = pos_count / total_obs
loss_rate = neg_count / total_obs
Expected Value (EV):
ev_value = (avg_win × win_rate) - (avg_loss × loss_rate)
Payoff Ratio (R):
R = avg_win ÷ |avg_loss|
Contribution Analysis:
ev_pos_contrib = avg_win × win_rate // Positive EV contribution
ev_neg_contrib = avg_loss × loss_rate // Negative EV contribution
How to integrate with any trading strategy?
Equity Change Tracking Method:
//@version=6
strategy("Your Strategy with Equity Change Export", overlay=true)
float prev_trade_equity = na
float equity_change_pct = na
if barstate.isconfirmed and na(prev_trade_equity)
prev_trade_equity := strategy.equity
trade_just_closed = strategy.closedtrades != strategy.closedtrades
if trade_just_closed and not na(prev_trade_equity)
current_equity = strategy.equity
equity_change_pct := ((current_equity - prev_trade_equity) / prev_trade_equity) * 100
prev_trade_equity := current_equity
else
equity_change_pct := na
plot(equity_change_pct, "Equity Change %", display=display.data_window)
Integration Steps:
1. Add equity tracking code to your strategy
2. Load both strategy and PnL Bubble indicator on the same chart
3. In bubble indicator settings, select your strategy's equity tracking output as data source
4. Configure visualization preferences (colors, effects, page navigation)
How does the pagination system work?
The indicator uses an intelligent pagination system to handle large trade datasets efficiently:
Page Organization:
• Page 1: Trades 1-500 (most recent)
• Page 2: Trades 501-1000
• Page 3: Trades 1001-1500
• Page N: Trades to
Example: With 1,500 trades total (3 pages available):
• User selects Page 1: Shows trades 1-500
• User selects Page 4: Automatically falls back to Page 3 (trades 1001-1500)
5. Understanding the Visual Elements
Bubble Visualization:
• Color Coding: Cyan/blue gradients for wins, red gradients for losses
• Size Mapping: Bubble size proportional to trade magnitude (larger = bigger P&L)
• Priority Rendering: Largest trades displayed first to ensure visibility
• Gradient Effects: Color intensity increases with trade magnitude within each category
Interactive Tooltips:
Each bubble displays quantitative trade information:
tooltip_text = outcome + " | PnL: " + pnl_str +
" Date: " + date_str + " " + time_str +
" Trade #" + str.tostring(trade_number) + " (Page " + str.tostring(active_page) + ")" +
" Rank: " + str.tostring(rank) + " of " + str.tostring(n_display_rows) +
" Percentile: " + str.tostring(percentile, "#.#") + "%" +
" Magnitude: " + str.tostring(magnitude_pct, "#.#") + "%"
Example Tooltip:
Win | PnL: +2.45%
Date: 2024.03.15 14:30
Trade #1,247 (Page 3)
Rank: 5 of 347
Percentile: 98.6%
Magnitude: 85.2%
Reference Lines & Statistics:
• Average Win Line: Horizontal reference showing typical winning trade size
• Average Loss Line: Horizontal reference showing typical losing trade size
• Zero Line: Threshold separating wins from losses
• Statistical Labels: EV, R-Ratio, and contribution analysis displayed on chart
What do the statistical metrics mean?
Expected Value (EV):
Represents the mathematical expectation per trade in percentage terms
EV = (Average Win × Win Rate) - (Average Loss × Loss Rate)
Interpretation:
• EV > 0: Profitable system with positive mathematical expectation
• EV = 0: Break-even system, profitability depends on execution
• EV < 0: Unprofitable system with negative mathematical expectation
Example: EV = +0.34% means you expect +0.34% profit per trade on average
Payoff Ratio (R):
Quantifies the risk-reward relationship of your trading system
R = Average Win ÷ |Average Loss|
Interpretation:
• R > 1.0: Wins are larger than losses on average (favorable risk-reward)
• R = 1.0: Wins and losses are equal in magnitude
• R < 1.0: Losses are larger than wins on average (unfavorable risk-reward)
Example: R = 1.5 means your average win is 50% larger than your average loss
Contribution Analysis (Σ):
Breaks down the components of expected value
Positive Contribution (Σ+) = Average Win × Win Rate
Negative Contribution (Σ-) = Average Loss × Loss Rate
Purpose:
• Shows how much wins contribute to overall expectancy
• Shows how much losses detract from overall expectancy
• Net EV = Σ+ - Σ- (Expected Value per trade)
Example: Σ+: 1.23% means wins contribute +1.23% to expectancy
Example: Σ-: -0.89% means losses drag expectancy by -0.89%
Win/Loss Rates:
Win Rate = Count(Wins) ÷ Total Trades
Loss Rate = Count(Losses) ÷ Total Trades
Shows the probability of winning vs losing trades
Higher win rates don't guarantee profitability if average losses exceed average wins
7. Demo Mode & Synthetic Data Generation
When using built-in sources (close, open, etc.), the indicator generates realistic demo trades for testing:
if isBuiltInSource(source_data)
// Generate random trade outcomes with realistic distribution
u_sign = prand(float(time), float(bar_index))
if u_sign < 0.5
v_push := -1.0 // Loss trade
else
// Skewed distribution favoring smaller wins (realistic)
u_mag = prand(float(time) + 9876.543, float(bar_index) + 321.0)
k = 8.0 // Skewness factor
t = math.pow(u_mag, k)
v_push := 2.5 + t * 8.0 // Win trade
Demo Characteristics:
• Realistic win/loss distribution mimicking actual trading patterns
• Skewed distribution favoring smaller wins over large wins
• Deterministic randomness for consistent demo results
• Includes jitter effects to prevent visual overlap
8. Performance Limitations & Optimizations
Display Constraints:
points_count = 500 // Maximum 500 dots per page for optimal performance
Pine Script v6 Limits:
• Label Count: Maximum 500 labels per indicator
• Line Count: Maximum 100 lines per indicator
• Box Count: Maximum 50 boxes per indicator
• Matrix Size: Efficient memory management with dual-matrix system
Optimization Strategies:
• Pagination System: Handle unlimited trades through 500-trade pages
• Priority Rendering: Largest trades displayed first for maximum visibility
• Dual-Matrix Architecture: Separate display (bounded) from statistics (unbounded)
• Smart Fallback: Automatic page clamping prevents empty displays
Impact & Workarounds:
• Visual Limitation: Only 500 trades visible per page
• Statistical Accuracy: Complete dataset used for all calculations
• Navigation: Use page input to browse through entire trade history
• Performance: Smooth operation even with thousands of trades
9. Statistical Accuracy Guarantees
Data Integrity:
• Complete Dataset: Statistics matrix stores ALL trades without limit
• Proper Aggregation: Separate tracking of wins, losses, and break-even trades
• Mathematical Precision: Pine Script v6's enhanced floating-point calculations
• Dual-Matrix System: Display limitations don't affect statistical accuracy
Calculation Validation:
// Verified formulas match standard trading mathematics
avg_win = pos_sum / pos_count // Standard average calculation
win_rate = pos_count / total_obs // Standard probability calculation
ev_value = (avg_win * win_rate) - (avg_loss * loss_rate) // Standard EV formula
Accuracy Features:
• Mathematical Correctness: Formulas follow established trading statistics
• Data Preservation: Complete dataset maintained for all calculations
• Precision Handling: Proper rounding and boundary condition management
• Real-Time Updates: Statistics recalculated on every new trade
10. Advanced Technical Features
Real-Time Animation Engine:
// Shimmer effects with sine wave modulation
offset = math.sin(shimmer_t + phase) * amp
// Dynamic transparency with organic flicker
new_transp = math.min(flicker_limit, math.max(-flicker_limit, cur_transp + dir * flicker_step))
• Sine Wave Shimmer: Dynamic glowing effects on bubbles
• Organic Flicker: Random transparency variations for natural feel
• Extreme Value Highlighting: Special visual treatment for outliers
• Smooth Animations: Tick-based updates for fluid motion
Magnitude-Based Priority Rendering:
// Sort trades by magnitude for optimal visual hierarchy
sort_indices_by_magnitude(values_mat)
• Largest First: Most important trades always visible
• Intelligent Sorting: Custom bubble sort algorithm for trade prioritization
• Performance Optimized: Efficient sorting for real-time updates
• Visual Hierarchy: Ensures critical trades never get hidden
Professional Tooltip System:
• Quantitative Data: Pure numerical information without interpretative language
• Contextual Ranking: Shows trade position within page dataset
• Percentile Analysis: Performance ranking as percentage
• Magnitude Scaling: Relative size compared to page maximum
• Professional Format: Clean, data-focused presentation
11. Quick Start Guide
Step 1: Add Indicator
• Search for "PnL Bubble | Fractalyst" in TradingView indicators
• Add to your chart (works on any timeframe)
Step 2: Configure Data Source
• Demo Mode: Leave source as "close" to see synthetic trading data
• Strategy Mode: Select your strategy's PnL% output as data source
Step 3: Customize Visualization
• Colors: Set positive (cyan), negative (red), and neutral colors
• Page Navigation: Use "Trade Page" input to browse trade history
• Visual Effects: Built-in shimmer and animation effects are enabled by default
Step 4: Analyze Performance
• Study bubble patterns for win/loss distribution
• Review statistical metrics: EV, R-Ratio, Win Rate
• Use tooltips for detailed trade analysis
• Navigate pages to explore full trade history
Step 5: Optimize Strategy
• Identify outlier trades (largest bubbles)
• Analyze risk-reward profile through R-Ratio
• Monitor Expected Value for system profitability
• Use contribution analysis to understand win/loss impact
12. Why Choose PnL Bubble Indicator?
Unique Advantages:
• Advanced Pagination: Handle unlimited trades with smart fallback system
• Dual-Matrix Architecture: Perfect balance of performance and accuracy
• Professional Statistics: Institution-grade metrics with complete data integrity
• Real-Time Animation: Dynamic visual effects for engaging analysis
• Quantitative Tooltips: Pure numerical data without subjective interpretations
• Priority Rendering: Intelligent magnitude-based display ensures critical trades are always visible
Technical Excellence:
• Built with Pine Script v6 for maximum performance and modern features
• Optimized algorithms for smooth operation with large datasets
• Complete statistical accuracy despite display optimizations
• Professional-grade calculations matching institutional trading analytics
Practical Benefits:
• Instantly identify system profitability through visual patterns
• Spot outlier trades and risk management issues
• Understand true risk-reward profile of your strategies
• Make data-driven decisions for strategy optimization
• Professional presentation suitable for performance reporting
Disclaimer & Risk Considerations:
Important: Historical performance metrics, including positive Expected Value (EV), do not guarantee future trading success. Statistical measures are derived from finite sample data and subject to inherent limitations:
• Sample Bias: Historical data may not represent future market conditions or regime changes
• Ergodicity Assumption: Markets are non-stationary; past statistical relationships may break down
• Survivorship Bias: Strategies showing positive historical EV may fail during different market cycles
• Parameter Instability: Optimal parameters identified in backtesting often degrade in forward testing
• Transaction Cost Evolution: Slippage, spreads, and commission structures change over time
• Behavioral Factors: Live trading introduces psychological elements absent in backtesting
• Black Swan Events: Extreme market events can invalidate statistical assumptions instantaneously
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.
Support and Resistance levels from Options DataINTRODUCTION
This script is designed to visualize key support and resistance levels derived from options data on TradingView charts. It overlays lines, labels, and boxes to highlight levels such as Put Walls (gamma support), Call Walls (gamma resistance), Gamma Flip points, Vanna levels, and more.
These levels are intended to help traders identify potential areas of price magnetism, reversal, or breakout based on options market dynamics. All calculations and visualizations are based on user-provided data pasted into the input field, as Pine Script cannot directly fetch external options data due to platform limitations (explained below).
For convenience, my website allows users to interact with a bot that will generate the string for up to 30 tickers at once getting nearly real-time data on demand (data is cached for 15min). With the output string pasted into this indicator, it's a bliss to shuffle through your portfolio and see those levels for each ticker.
The script is open-source under TradingView's terms, allowing users to study, modify, and improve it. It draws inspiration from common options-derived metrics like gamma exposure and vanna, which are widely discussed in financial literature. No external code is copied without rights; all logic is original or based on standard mathematical formulas.
How the Options Levels Are Calculated
The levels displayed by this script are not computed within Pine Script itself—instead, they rely on pre-calculated values provided by the user (via a pasted data string). These values are derived from options chain data fetched from financial APIs (e.g., using libraries like yfinance in Python). Here's a step-by-step overview of how these levels are generally calculated externally before being input into the script:
Fetching Options Data:
Historical and current options chain data for a ticker (e.g., strikes, open interest, volume, implied volatility, expirations) is retrieved for near-term expirations (e.g., up to 90 days).
Current stock price is obtained from recent history.
Gamma Support (Put Wall) and Resistance (Call Wall):
Gamma Calculation: For each option, gamma (the rate of change of delta) is computed using the Black-Scholes formula:
gamma = N'(d1) / (S * sigma * sqrt(T))
where S is the stock price, K is the strike, T is time to expiration (in years), sigma is implied volatility, r is the risk-free rate (e.g., 0.0445), and N'(d1) is the normal probability density function.
Weighted gamma is multiplied by open interest and aggregated by strike.
The Put Wall is the strike below the current price with the highest weighted gamma from puts (acting as support).
The Call Wall is the strike above the current price with the highest weighted gamma from calls (acting as resistance).
Short-term versions focus on strikes closer to the money (e.g., within 10-15% of the price).
Gamma Flip Level:
Net dealer gamma exposure (GEX) is calculated across all strikes:
GEX = sum (gamma * OI * 100 * S^2 * sign * decay)
where sign is +1 for calls/-1 for puts, and decay is 1 / sqrt(T).
The flip point is the price where net GEX changes sign (from positive to negative or vice versa), interpolated between strikes.
Vanna Levels:
Vanna (sensitivity of delta to volatility) is calculated:
vanna = -N'(d1) * d2 / sigma
where d2 = d1 - sigma * sqrt(T).
Weighted by open interest, the highest positive and negative vanna strikes are identified.
Other Levels:
S1/R1: Significant strikes with high combined open interest and volume (80% OI + 20% volume), below/above price for support/resistance.
Implied Move: ATM implied volatility scaled by S * sigma * sqrt(d/365) (e.g., for 7 days).
Call/Put Ratio: Total call contracts divided by put contracts (OI + volume).
IV Percentage: Average ATM implied volatility.
Options Activity Level: Average contracts per unique strike, binned into levels (0-4).
Stop Loss: Dynamically set below the lowest support (e.g., Put Wall, Gamma Flip), adjusted by IV (tighter in low IV).
Fib Target: 1.618 extension from Put Wall to Call Wall range.
Previous day levels are stored for comparison (e.g., to detect Call Wall movement >2.5% for alerts).
Effect as Support and Resistance in Technical Trading
Options levels like gamma walls influence price action due to market maker hedging:
Put Wall (Gamma Support): High put gamma below price creates a "magnet" effect—market makers buy stock as price falls, providing support. Traders might look for bounces here as entry points for longs.
Call Wall (Gamma Resistance): High call gamma above price leads to selling pressure from hedging, acting as resistance. Rejections here could signal trims, sells or even shorts.
Gamma Flip: Where gamma exposure flips sign, often a volatility pivot—crossing it can accelerate moves (bullish above, bearish below).
Vanna Levels: Positive/negative vanna indicate volatility sensitivity; crosses may signal regime shifts.
Implied Move: Shows expected range; prices outside suggest overextension.
S1/R1 and Fib Target: Volume/OI clusters act as classic S/R; Fib extensions project upside targets post-breakout.
In trading, these are not guarantees—combine with TA (e.g., volume, trends). High activity levels imply stronger effects; low CP ratio suggests bearish sentiment. Alerts trigger on proximities/crosses for awareness, not advice.
Limitations of the TradingView Platform for Data Pulling
TradingView's Pine Script is sandboxed for security and performance:
No direct internet access or API calls (e.g., can't fetch yfinance data in-script).
Limited to chart data/symbol info; no real-time options chains.
Inputs are static per load; updates require manual pasting.
Caching isn't persistent across sessions.
This prevents dynamic data pulling, ensuring scripts remain lightweight but requiring external tools for fresh data.
Creative Solution for On-Demand Data Pulling
To overcome these limitations, users can use external tools or scripts (e.g., Python-based) to fetch and compute levels on demand. The tool processes tickers, generates a formatted string (e.g., "TICKER:level1,level2,...;TIMESTAMP:unix;"), and users paste it into the script's input. This keeps data fresh without violating platform rules, as computation happens off-platform. For example, run a local script to query APIs and output the string—adaptable for any ticker.
Script Functionality Breakdown
Inputs: Custom data string (parsed for levels/timestamp); toggles for short-term/previous/Vanna/stop loss; style options (colors, transparency).
Parsing: Extracts levels for the chart symbol; gets timestamp for "updated ago" display.
Drawing: Lines/labels for levels; boxes for gamma zones/implied move; clears old elements on updates.
Info Panel: Top-right summary with metrics (CP ratio, IV, distances, activity); emojis for quick status.
Alerts: Conditions for proximities, crosses, bounces (e.g., 0.5% bounce from Put Wall).
Performance: Uses vars for persistence; efficient for real-time.
This script is educational—test thoroughly. Not financial advice; past performance isn't indicative of future results. Feedback welcome via TradingView comments.
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.
Ichimoku Cloud Advanced [CongTrader]Ichimoku Cloud Advanced
Overview
Ichimoku Cloud Advanced is a refined version of the classic Ichimoku system. It combines the power of the original Ichimoku framework with practical enhancements, including:
Crypto & Traditional Presets for flexible use in multiple markets.
EMA200 Trend Filter to help reduce false signals and highlight strong market direction.
Signal Table & Labels to visualize entry/exit signals clearly.
Smart Alerts for Tenkan/Kijun crosses and Kumo breakouts.
Designed for traders who want to capture momentum, confirm trends, and manage positions more effectively in crypto, forex, and stocks.
Unique Value
Unlike standard Ichimoku indicators, this tool focuses on:
Adaptability: Ready-made presets for crypto volatility or traditional markets.
Clarity: Built-in labels, status table, and optional signals.
Risk Awareness: Encourages users to filter trades with EMA200, not just raw Ichimoku signals.
This makes it a balanced tool for trend confirmation, swing entries, and scalping setups.
How to Use
Choose a Preset → Traditional (9/26/52) or Crypto (fast/medium) depending on your market.
Enable EMA200 Filter → Use it to avoid trading against major market direction.
Watch Signals → Buy/Sell labels, status table updates, and alerts will guide you.
Set Alerts → Get notified when Tenkan crosses Kijun or when price breaks out of the Kumo cloud.
Quick Guide
Crypto Short-Term: Use fast preset for scalping volatile coins.
Stocks/Forex: Traditional settings align well with daily/weekly analysis.
Trend Filter: Always check EMA200 color and slope for context.
Alerts: Configure them to avoid missing strong trend entries.
Disclaimer
This indicator is a decision-support tool, not a guaranteed profit system. Trading involves risk, and past performance does not guarantee future results. Always:
Manage your risk and position size.
Use stop-loss and take-profit levels.
Consider market context before making decisions.
We do not provide financial advice. Use at your own discretion.
Acknowledgments
Original Ichimoku Kinko Hyo system created by Goichi Hosoda.
Enhanced and adapted by CongTrader for modern markets.
Thank you for using this tool! Your feedback and suggestions are always welcome to make it better.
🚀 Start testing Ichimoku Cloud Advanced today and experience a clearer, smarter way to apply one of the most respected trading systems.
#Ichimoku #IchimokuCloud #Kumo #Tenkan #Kijun #Chikou #CloudBreakout #TKCross #EMA200 #TrendFilter #Momentum #SwingTrading #Scalping #RiskManagement #MultiTimeframe #Alerts #Crypto #Forex #Stocks #Futures #Spot #PriceAction #TechnicalAnalysis #TradingViewIndicator
Machine Learning Z-Score Buy and Sell [SS]Hey everyone,
Releasing this Z-Score based buy and sell indicator.
What it does
This indicator:
Uses Z-score and trend to identify potential buy and sell areas.
Signals those buy and sell areas and provides a target price based on the mean.
Plots the target price for buy and sell signals as a red line (for sell signals) or green line (for buy signals).
Has some "machine learning" aspects, namely, it is able to auto select its lookback length based on its analysis of the trend using Pienscript's trend correlation function iterated over multiple lengths, in order for the indicator to identify:
a) The strongest trend; and
b) The correct target price
What is Z-Score
Z-Score is a measure of the mean. Thus, this is a mean reverting type strategy, as it uses z-score to determine price's distance from the mean (or a Z-Score of 0) and then it looks at historic deviations from the mean to signal the buy and sell signals (i.e. how far has price traditionally drifted from the mean before reverting).
Z-Score is a powerful tool in this sense, and if you folow my other indicators, you will know how much I love Z-score!
How to use the indicator
If you want to use the full Machine Learning capabilities of the indicator, its best to just leave all default settings. These default settings will automatically adjust the mean target price and buy and sell signals to align with the current price action.
If you want to be more aggressive in your
Target Price; and
Signals
Then you can opt to manually input a lookback length and mean reversion standard deviation. However, I generally suggest to avoid this as you are then making your own determination of trend by qualitative assessment. It can work, but its just not suggested.
In the input menu, you will see the option to "Manually select lookback" thus over-riding the auto-determination of trend and targets.
You will also see "manual pullback" enabler and "Pullback Standard Deviation". You can set your pullback standard deviation if you want to be more aggressive. The indicator will naturally shift to conservative target prices based on a neutral mean. However, if you want to increase the aggressiveness of the target price, you can increase or decrease the pullback standard deviation.
General Tips about Manually Adjusting Pullback Target
Here are some tips if you want to manually adjust the pullback targets:
The pullback target needs to be in a standard deviation value, this can be anywhere from 0 to 4 or 0 to -4 (you can theoretically go higher but its not really realistic). You can also do decimals, so 1.5 or 1.25 etc.
To determine whether you should be doing negative or positive standard deviation, you should determine the trend. If it is a downtrend and you are looking to short the rips, you will want to select a negative number, like -1.
If it is an uptrend and you want to buy the dips, you should be selecting a positive number, like 1 or 1.5.
Again, I do suggest leaving the indicator to decide for itself, but the options are there for those who wish.
Overall strategy
This is a mean reverting strategy. So if you are a mean reversion trader, this may be of particular interest to you.
Optional
Optionally, you can have the indicator plot the target prices or not, simply toggle this functionality off or on in the settings menu.
Concluding remarks
That is the indicator in a nutshell!
I hope you enjoy it and find it helpful.
Feel free to check out my other Z-Score based indicators if you find this interesting or want to learn more about the power of Z-Score in trading!
Thanks all and safe trades!
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!