Smart Fib StrategySmart Fibonacci Strategy
This advanced trading strategy combines the power of adaptive SMA entries with Fibonacci-based exit levels to create a comprehensive trend-following system that self-optimizes based on historical market conditions. Credit goes to Julien_Eche who created the "Best SMA Finder" which received an Editors Pick award.
Strategy Overview
The Smart Fibonacci Strategy employs a two-pronged approach to trading:
1. Intelligent Entries: Uses a self-optimizing SMA (Simple Moving Average) to identify optimal entry points. The system automatically tests multiple SMA lengths against historical data to determine which period provides the most robust trading signals.
2. Fibonacci-Based Exits: Implements ATR-adjusted Fibonacci bands to establish precise exit targets, with risk-management options ranging from conservative to aggressive.
This dual methodology creates a balanced system that adapts to changing market conditions while providing clear visual reference points for trade management.
Key Features
- **Self-Optimizing Entries**: Automatically calculates the most profitable SMA length based on historical performance
- **Adjustable Risk Parameters**: Choose between low-risk and high-risk exit targets
- **Directional Flexibility**: Trade long-only, short-only, or both directions
- **Visualization Tools**: Customizable display of entry lines and exit bands
- **Performance Statistics**: Comprehensive stats table showing key metrics
- **Smoothing Option**: Reduces noise in the Fibonacci bands for cleaner signals
Trading Rules
Entry Signals
- **Long Entry**: When price crosses above the blue center line (optimal SMA)
- **Short Entry**: When price crosses below the blue center line (optimal SMA)
### Exit Levels
- **Low Risk Option**: Exit at the first Fibonacci band (1.618 * ATR)
- **High Risk Option**: Exit at the second Fibonacci band (2.618 * ATR)
Strategy Parameters
Display Settings
- Toggle visibility of the stats table and indicator components
Strategy Settings
- Select trading direction (long, short, or both)
- Choose exit method (low risk or high risk)
- Set minimum trades threshold for SMA optimization
SMA Settings
- Option to use auto-optimized or fixed-length SMA
- Customize SMA length when using fixed option
Fibonacci Settings
- Adjust ATR period and SMA basis for Fibonacci bands
- Enable/disable smoothing function
- Customize Fibonacci ratio multipliers
Appearance Settings
- Modify colors, line widths, and transparency
Optimization Methodology
The strategy employs a sophisticated optimization algorithm that:
1. Tests multiple SMA lengths against historical data
2. Evaluates performance based on trade count, profit factor, and win rate
3. Calculates a "robustness score" that balances profitability with statistical significance
4. Selects the SMA length with the highest robustness score
This ensures that the strategy's entry signals are continuously adapting to the most effective parameters for current market conditions.
Risk Management
Position sizing is fixed at $2,000 per trade, allowing for consistent exposure across all trading setups. The Fibonacci-based exit system provides two distinct risk management approaches:
- **Conservative Approach**: Using the first Fibonacci band for exits produces more frequent but smaller wins
- **Aggressive Approach**: Using the second Fibonacci band allows for larger potential gains at the cost of increased volatility
Ideal Usage
This strategy is best suited for:
- Trending markets with clear directional moves
- Timeframes from 4H to Daily for most balanced results
- Instruments with moderate volatility (stocks, forex, commodities)
Traders can further enhance performance by combining this strategy with broader market analysis to confirm the prevailing trend direction.
Fibonnacci
Fibonacci Swing Trading BotStrategy Overview for "Fibonacci Swing Trading Bot"
Strategy Name: Fibonacci Swing Trading Bot
Version: Pine Script v5
Purpose: This strategy is designed for swing traders who want to leverage Fibonacci retracement levels and candlestick patterns to enter and exit trades on higher time frames.
Key Components:
1. Multiple Timeframe Analysis:
The strategy uses a customizable timeframe for analysis. You can choose between 4hour, daily, weekly, or monthly time frames to fit your preferred trading horizon. The high and low-price data is retrieved from the selected timeframe to identify swing points.
2. Fibonacci Retracement Levels:
The script calculates two key Fibonacci retracement levels:
0.618: A common level where price often retraces before resuming its trend.
0.786: A deeper retracement level, often used to identify stronger support/resistance areas.
These levels are dynamically plotted on the chart based on the highest high and lowest low over the last 50 bars of the selected timeframe.
3. Candlestick Based Entry Signals:
The strategy uses candlestick patterns as the only indicator for trade entries:
Bullish Candle: A green candle (close > open) that forms between the 0.618 retracement level and the swing high.
Bearish Candle: A red candle (close < open) that forms between the 0.786 retracement level and the swing low.
When these candlestick patterns align with the Fibonacci levels, the script triggers buy or sell signals.
4. Risk Management:
Stop Loss: The stop loss is set at 1% below the entry price for long trades and 1% above the entry price for short trades. This tight risk management ensures controlled losses.
Take Profit: The strategy uses a 2:1 risk-to-reward ratio. The take profit is automatically calculated based on this ratio relative to the stop loss.
5. Buy/Sell Logic:
Buy Signal: Triggered when a bullish candle forms above the 0.618 retracement level and below the swing high. The bot then places a long position.
Sell Signal: Triggered when a bearish candle forms below the 0.786 retracement level and above the swing low. The bot then places a short position.
The stop loss and take profit levels are automatically managed once the trade is placed.
Strengths of This Strategy:
Swing Trading Focus: The strategy is ideal for swing traders, targeting longer-term price moves that can take days or weeks to play out.
Simple Yet Effective Indicators: By only relying on Fibonacci retracement levels and basic candlestick patterns, the strategy avoids complexity while capitalizing on well-known support and resistance zones.
Automated Risk Management: The built-in stop loss and take profit mechanism ensures trades are protected, adhering to a strict 2:1 risk/reward ratio.
Multiple Timeframe Analysis: The script adapts to various market conditions by allowing users to switch between different timeframes (4hour, daily, weekly, monthly), giving traders flexibility.
Strategy Use Cases:
Retracement Traders: Traders who focus on entering the market at key retracement levels (0.618 and 0.786) will find this strategy especially useful.
Trend Reversal Traders: The strategy’s reliance on candlestick formations at Fibonacci levels helps traders spot potential reversals in price trends.
Risk Conscious Traders: With its 1% risk per trade and 2:1 risk/reward ratio, the strategy is ideal for traders who prioritize risk management in their trades.
VWAP + Fibo Dev Extensions StrategyBased on my VWAP + Fibo deviations indicator, I tested some strategies to see if the indicator can be profitable; and I got it !
This strategy uses:
H1 timeframe
Weekly VWAP
+1.618 / +2.618 / -1.618 / -2.618 Deviations Extensions to create 2 bands
The value of the deviation
First, the 2 bands are plotted : +1.618/+2.618 painted in red and -1.618/-2.618 painted in lime.
Then, we wait for the deviation value to reach at least 150 (see thumbnail) to avoid littles moves when the gaps between bands are too short.
Entry long position :
first candle must crossunder the -1.618 level and low have to stay over the -2.618
low of the second one must stay in the lime band
enter the third one if the deviation value is over limit (150)
Exit long position :
TP : when a high crossover VWAP
SL : when a low crossunder -2.618
Entry short position :
first candle must crossover the +1.618 level and high have to stay under the +2.618
high of the second one must stay in the red band
enter the third one if the deviation value is over limit (150)
Exit short position :
TP : when a low crossunder VWAP
SL : when a high crossover +2.618
Notes :
this strategy uses pyramiding (5), be careful and calculate your risk management
the comission value is set to 0.08% to include slippages when entering a trade because of market orders
This strategy is not an advice to invest, make your own decisions.