INVITE-ONLY SCRIPT

TraderDemircan - Ultimate Fibonacci Suite (Bearish) v2.0

64
-Overview
This indicator is a comprehensive Fibonacci-based trading tool specifically designed for identifying and trading bearish XABCD harmonic patterns. It combines classical Fibonacci retracement/extension levels with advanced harmonic pattern recognition, risk management calculations, and confluence zone detection to provide traders with a complete analytical framework for short positions.

-What Makes This Script Original
Unlike standard Fibonacci tools that simply draw static levels, this script:

Dynamically identifies swing highs and lows using lookback period analysis
Automatically detects and labels XABCD formation points (X, A, B, C, D) in real-time
Recognizes multiple harmonic patterns (Gartley, Butterfly, Bat, Crab, Shark) with customizable tolerance
Calculates and displays Potential Reversal Zones (PRZ) at point D
Provides integrated risk management with position sizing, stop loss, and multiple take profit levels
Identifies confluence zones where multiple Fibonacci levels intersect
Includes trend filter to validate pattern direction
Offers trading mode presets for scalpers, day traders, and swing traders

-How It Works
XABCD Pattern Detection (Bearish Version)
The script uses a bearish structure where:

Point X: The highest point (swing high) identified within the lookback period
Point A: The lowest point (swing low) that occurs after X
Point B: The retracement level from A back toward X (typically 0.382, 0.5, 0.618, or 0.786)
Point C: The projected target below B (calculated as B minus the X-A range)
Point D: The Potential Reversal Zone (PRZ) where the short position is recommended

The algorithm:
Scans the last N bars (user-defined) to find the highest point (X)
Identifies the lowest point after X (point A)
Monitors price retracement to determine point B
Projects point C and D targets based on Fibonacci extensions
Validates the formation against minimum swing size requirements
Optionally applies trend filter to confirm bearish bias

Fibonacci Levels
The script plots 14 customizable Fibonacci levels:

Retracement levels: 0.0 (X), 0.236, 0.382, 0.5, 0.618, 0.786, 1.0 (A)
Extension levels: 1.272, 1.414, 1.618, 2.0, 2.618, 3.618, 4.236

Each level is color-coded and can be individually toggled on/off. In the bearish version, these levels are calculated from the swing high (X) downward to the swing low (A) and beyond.
Harmonic Pattern Recognition
The indicator automatically detects five classic harmonic patterns when enabled:

Bearish Gartley (75% probability): B retracement at 0.618, D target at 0.786
Bearish Butterfly (70% probability): B retracement at 0.786, D target at 1.272
Bearish Bat (80% probability): B retracement at 0.382-0.5, D target at 0.886
Bearish Crab (85% probability): B retracement at 0.382-0.618, D target at 1.618
Bearish Shark (72% probability): B retracement at 0.382-0.618, D target at 1.13

Pattern detection uses a tolerance parameter (default 5%) to account for market imperfections. When a pattern is identified, it displays the pattern name and estimated success probability.
Risk Management System
The script includes a complete risk management framework:
Position Sizing: Calculates the appropriate position size based on:

Account size (user input)
Risk percentage per trade (user input)
Distance from entry to stop loss

Stop Loss: Automatically placed 0.5% above point X to protect against invalidation
Take Profit Levels:

TP1: 1.272 extension (customizable)
TP2: 1.618 extension (customizable)
TP3: 2.0 extension (customizable)

Risk/Reward Ratio: Displayed in the info panel, calculated as (Entry - TP3) / (Stop Loss - Entry)
Confluence Detection
When multiple Fibonacci levels converge within 0.5% of each other, the script highlights these zones with translucent boxes. These confluence zones often act as strong support/resistance areas and increase the probability of reversal.
Minimum confluence threshold is customizable (default: 2 levels).
Trend Filter
Optional moving average filter (default: 50-period SMA) helps validate that patterns are forming in the direction of the prevailing trend. When enabled with "Only Show Patterns in Trend Direction," the indicator will only display formations that align with a bearish trend (price below MA).

