OPEN-SOURCE SCRIPT
AB=CD Fibonacci Strategy (One Trade at a Time)

AB=CD Fibonacci Strategy - Harmonic Pattern Trading Bot
Description
An automated trading strategy that identifies and trades the classic AB=CD harmonic pattern, one of the most reliable geometric price formations in technical analysis. This strategy detects perfectly proportioned Fibonacci retracement setups and executes trades with precise risk-reward management.
How It Works
The indicator scans for the AB=CD pattern structure:
Leg AB: Initial swing from pivot point A to pivot point B
Leg BC: Retracement to point C (customizable Fibonacci levels)
Leg CD: Mirror projection equal to the AB leg length
When price touches point D, the strategy automatically enters a position with predefined take-profit and stop-loss levels based on your risk-reward ratio.
Key Features
One Trade at a Time: Ensures disciplined position management by allowing only one active trade per pattern
Customizable Fibonacci Retracement: Set your preferred retracement range for point C (default 50% - 78.6%)
Risk-Reward Control: Adjust stop-loss and take-profit multiples to match your trading plan
Visual Pattern Display: Clear labeling of A, B, C, D points with pattern lines for easy identification
Both Directions: Identifies bullish and bearish AB=CD patterns automatically
Ideal For
Swing traders on higher timeframes (4H, Daily, Weekly)
Harmonic pattern traders seeking automation
Traders wanting precise entry and exit rules based on Fibonacci geometry
Those looking to reduce emotional trading and increase consistency
Default Settings Optimized For
NASDAQ futures and currency pairs
Medium timeframe analysis
Conservative risk management (10% position size per trade)
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.