Swing Highs/Lows & Candle Patterns[LuxAlgo] [Filtered]Swing Highs/Lows & Candle Patterns - Tweaked Version
This indicator is a customized and enhanced version of LuxAlgo’s original Swing Highs/Lows & Candle Patterns indicator. It identifies and labels critical swing high and swing low points to help visualize market structure, alongside detecting key reversal candlestick patterns such as Hammer, Inverted Hammer, Bullish Engulfing, Hanging Man, Shooting Star, and Bearish Engulfing.
With added options to selectively display only Lower Highs (LH) and Higher Lows (HL), this tweaked version offers greater flexibility for traders focusing on specific market dynamics. Users can also customize the lookback length and label styling to fit their preferences.
Credit to LuxAlgo for the original concept and foundation of this powerful tool, which this script builds upon to support more tailored technical analysis. Ideal for swing traders and technical analysts seeking improved entry and exit signals through a combination of price swings and candlestick pattern recognition.
אינדיקטורים ואסטרטגיות
FTSE Trade SignalTrade FTSE with SMA crossovers and signals only printed on FTSE open, between 8am and 10am
Swing Z | Zillennial Technologies Inc.Swing Z by Zillennial Technologies Inc. is an advanced algorithmic framework built specifically for cryptocurrency markets. It integrates multiple layers of technical analysis into a single decision-support tool, generating buy and sell signals only when several independent confirmations align.
Core Concept
Swing Z fuses trend structure, momentum oscillators, volatility signals, and price action tools to capture high-probability trading opportunities in volatile crypto environments.
Trend Structure (EMA 9, 21, 50, 200)
Short-term EMAs (9 & 21) detect immediate momentum shifts.
Longer-term EMAs (50 & 200) define the broader trend and dynamic support/resistance.
Momentum & Confirmation Layer
RSI measures relative strength and market conditions.
MACD crossovers confirm momentum shifts and trend continuations.
Volatility & Market Pressure
TTM Squeeze highlights compression zones likely to precede breakouts.
Volume analysis confirms conviction behind directional moves.
VWAP (Volume Weighted Average Price) establishes intraday value zones and institutional benchmarks.
Price Action Filters
Fibonacci retracements are integrated to identify key reversal and continuation levels.
Signals are produced only when multiple conditions agree, reducing noise and improving reliability in fast-moving crypto markets.
Features
Tailored for cryptocurrency trading across major pairs (BTC, ETH, and altcoins).
Works effectively on swing and trend-based timeframes (1H–1D).
Combines trend, momentum, volatility, and price action into a single framework.
Generates clear Buy/Sell markers and integrates with TradingView alerts.
How to Use
Apply to a clean chart for the clearest visualization.
Use Swing Z as a swing trading tool, aligning entries with both trend structure and momentum confirmation.
Combine with your own stop-loss, take-profit, and position sizing rules.
Avoid application on non-standard chart types such as Renko, Heikin Ashi, or Point & Figure, which may distort results.
Disclaimer
Swing Z is designed as a decision-support tool, not financial advice.
All backtesting should use realistic risk, commission, and slippage assumptions.
Past results do not guarantee future performance.
Signals do not repaint but may adjust as new data develops in real-time.
Why Swing Z is original & useful:
Swing Z unifies EMA trend structure, RSI, MACD, TTM Squeeze, VWAP, Fibonacci retracements, and volume analysis into a single algorithmic framework. This multi-confirmation approach improves accuracy by requiring consensus across trend, momentum, volatility, and price action — a design made specifically for the challenges and volatility of cryptocurrency markets.
Eureka & Phoenix Thrust — NYSE (90% Breadth Days)🚀Eureka & Phoenix Thrust Indicator (NYSE Breadth)
Overview
This free indicator highlights rare but powerful breadth thrust days on the NYSE that can mark important turning points in the market.
It automatically detects both:
📈 Eureka Thrust (90% Up Day)
– At least 90% of NYSE issues advance and at least 90% of NYSE volume is advancing.
– Often signals broad-based institutional buying and strong market demand.
📉 Phoenix Thrust (90% Down Day)
– At least 90% of NYSE issues decline and at least 90% of NYSE volume is declining.
– Reflects broad institutional selling or panic, sometimes marking capitulation lows.
Both signal types were popularized by Lowry’s Research and O’Neil/IBD market models.
Notes
Eureka Thrusts are bullish confirmation signals, especially when clustered.
Phoenix Thrusts often mark panic selling — bearish in the short term, but can precede market bottoms if followed by Eurekas.
These events are rare. You may need to scroll back in history (e.g., March 2020, 2008, 1987) to see them in action.
Disclaimer
This tool is for educational and informational purposes only.
It is not financial advice. Always do your own research and risk management before making trading or investment decisions.
MultiSessions traderglobal.topEste indicador de sesiones está diseñado para traders intradía que desean visualizar con precisión la actividad y la volatilidad característica de cada mercado. Basado en Pine Script v5 y optimizado para la zona horaria “America/New_York”, divide el día en sub-sesiones configurables y resalta sus rangos de precio en tiempo real. En particular, incorpora tres bloques para New York (NY1, NY2, NY3), dos para Londres (LON1, LON2), dos para Tokio (TKO1, TKO2) y mantiene Sídney como sesión opcional. Cada bloque puede activarse o desactivarse de forma independiente y cuenta con su propio color ajustable, lo que permite construir mapas visuales claros para estrategias basadas en horario, solapamientos y micro-estructuras de mercado.
El panel de inputs incluye la opción “Activate High/Low View”. Cuando está activada, el indicador calcula de manera incremental el mínimo y máximo de cada sub-sesión y sombrea el área entre ambos con fill, proporcionando una referencia inmediata del rango intrasesión (útil para medir compresión/expansión y posibles rompimientos). Cuando está desactivada, emplea un simple bgcolor por bloque, ideal para traders que prefieren un gráfico más limpio y solo desean distinguir visualmente los tramos horarios.
La lógica central utiliza dos funciones auxiliares: is_session(sess), que detecta si la vela actual pertenece a un tramo horario concreto, e is_newbar(sess), que determina el inicio de una nueva barra de referencia según la resolución elegida (D, W o M). Gracias a esta combinación, en cada sub-sesión el indicador reinicia sus contadores de alto y bajo al comenzar el período y los actualiza vela a vela mientras el bloque siga activo. Este enfoque evita mezclas de datos entre sesiones y asegura que el rango que se muestra corresponda estrictamente al segmento horario configurado.
Los horarios por defecto están pensados para Forex y contemplan casos que cruzan medianoche (por ejemplo, Tokio 2 y Sídney). Pine Script admite rangos como 2200-0200; no obstante, si tu bróker o la zona horaria del gráfico generan un sombreado parcial, basta con dividir el tramo en dos: 2200-2359 y 0000-0200. Asimismo, cada input.session incluye el patrón :1234567 para habilitar los siete días; puedes restringir días según tu operativa.
En cuanto al uso práctico, el indicador facilita identificar: (1) la estructura del rango por sub-sesión (útil para estrategias de breakout/mean-reversion), (2) los solapamientos entre Londres y New York, donde suele concentrarse la liquidez, y (3) períodos de menor volatilidad (tramos tardíos de Asia o previos a noticias). El color independiente por bloque te permite codificar visualmente la importancia o tu plan de trading (por ejemplo, tonos más intensos en ventanas de alta probabilidad).
Finalmente, su diseño modular hace sencilla la personalización: puedes ajustar colores, activar/desactivar bloques, cambiar horarios y modificar la resolución de reseteo del rango. Como posible mejora, se pueden añadir alertas de ruptura de máximos/mínimos de sub-sesión o etiquetas con la altura del rango (pips) al cierre. Este indicador no sustituye el juicio del trader ni constituye recomendación financiera, pero ofrece una base visual robusta para integrar el factor tiempo en la toma de decisiones.
This sessions indicator is built for intraday traders who want a precise, time-aware view of market activity and typical volatility patterns across the day. Written in Pine Script v5 and optimized for the “America/New_York” timezone, it divides the trading day into configurable sub-sessions and highlights their price ranges in real time. Specifically, it provides three blocks for New York (NY1, NY2, NY3), two for London (LON1, LON2), two for Tokyo (TKO1, TKO2), and keeps Sydney as an optional session. Each block can be enabled or disabled independently and comes with its own adjustable color, letting you build clear visual maps for time-based strategies, overlaps, and microstructure nuances.
In the inputs panel you’ll find the “Activate High/Low View” option. When enabled, the indicator incrementally computes each sub-session’s low and high and shades the area between them with fill, giving you an immediate reference to the intra-session range (useful for gauging compression/expansion and potential breakouts). When disabled, it switches to a clean bgcolor background by block—ideal if you prefer a minimal chart and simply want to distinguish time windows at a glance.
The core logic relies on two helper functions: is_session(sess), which detects whether the current bar falls within a given time window, and is_newbar(sess), which identifies the start of a new reference bar according to your chosen reset resolution (D, W, or M). With this combination, each sub-session resets its high/low at the beginning of the period and updates them bar by bar while the block remains active. This prevents cross-contamination between sessions and ensures the range you see belongs strictly to the configured segment.
Default hours are suited to Forex and include segments that cross midnight (e.g., Tokyo 2 and Sydney). Pine Script supports ranges like 2200-0200; however, if your broker or chart timezone causes partial shading, simply split the segment into two: 2200-2359 and 0000-0200. Each input.session uses the :1234567 suffix to enable all seven days; you can easily restrict days to match your plan.
Practically speaking, the indicator helps you identify: (1) range structure by sub-session (great for breakout or mean-reversion frameworks), (2) overlaps between London and New York, where liquidity and directional moves often concentrate, and (3) lower-volatility windows (late Asia or pre-news lulls). Independent colors per block let you visually encode priority or your trading plan (for example, richer tones in high-probability windows).
Thanks to its modular design, customization is straightforward: adjust colors, toggle blocks, change hours, and tweak the range-reset resolution to suit your routine. As a natural extension, you can add alerts for sub-session high/low breakouts or labels that display the range height (in pips) at session close. While no indicator replaces trader judgment or constitutes financial advice, this tool offers a robust visual foundation for incorporating the time factor directly into your decision-making, helping you contextualize price action within the rhythm of global trading sessions.
Simple MADSimple MAD is a lightweight and customizable indicator that calculates the Median Absolute Deviation (MAD) over a configurable period to measure market volatility. It dynamically displays Stop-Loss (SL) and Take-Profit (TP) levels based on MAD multipliers, both in absolute price and percentage terms.
The indicator includes a clean, watermark-style table with full layout controls — allowing you to adjust position, text size, alignment, and colors. It supports both manual entry price and automatic use of the latest close, making it ideal for traders who want to manage risk with precision and clarity.
Perfect for swing traders, volatility-based strategies, and anyone looking to integrate MAD into their decision-making.
ICT ob by AyushThis indicator marks **order blocks** by detecting the first opposite candle of any pullback run and drawing a line from its **open** to the confirming candle’s close.
It works on **any timeframe (or HTF projection)**, stays clean, and only shows **solid, body-confirmed OBs**.
Trade Life Balance Multi EMAThe Trade Life Balance EMA Indicator is a versatile and essential tool for technical analysts and traders. It combines five of the most commonly used Exponential Moving Averages (EMAs) into a single indicator, and additionally offers two optional EMAs for advanced analysis. This indicator helps to quickly identify trend direction, dynamic support and resistance levels, and potential entry and exit points.
Important Note:
Moving averages are lagging indicators, meaning they are based on past price data and do not predict future price movements. For a comprehensive market analysis, it is highly recommended to use the TLB EMA indicator in combination with other analytical tools such as volume, price action, and oscillators.
How the TLB EMA Indicator Works
The indicator plots multiple Exponential Moving Averages directly on the price chart. An EMA is a type of moving average that gives more weight and significance to the most recent price data, making it more responsive to price changes than a Simple Moving Average (SMA).
Default Configuration:
The indicator comes pre-configured with five core EMAs that play a crucial role in many trading strategies:
EMA 13 & 20: Often used as short-term trend indicators. Their slope and the distance to the price can indicate the strength of the current momentum.
EMA 50: Considered an important mid-term trend indicator. A price holding above the 50 EMA often suggests a healthy uptrend.
EMA 100: Serves as a mid- to long-term trend filter.
EMA 200: Widely regarded as the decisive line between a long-term bull and bear market.
The color scheme, ranging from light red (fastest EMA) to dark red (slowest EMA), facilitates quick visual identification.
Customization Options
The TLB EMA indicator is fully customizable to suit individual trading strategies and preferences:
EMA Lengths: All five standard EMAs, as well as the two optional ones, can be set to any desired length in the "Inputs" settings.
Optional EMAs: Two additional EMAs are disabled by default. They can be activated via a checkbox to supplement the analysis with other user-defined periods (e.g., for Fibonacci numbers or specific strategies).
Visual Style: In the "Style" tab of the indicator settings, the color, thickness, and visibility of each individual EMA line can be adjusted as desired.
Advantages of the TLB EMA Indicator
All-in-One Solution: Consolidates the most important EMAs into a single indicator, keeping the chart view clean and eliminating the need to add multiple individual indicators.
High Flexibility: With fully customizable lengths and two optional EMAs, the indicator can be configured for any strategy and any market (stocks, forex, crypto, etc.).
Visual Clarity: The pre-configured color coding allows for an intuitive and quick interpretation of the different trend speeds.
Efficiency: Saves time in chart setup and analysis.
Using the TLB EMA Indicator
The TLB EMA can be used in various ways in trading:
Trend Identification: The simplest application is to determine the overall trend. If the price is above the EMAs (especially the 200), it indicates an uptrend. If it is below, the trend is downward.
Dynamic Support and Resistance: In an uptrend, the EMAs often act as dynamic support zones where the price can bounce. In a downtrend, they serve as dynamic resistance zones.
Crossover Signals: The crossing of EMAs can generate trading signals. A "Golden Cross" (e.g., the 50 EMA crosses above the 200 EMA) is considered a bullish signal, while a "Death Cross" (50 EMA crosses below the 200 EMA) is considered a bearish signal.
Please note that the TLB EMA indicator is a tool for analysis and does not guarantee profitable trades. Always use it in conjunction with a solid risk management strategy.
Trend Score Raw Data
Trend Score Raw Data:
🚨This indicator is to support the Trend Score Stop Loss indicator.
This indicator is to show the raw data and change within of the trend score.
Advanced user to predict when trend score could change and understand the strength of the current trend score.
🔹 How Trend Score Works
• The trend score is calculated only during RTH and resets at the start of each new session.
• Each candle contributes to the score as follows:
• ✅ Breaks previous high → +1
• ❌ Breaks previous low → –1
• ⚖️ Breaks both high and low → 0 (–1 + 1 cancel out)
• 💤 Breaks neither high nor low → 0
🔹 Determining the First Trend
• The first valid session trend is established when the cumulative score hits +3 or –3.
• +3 → Start of a Bull Trend
• –3 → Start of a Bear Trend
There are 3 types of data in the panel:
The real trend score raw data cumulative in the RTH session.
The slope of trend score. (slope is calculated based on 9 candles, you can adjust your own setting)
The delta change of trend score per candle based on previous high/low.
You can deselect the slope of the trend score function if you don't need it.
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
Gaussian Channel Strategy – GC + Kijun + VAPI Gate Gaussian Channel Strategy – Description
This strategy combines multiple technical tools into a rules-based trading system designed for crypto and other volatile markets. The main components are:
- **Gaussian Channel (GC):** Acts as the core trend filter. When price is above the Gaussian filter, conditions favor longs; when below, shorts are favored. The channel bands (high/low) also provide visual guidance of volatility and dynamic support/resistance.
- **Kijun-Sen (Ichimoku baseline, period 120):** Serves as a secondary trend filter. Long trades are only considered if price is above the Kijun-Sen, shorts only if price is below.
- **VAPI (Volume Accumulation Percentage Indicator):** Adds a volume confirmation layer. Long setups require positive accumulation, while short setups require negative accumulation. This helps to filter out low-volume and false signals.
- **Risk Management (ATR):** Stop-losses are set at 3× the ATR distance from entry, dynamically adjusting to volatility. Position sizing is calculated as a percentage of account equity at risk per trade.
- **Take Profit & Trailing Exit:** Positions are split into two legs. Leg A (30% of size) takes fixed profit at 0.75× the stop-loss distance (RR 0.75). Leg B (70% of size) uses a trailing stop that follows price with an ATR-based buffer, aiming to capture extended moves.
- **Trade Management:** Long and short entries are triggered only when all three conditions (GC, Kijun, VAPI) align. Exits are handled automatically through fixed TP, SL, and trailing stops.
Overall, the strategy seeks to balance safety and trend-following by combining a smooth Gaussian filter with trend/volume confirmation and adaptive risk management.
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!
MACD Classic MT5 Style (2 Lines + Histogram)MACD เหมือน MT5 นะจ๊ะ
MACD Line (Green) = Difference between Fast EMA and Slow EMA
Signal Line (Red) = EMA of the MACD Line
Histogram = Distance between MACD Line and Signal Line (or in MT5 style, just MACD Line itself)
Daily High/Low Alerts MJO✅ Alert you when price hits daily highs and lows
✅ Work with any timeframe
✅ Support both stocks and crypto
✅ Include customizable colors for all visual elements
✅ Show optional table with current daily levels
✅ Provide flexible alert options
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.
VWAP TrendGuard [KedarArc Quant]Strategy Overview: A non-repainting intraday strategy that pairs VWAP entries with an EMA-based trend gate on the entry timeframe. Entries come from VWAP Cross or Cross+Retest, with an optional Momentum exception. Exits use either an ATR emergency stop or a structural TrendBreak. The Today Panel summarizes Net-R, Win%, and PF for the current session.
Non-repainting: all higher-timeframe requests use lookahead_off (no peeking).
Works across intraday frames; keep the HTF filter your chart timeframe.
Signals & Exits
Trend gate (entry timeframe): trendUp if EMA(fast) > EMA(slow); trendDown otherwise.
Volume gate: volume SMA(volume, volLen) × volMult.
Long (Base): trendUp & volOK AND (cross above VWAP OR (Cross+Retest AND recent low VWAP
within lookback)).
Short (Base): trendDown & volOK AND (cross below VWAP OR (Cross+Retest AND recent high VWAP within lookback)).
Momentum exception (optional): body momBodyPct AND volume SMA × momVolMult allows fast
entry.
TrendBreak exit: Long closes when price < VWAP AND EMA(fast) < EMA(slow); Short closes on the
opposite.
ATR emergency stop: strategy.exit at entry with stop = close ± ATR(atrLen) × atrMult.
ADX Only (Custom, same as TradingView)This is ADX indicator , same as default indicator. But it will change colour when ADX is bullish and bearish.
Draw Trend LinesSometimes the simplest indicators help traders make better decisions. This indicator draws simple trend lines, the same lines you would draw manually.
To trade with an edge, traders need to interpret the recent price action, whether it's noisy or choppy, or it's trending. Trend Lines will help traders with that interpretation.
The lines drawn are:
1. lower tops
2. higher bottoms
Because trends are defined as higher lows, or lower highs.
When you see "Wedges", formed by prices chopping between top and bottom trend lines, that's noisy environment not to be traded. When you learn to "stop yourself", you already have an edge.
Often when you see a trend, it's still not too late. Trend will continue until it doesn't. But the caveat is a very steep trend is unlikely to continue, because buying volume is extremely unbalanced to cause the steep trend, and that volume will run out of energy. (Same on the sell side of course)
Trends can reverse, and when price action breaks the trend line, Breakout/Breakdown traders can take this as an entry signal.
Enjoy, and good trading!
Ultra-Precise Scalper with OB, W/M & Liquidity Sweepsupport and resistance with order block detection and M and W PATTERNS
Scalping EMA9 + Breakout (5m - 24h)//@version=6
indicator("Scalping US100 - EMA9 Breakout", overlay=true)
ema9 = ta.ema(close, 9)
plot(ema9, color=color.orange, title="EMA9")
// Condições de rompimento
breakout_up = close > high and close > ema9
breakout_down = close < low and close < ema9
// Plotar sinais visuais
plotshape(breakout_up, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(breakout_down, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Alerta para Webhook
alertcondition(breakout_up, title="Buy Alert", message="BUY - US100 🚀")
alertcondition(breakout_down, title="Sell Alert", message="SELL - US100 🔻")
Bullish & Bearish Engulfing Finder [Crypto Varthagam]Overview
This script is designed to automatically detect Bullish and Bearish Engulfing Candlestick Patterns directly on your TradingView chart. Engulfing patterns are widely used in price action trading as potential reversal signals.
Features
- Detects both Bullish Engulfing and Bearish Engulfing patterns.
- Option to require a prior trend filter (configurable consecutive bars)
Flexible engulfing detection:
- Strict mode (body must fully cover the previous candle’s body).
- Ratio mode (current body must be at least X times larger).
- Optional volume confirmation (engulfing candle volume > SMA × multiplier).
- Clear chart labels and optional background highlights.
- Built-in alert conditions for automated notifications.
- Lightweight, clean, and open-source for the community.
Why It’s Unique
- Unlike many engulfing detectors, this script gives you full control over detection rules. You can fine-tune strictness, require prior trends, or add volume conditions to filter out weak signals. Both bullish and bearish engulfing patterns are supported in one script, keeping your chart clean.
Housekeeping & Policy Notes
- This script is for educational purposes only. It does not provide financial advice or guaranteed trading signals.
- Always combine candlestick patterns with proper risk management and your own strategy.
- Fully open-source: feel free to study, learn, and adapt it for your needs.
Alerts
- “Bullish Engulfing Detected”
- “Bearish Engulfing Detected”