cd_cisd_market_CxHi Traders,
Overview:
Many traders follow market structure to identify the market direction and seek trade opportunities in line with the trend.
However, markings derived from user-defined inputs can create different structures, depending on personal choices. For instance, choosing a pivot distance of 3 instead of 2 alters the structure, even though the chart remains the same. Ideally, the structure should remain consistent.
"Change in State Delivery" ( CISD ) is a widely accepted concept among traders and is considered a significant indicator of market direction based on the gain/loss of CISD levels.
In this indicator, CISD is selected as the primary criterion for marking market structure, eliminating the influence of user-dependent variations.
Here is a summary of the key logic and rules applied:
• When the price forms a new high/low, that level is only considered a pivot if a CISD has occurred.
• A bullish CISD is always followed by a bearish CISD, and vice versa.
• Pivot points form the internal structure.
• The internal structure is used to interpret the swing structure.
• Probabilities are derived from internal structure patterns.
________________________________________
Details:
How is CISD determined?
As is commonly known:
• When price makes a new high, the opening level of the first candle in the consecutive bullish candle sequence is marked.
• When price makes a new low, the opening of the first candle in the consecutive bearish sequence is marked.
• If there’s only one candle in the sequence, its opening level is used.
In a bullish market, losing a bearish CISD level (i.e., a close below it) or in a bearish market, gaining a bullish CISD level (i.e., a close above it) is interpreted as a potential shift in buyer-seller dominance and a possible market reversal.
________________________________________
How are internal (pivot) levels determined?
• When price closes below a bearish CISD level, the highest candle's high becomes a pivot high (PH).
• When price closes above a bullish CISD level, the lowest candle's low becomes a pivot low (PL).
• If the new PH is above the previous PH, it’s labeled as HH (Higher High); otherwise, LH (Lower High).
• If the new PL is below the previous PL, it’s labeled as LL (Lower Low); otherwise, HL (Higher Low).
________________________________________
Internal Market Structure:
• A series of HHs indicates a bullish internal structure.
• A series of LLs indicates a bearish internal structure.
________________________________________
Swing (Main) Market Structure:
Using internal pivots and previous swing levels, the main market structure is derived.
• A new swing high (SH) requires the price to move above the previous SH.
• A new swing low (SL) requires the price to move below the previous SL.
________________________________________
Probability Calculation:
Pivot levels forming the internal structure are coded as five-element sequences.
There are 64 possible combinations of such sequences made from consecutive PH and PL values.
Each pattern’s frequency from its starting candle is tracked.
To make it more understandable:
For example, after the four-sequence “HH, LL, LH,HL”, either HH or LH might follow.
The table shows the statistical likelihood of both possible outcomes for the most recent four-element sequence on the chart.
________________________________________
How reliable is it?
To assess reliability, results are calculated from the beginning using:
Success Rate (Suc. Rt) = Number of Correct Predictions / Total Predictions
This value is added to the table for reference.
It’s important to note that no statistical outcome guarantees certainty—every result offers a different interpretation. What truly matters is to avoid getting stopped out 😊.
________________________________________
Menu Options:
Show/hide preferences and color selections can be customized via the indicator menu.
________________________________________
What’s Coming in Future Versions?
Features such as FVG (Fair Value Gaps) between swing levels, volume imbalances, order blocks / mitigation blocks, Fibonacci levels, and relevant trade suggestions will be added.
________________________________________
This is a BETA version that I believe will help simplify your market reading. I’d be happy to hear your feedback and suggestions.
Cheerful Trading!
รูปแบบชาร์ต
The Butterfly [theUltimator5]This is a technical analysis tool designed to automatically detect and visualize Butterfly harmonic patterns based on recent market pivot structures. This indicator uses a unique plotting and detection algorithm to find and display valid Butterfly patterns on the chart.
The indicator works in real-time and historically by identifying major swing highs and lows (pivots) based on a user-defined ZigZag length. It then evaluates whether the most recent price structure conforms to the ideal proportions of a bullish or bearish Butterfly pattern. If the ratios between price legs XA, AB, BC, and projected CD meet defined tolerances, the pattern is plotted on the chart along with a projected D point for potential reversal.
Key Features:
Automatic Pivot Detection: The script analyzes recent price action to construct a ZigZag pattern, identifying swing points as potential X, A, B, and C coordinates.
Butterfly Pattern Validation: The pattern is validated against traditional Fibonacci ratios:
--AB should be approximately 78.6% of XA.
--BC must lie between 38.2% and 88.6% of AB.
--CD is projected as a multiple of BC, with user control over the ratio (e.g., 1.618–2.24).
Bullish and Bearish Recognition: The pattern logic detects both bullish and bearish Butterflies, automatically adjusting plotting direction and color themes.
Custom Ratio Tolerance: Users can define how strictly the AB/XA and BC/AB legs must adhere to ideal ratios, using a percentage-based tolerance slider.
Fallback Detection Logic: If a new pattern is not identified in recent bars, the script performs a backward search on the last four pivots to find the most recent valid pattern.
Force Mode: A toggle allows users to force the drawing of a Butterfly pattern on the most recent pivot structure, regardless of whether the ideal Fibonacci rules are satisfied.
Dynamic Visualization:
--Clear labeling of X, A, B, C, and D points.
--Colored connecting lines and filled triangles to visualize structure.
--Optional table displaying key Fibonacci ratios and how close each leg is to ideal values.
Inputs:
Length: Controls the sensitivity of the ZigZag pivots. Smaller values result in more frequent pivots.
Tolerance (%): Adjustable threshold for acceptable deviation in AB/XA and BC/AB ratios.
CD Length Multiplier: Projects point D by multiplying the BC leg using a value between 1.618 and 2.24.
Force New Pattern: Overrides validation checks to display a Butterfly structure on recent pivots regardless of ratio accuracy.
Show Table: Enables a table showing calculated ratios and deviations from the ideal.
Fixed Market Path Predictionthis indicator is a line that is used to predict the way the market moves, if you combine it with my other indicator its better, go check it out.
Reversal Hammer/InvertedHammer/ShootingStar/HangingManCheck in H4, D1 timeframes and take your trade in M5
Zero Lag Trend Strategy (MTF)🧠 Strategy Overview
The Zero Lag Trend Signals Strategy (MTF) is a high-precision, multi-timeframe trend-following system designed for traders seeking early trend entries and intelligent exits. Built around ZLEMA-based signal detection, based on the original indicator Zero Lag Trend Signals (MTF) from AlgoAlpha, now built as a strategy with several improvements for Exit Criteria include RR, ATR Stop Loss, Trailing stop loss, etc. See below.
This momentum strategy works much better for higher timeframes, typically 4 hours or higher. This particular combination only contains 57 trades because this captures larger trend moves. The dataset contains realistic commission and slippage. You can try to run this on a smaller timeframe, but you will need to try different combinations of length, band multiplier, risk-reward ratios, and other stop loss criteria.
🔍 Key Components
1️⃣ ZLEMA Trend Engine
ZLEMA (Zero-Lag EMA) forms the foundation of the trend signal system.
Detects bullish and bearish momentum by analyzing price action crossing custom ZLEMA bands.
Optional confirmation using 5-bar ZLEMA slope filters (up/down trends) ensures high-conviction entries.
2️⃣ Volatility-Based Signal Bands
Dynamic bands are calculated using ATR (volatility) stretched over 3× period length.
These bands define entry zones (outside the bands) and trend strength.
Price crossing above/below the bands triggers trend change detection.
3️⃣ Entry Logic
Primary long entries occur when price crosses above the upper ZLEMA band.
Short entries (optional) trigger on downside cross under the lower band.
Re-entry logic allows continuation trades during strong trends.
Filters include date range, ZLEMA confirmation, and previous position state.
4️⃣ Exit Logic & Risk Management
Supports multiple customizable exit mechanisms:
🔺 Stop-Loss & Take-Profit
ATR-Based SL/TP: Uses ATR multipliers to dynamically set levels based on volatility.
Fixed Risk-Reward TP: Targets profit based on predefined RR ratios.
Break-Even Logic: Automatically moves SL to entry once a threshold RR is hit.
EMA Exit: Optional trailing exit based on price vs. short EMA.
🔀 Trailing Stop
Follows price action using a trailing ATR-based buffer that tightens with trend movement.
🔁 Trend-Based Exit
Automatically closes positions when the detected trend reverses.
5️⃣ Multi-Option Trade Filtering
Enable/disable short trades, ZLEMA confirmations, re-entries, etc.
Time-based backtesting filters for isolating performance within custom periods.
6️⃣ Visual Feedback & Annotations
Trend shading overlays: Green for bullish, red for bearish zones.
Up/Down triangle markers show when ZLEMA is rising/falling for 5 bars.
Stop-loss, TP, trailing lines drawn dynamically on the chart.
Floating stats table displays live performance (PnL, win %, GOA, drawdown, etc.).
Trade log labels annotate closed trades with entry/exit, duration, and reason.
7️⃣ CSV Export Integration
Seamless export of trade data including:
Entry/exit prices
Bars held
Encoded exit reasons
Enables post-processing or integration with external optimizers.
⚙️ Configurable Parameters
All key elements are customizable:
Entry band length and multiplier
ATR lengths, multipliers, TP/SL, trailing stop, break-even
Profit target RR ratio
Toggle switches for confirmations, trade types, and exit methods
🎯 IKODO Prof Price Action⚔️ IKODO Prof Price Action Indicator
"Let the price speak. We just listen."
Forget lagging indicators.
IKODO Prof is not just another tool – it’s your edge in a market full of noise.
Crafted with precision, this indicator:
🔹 Strips away clutter and focuses on pure price movement
🔹 Detects liquidity grabs, fakeouts, and smart money footprints
🔹 Analyzes candle structures, breaker zones, and trend shifts in real-time
🔹 Never lags — because price action never lies
Built for traders who understand that:
> "Price is the ultimate indicator."
Whether you're scalping or swing trading, IKODO Prof keeps you on the right side of the market — the side where institutions play.
This isn’t just an indicator.
This is a framework, a philosophy, a weapon.
> Welcome to the next level.
Welcome to IKODO Prof.
Unified Sentiment Candles Overlay (SMA)Unified Sentiment Candles (SMA) Indicator
The Unified Sentiment Candles (SMA) is a custom overlay indicator designed to provide a smoothed visualization of market sentiment by plotting synthetic candles based on the Simple Moving Average (SMA) of open, high, low, and close prices. It helps traders identify trend direction and potential reversals more clearly.
How to Use:
- Observe Candle Colors: Green candles indicate bullish sentiment (close ≥ open), while red candles suggest bearish sentiment (close < open).
- Trend Identification: Consistent green candles point to an uptrend, whereas consistent red candles may signal a downtrend.
- Support & Resistance Zones: The SMA-based candles smooth out short-term volatility, assisting in spotting key support and resistance levels.
- Entry & Exit Signals: Look for color changes or candle pattern formations within the synthetic candles to time entries and exits more effectively.
Settings:
SMA Length : Adjust this parameter to control the smoothing period. A shorter length makes the indicator more responsive, while a longer length smooths out more noise.
This indicator is best used in conjunction with other technical analysis tools to confirm signals and improve trading accuracy.
This script is open-source and licensed under the Mozilla Public License 2.0. Use and modify it at your own discretion.
EBP mtf+fib (Nephew_Sam_)EBP (Engulfing Bar Pattern) Multi-Timeframe Indicator
This indicator identifies special engulfing bar patterns that take liquidity from previous candles, making it ideal for trading reversals and continuations. Unlike traditional engulfing patterns, this enhanced version requires the current candle to break the previous candle's extreme (high/low) before closing beyond its open.
Key Features:
• Multi-timeframe analysis (up to 6 timeframes)
• Customizable Fibonacci retracement levels
• Visual table showing active engulfing patterns
• Color-coded bars for easy pattern identification
• Optional timeframe labels on Fibonacci levels
Trading Strategy:
1. Identify EBP patterns on higher timeframes (HTF)
2. Use Fibonacci levels from the EBP candle for potential entries on lower timeframes
3. For bullish setups: Price breaks previous low then closes above previous open
4. For bearish setups: Price breaks previous high then closes below previous open
Perfect for traders looking to catch strong reversal moves or continuation patterns with clear entry points based on liquidity sweeps.
Big Move Follow-Through Tracker🚀 What This Indicator Does
Ever wondered if that sudden 5% pump in your favorite crypto will continue or just fade away? This powerful indicator automatically tracks every significant price move and tells you exactly what happened next - momentum continuation or mean reversion.
🎯 Key Features
📊 Smart Move Detection
Automatically identifies "big moves" based on your custom threshold (default 3%)
Uses ATR filtering to ensure moves are truly significant, not just normal volatility
Works on ANY timeframe and ANY crypto pair
🔍 Follow-Through Analysis
Tracks each big move for your specified number of bars (default 5)
Classifies outcomes as either Follow-Through (momentum continues) or Mean Reversion (price reverses)
Uses intelligent 2% thresholds to avoid noise and focus on meaningful moves
📈 Real-Time Statistics Dashboard
Live statistics table showing historical performance
Separate analysis for UP moves vs DOWN moves (crypto often behaves differently!)
Percentage breakdowns of follow-through vs reversion rates
Track total moves detected vs analyzed over time
🎨 Visual Clarity
Clear arrow signals when big moves are detected
Background highlighting during significant moves
Customizable display options - show/hide signals and stats as needed
🛠️ How to Use
Add to any crypto chart (works on BTC, ETH, altcoins, etc.)
Adjust the move threshold (3% for major coins, higher for smaller caps)
Set analysis timeframe (how many bars to track each move)
Watch the statistics build over time to understand your asset's behavior
💡 Trading Applications
For Momentum Traders:
High follow-through rates? → Consider riding the momentum
Trade in direction of big moves when statistics support it
For Mean Reversion Traders:
High reversion rates? → Look for fade opportunities
Counter-trade big moves when they historically reverse
For Risk Management:
Understand typical behavior after significant moves
Size positions based on historical follow-through probabilities
📋 Customizable Settings
Big Move Threshold: Adjust sensitivity (0.5% - 10%)
Analysis Period: How long to track each move (3-20 bars)
Display Options: Toggle signals and statistics table
Alert System: Get notified when big moves occur
🎲 What Makes This Different
Unlike simple momentum indicators, this tool:
✅ Quantifies actual outcomes with real statistics
✅ Adapts to each asset's unique volatility profile
✅ Separates up and down move behavior
✅ Provides actionable probability data
📊 Perfect For
Crypto day traders looking for edge identification
Swing traders wanting to understand momentum vs reversion tendencies
Risk managers needing probability-based position sizing
Strategy developers building data-driven trading systems
⚡ Quick Setup Tips
For Major Cryptos (BTC, ETH): Use 2-4% threshold
For Altcoins: Use 4-8% threshold
For Scalping: Use lower timeframes with 1-2% threshold
For Swing Trading: Use higher timeframes with 5%+ threshold
Wx2 strategy(2Min)Institutional Entry Strategy
Time Frame: 2Min
Entry: at Highlited Candle
Exit : at exit signal
Stop Loss 1 Bar
N8's Money makercalculates ideal buy and sell prices and put's in ideal TP and SL prices for short and long positions
SMT DivergenceSMT Divergence Indicator
This powerful indicator identifies high-probability reversal points by detecting SMT (Smart Money Technique) divergences between two correlated assets. It spots subtle shifts in market momentum, revealing when one asset fails to confirm the price action of another—often signaling an impending trend change.
Key Features:
Inter-Market Divergence Detection: Automatically compares the price action of the main symbol with a second user-defined asset.
Identifies Key Reversals: Pinpoints both bullish and bearish SMT divergences, highlighting hidden strength in downtrends and underlying weakness in uptrends.
Customizable Pivot Detection: Allows fine-tuning of the pivot length to adjust sensitivity for different market conditions and timeframes.
Flexible Display Modes: Choose between clean 'Lines' connecting the diverging pivots or precise 'Labels' marking the exact high/low points.
Full Visual Customization: Complete control over the colors and line thickness for seamless integration with your existing chart layout.
Built-in Alerts: Stay notified of every potential opportunity with alerts for both bullish and bearish signals.
Settings:
Core Parameters:
Comparison Symbol: Select the second asset to compare against for divergence analysis (e.g., NQ1! if you are charting ES1!).
Pivot Length: Defines the number of bars to the left and right required to confirm a pivot high or low.
Visual Settings:
Display Style: Choose to visualize divergences as 'Lines' or 'Labels'.
Bearish/Bullish Color: Set custom colors for bearish and bullish divergence indicators.
Line Width: Adjust the thickness of the divergence lines for optimal visibility.
Perfect for traders who utilize inter-market analysis to confirm trade ideas. The SMT Divergence indicator provides a crucial edge by exposing non-confirmations between related assets, allowing for earlier and more confident entries into potential market reversals.
Impulse Profile Zones [BigBeluga] - with Alerts📌 Indicator Description
This indicator highlights impulse price zones that occur when a large-bodied candle (high momentum candle) appears. Within these zones, the indicator performs the following:
Calculates vertical volume distribution (Volume Profile) using lower timeframe data.
Draws a histogram bar across 10 price levels within the zone to show volume concentration.
Identifies the POC (Point of Control) — the price level with the highest volume.
Provides automatic BUY/SELL alerts based on the direction of the impulse candle:
📈 Buy alert is triggered when a large bullish candle forms.
📉 Sell alert is triggered when a large bearish candle forms.
🚀 Future Development Potential
🧠 AI sentiment integration for enhanced signal validation
📤 Webhook alerts to external systems like Telegram or Discord
📉 BUY/SELL arrow visualization directly on the chart
🔄 Auto-drawn support/resistance levels derived from volume profile zones
ETHUSDT 1H - Momentum Breakout with ATR TP/SL (Long & Short)momentum candle untuk pair ethusdt TF 1H
• Timeframe: 1H
• Entry Long:
• Price Up ≥ 2% in1 candle
• Breakout high from 10 candles before
• Entry Short:
• Price Down ≥ 2% in 1 candle
• Breakdown low from 10 candles before
• TP: Use ATR × multiplier (default: 1.5)
• SL:
• Long → Low from candle momentum
• Short → High from candle momentum
Volume + Price Reversal SignalTesting so not sure if it works, using volume and candlesticks to determine reversals
5DMA Optional HMA Entry📈 5DMA Optional HMA Entry Signal – Precision-Based Momentum Trigger
Category: Trend-Following / Reversal Timing / Entry Optimization
🔍 Overview:
The 5DMA Optional HMA Entry indicator is a refined price-action entry tool built for traders who rely on clean trend alignment and precise timing. This script identifies breakout-style entry points when price gains upward momentum relative to short-term moving averages — specifically the 5-day Simple Moving Average (5DMA) and an optional Hull Moving Average (HMA).
Whether you're swing trading stocks, scalping ETFs like UVXY or VXX, or looking for pullback recovery entries, this tool helps time your long entries with clarity and flexibility.
⚙️ Core Logic:
Primary Condition (Always On):
🔹 Close must be above the 5DMA – ensuring upward short-term momentum is confirmed.
Optional Condition (Toggled by User):
🔹 Close above the HMA – adds slope-responsive trend filtering for smoother setups. Enable or disable via checkbox.
Bonus Entry Filter (Optional):
🔹 Green Candle Wick Breakout – optional pattern logic that detects bullish momentum when the high pierces above both MAs, with a green body.
Reset Mechanism:
🔁 Signal resets only after price closes back below all active MAs (5DMA and HMA if enabled), reducing noise and avoiding repeated signals during chop.
🧠 Why This Works:
This indicator captures the kind of setups that professional traders look for:
Momentum crossovers without chasing late.
Mean reversion snapbacks that align with fresh bullish moves.
Avoids premature entries by requiring clear structure above moving averages.
Optional HMA filter allows adaptability: turn it off during choppy markets or range conditions, and on during trending environments.
🔔 Features:
✅ Adjustable HMA Length
✅ Enable/Disable HMA Filter
✅ Optional Green Wick Breakout Detection
✅ Visual “Buy” label plotted below qualifying bars
✅ Real-time Alert Conditions for automated trading or manual alerts
🎯 Use Cases:
VIX-based ETFs (e.g., UVXY, VXX): Catch early breakouts aligned with volatility spikes.
Growth Stocks: Time pullback entries during bullish runs.
Futures/Indices: Combine with macro levels for intraday scalps or swing setups.
Overlay on Trend Filters: Combine with RSI, MACD, or VWAP for confirmation.
🛠️ Recommended Settings:
For smooth setups in volatile names, use:
HMA Length: 20
Keep green wick filter ON
For fast momentum trades, disable the HMA filter to act on 5DMA alone.
⭐ Final Thoughts:
This script is built to serve both systematic traders and discretionary scalpers who want actionable signals without noise or lag. The toggleable HMA feature lets you adjust sensitivity depending on market conditions — a key edge in adapting to volatility cycles.
Perfect for those who value clean, non-repainting entries rooted in logical structure.
Breakout & Pullback | Auto S&D + Telegram AlertsBreakout & Pullback | Auto S&D + Telegram Alerts Achraf
@khaicao| APB HistogramIntroducing the APB Histogram Indicator
A Powerful Tool for Visualizing Price Momentum
The APB Histogram (Average Price Bar Histogram) is a unique and insightful indicator designed to help traders identify price momentum and potential trend reversals. By calculating a smoothed average of price action and plotting the difference between the APB Close and APB Open as a histogram, this indicator provides a clear visual representation of bullish and bearish pressure in the market.
Key Features:
✅ Smoothed Price Calculation – Uses a recursive formula to generate a dynamic average price bar, reducing noise and highlighting meaningful trends.
✅ Intuitive Histogram Display – Positive (green) bars indicate bullish momentum, while negative (red) bars signal bearish momentum.
✅ Customizable Colors – Adjust the bullish and bearish colors to match your trading style.
✅ Non-Overlay Design – Plotted in a separate panel for clear visualization without cluttering the main chart.
How to Use the APB Histogram:
Bullish Signals: When the histogram bars are green and rising, it suggests increasing buying pressure.
Bearish Signals: When the histogram bars are red and falling, it indicates growing selling pressure.
Trend Confirmation: Use alongside other indicators, recommended to use with Stochastic (8,3,3) to confirm trend strength.
Perfect For:
Swing Traders looking for momentum shifts
Day Traders needing quick visual cues on price direction
Trend Followers confirming entry and exit points
Try the APB Histogram today and enhance your trading strategy with a cleaner, more intuitive view of market momentum!
🔹 Like & Follow for more unique indicators!
🔹 Comment below if you have any questions or improvement suggestions!
Happy Trading! 🚀
Wyckoff Entry Times @jqrmThis indicator visually marks two custom time zones on your TradingView chart by drawing vertical lines at the start and end of each zone. The first time zone spans from 9:27 AM to 9:33 AM, highlighted in red, and the second spans from 9:50 AM to 10:10 AM, highlighted in blue. You can enable or disable each zone's lines using the indicator inputs. This helps to quickly spot important intraday sessions or time ranges on your chart.
Shark Zones The Shark Zone indicator is designed to detect potential zones where institutional or "smart money" activity (often referred to as "sharks") may be occurring. These zones are based on specific market behaviors that typically accompany accumulation or distribution by large players.
📊 Key Features:
Multi-timeframe Analysis: Choose a higher timeframe (HTF) for evaluating candles and volume while viewing on a lower chart.
Volume Spike Detection: Identifies candles where volume exceeds a configurable historical maximum.
Strong Candle Body: Filters for candles with a dominant body compared to their wicks, indicating directional conviction.
Range Expansion: Confirms the candle’s price range is significantly larger than the average, highlighting high-impact moves.
Dynamic Shark Zone Plotting:
Once a “Shark Bar” is detected (meeting all conditions), a zone is plotted from its high to low.
Zones remain on the chart for a set number of bars unless another Shark Bar updates the range.
Background shading and labeled markers enhance visibility.
⚙️ Adjustable Inputs:
Analysis Timeframe: Choose the HTF used for detecting smart money candles.
Volume Spike Lookback: Number of bars to compare for volume breakout.
Body/Wick Ratio: Sensitivity to strong-bodied candles.
Range Multiplier: Required deviation from average range to qualify as a spike.
Zone Reset After N Bars: Automatically clear zone after inactivity.
Show Zone: Toggle display of the detected zones.
✅ Use Cases:
Spotting possible accumulation/distribution areas.
Detecting early signs of large order imbalances.
Combining with other confluence tools (OB, VWAP, structure) to improve entry precision.
DR SessionsDR/IDR concept sessions with multiple ways to view the session to best suit your needs.
Each session, ADR, ODR, RDR can be turned on/off, and displayed 3 different ways. Lines, will highlight each DR and IDR line, and will color the side that breaks out. Zones, will fill in the gap between the DR and the IDR lines and will color the breakout side. Finally range will fill the entire range from DR to DR with a single color that will change to the breakout color once price closes outside of the range.
TSLA Elliott Wave Estimation//@version=5
indicator("TSLA Elliott Wave Estimation", overlay=true)
// === PRICE SWINGS LOGIC (simplified manual labeling structure) ===
// Manually approximate major pivot points (this should ideally be semi-automated or confirmed with fractal/zigzag logic)
wave1_top = label.new(x=bar_index , y=450, text="(1)", style=label.style_label_up, color=color.green, textcolor=color.white)
wave2_bottom = label.new(x=bar_index , y=290, text="(2)", style=label.style_label_down, color=color.red, textcolor=color.white)
wave3_top = label.new(x=bar_index , y=550, text="(3)", style=label.style_label_up, color=color.green, textcolor=color.white)
wave4_bottom = label.new(x=bar_index , y=310, text="(4)", style=label.style_label_down, color=color.red, textcolor=color.white)
// Forecasted wave 5 zone
wave5_target_top = line.new(x1=bar_index, y1=420, x2=bar_index + 20, y2=450, extend=extend.right, color=color.yellow, width=2, style=line.style_dashed)
label.new(x=bar_index + 20, y=450, text="Potential (5)", style=label.style_label_up, color=color.orange, textcolor=color.black)
// Optional: Visual zone for retracement support
support_box = box.new(left=bar_index - 15, top=330, right=bar_index + 5, bottom=290, border_color=color.gray, bgcolor=color.new(color.gray, 85))