-How to Use

For Scalpers:
Select "Scalper" trading mode
Use lower timeframes (1m, 5m, 15m)
Focus on TP1 and TP2 levels
Tight stop loss above point X

For Day Traders:
Select "Day Trader" trading mode
Use medium timeframes (15m, 30m, 1H)
Target TP2 and TP3 levels
Monitor confluence zones for entry refinement

For Swing Traders:
Select "Swing Trader" trading mode
Use higher timeframes (4H, D)
Hold for TP3 or beyond
Use trend filter to confirm macro direction

Entry Strategy:
Wait for point D (PRZ) to be reached
Look for bearish confirmation (candlestick patterns, volume, momentum)
Enter short position at or near point D
Place stop loss above point X as indicated
Scale out at TP1, TP2, and TP3 levels

-Key Settings

General Settings:
Trading Mode: Presets optimized for different trading styles
Lookback Bars: Historical period for swing detection (10-200)
Min Swing Size: Minimum percentage move to validate formation (0.1-10%)

Fibonacci Levels:
Individual toggle and color customization for all 14 levels
Line thickness and style options (Solid/Dashed/Dotted)
Optional price and percentage labels
Left and right line extension

Harmonic Patterns:
Enable/disable specific pattern types
Pattern tolerance adjustment (1-15%)

Risk Management:
Account size input
Risk percentage per trade (0.5-10%)
Customizable TP level multipliers
Toggle stop loss and take profit displays

Display Options:
Show/hide XABCD lines
C target and D target (PRZ) visualization
Confluence zone highlights
Trend MA overlay
Information panel with trade statistics

Alert Settings:
Pattern completion alerts
C target hit notifications
Key Fibonacci level alerts

-Visual Features
Color-coded Fibonacci levels: Each level has a distinct color for easy identification
Dynamic XABCD lines: Yellow lines connect pattern formation points
Target projections: Magenta for C target, blue for D target (PRZ)
Risk management lines: Red for stop loss, green for take profits
Confluence boxes: Golden translucent boxes highlight key zones
Information panel: Top-right panel displays pattern type, entry, stop loss, TP3, R:R ratio, position size, and direction
Point labels: Clear X, A, B, C, D markers with hover tooltips showing exact prices

-Important Disclaimers
Risk Warning: Trading financial instruments involves substantial risk and may not be suitable for all investors. Past performance of any trading system or pattern is not necessarily indicative of future results.
No Repainting: This indicator does NOT repaint. All pattern detection and level calculations are based on confirmed price data at the close of each bar.
Backtesting Note: If used as a strategy with backtesting, ensure realistic parameters:

Use appropriate commission (0.1% or higher for most markets)
Include slippage (10+ ticks for liquid markets)
Risk no more than 2-5% of account per trade
Test on sufficient sample size (100+ trades minimum)

Manual Confirmation: This indicator is a tool to assist analysis, not a complete trading system. Always use additional confirmation from:

Price action analysis
Volume confirmation
Market context and news
Risk tolerance assessment

Harmonic Pattern Probabilities: The success rates shown (70-85%) are theoretical estimates based on historical studies and should not be interpreted as guarantees. Actual results will vary based on market conditions, execution timing, and individual risk management.

-Technical Details
Pine Script Version: v6 (latest)
Overlay: True (displays on price chart)
Maximum Objects: 500 lines, 500 labels, 500 boxes
Calculation Method: Swing high/low detection with percentage-based Fibonacci calculations
No Lookahead Bias: All calculations use confirmed historical data
Compatible Timeframes: All timeframes (1m to 1M), recommended 15m and above

-Differences from Bullish Version
This is the bearish version specifically designed for short positions:

X point is the swing HIGH (not low)
A point is the swing LOW (not high)
B retracement moves UP from A toward X
C target projects DOWN from B
D target (PRZ) is calculated ABOVE X for short entries
All Fibonacci levels are inverted for downward price movement
Pattern recognition logic adjusted for bearish structures

A companion bullish version is available separately for long position analysis.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.