OPEN-SOURCE SCRIPT

Script_Algo - Fibo Correction Strategy

1 108
🔹 Core Concept
The strategy is built on combining Fibonacci retracement levels, candlestick pattern confirmation, and trend filtering for trade selection. It performs well on the 1-hour timeframe across many cryptocurrency pairs. Particularly on LINKUSDT over the past year and a half, despite the not very optimal 1:1 risk/reward ratio.

The logic is simple: after a strong impulse move, the price often retraces to key Fibonacci levels (specifically, the 61.8% level). If a confirming candlestick (pattern) appears at this moment, the strategy looks for an entry in the direction of the main trend.

🔹 Indicators Used in the Strategy
ATR (Average True Range) — Used to calculate the stop-loss and take-profit levels.

EMA (9 and 21) — Additional moving averages for assessing the direction of movement (not directly used in entry conditions, but the logic can be expanded to include them).

SMA (Trend Filter, 20 by default) — The trend direction filter. Trades are only opened in its direction.

Fibonacci Levels — The 61.8% retracement level is calculated based on the high and low of the previous candle.

🔹 Entry Conditions
🟢 Long (Buy):

Previous Candle:

Must be green (close higher than open).

Must have a body not smaller than a specified minimum.

The upper wick must not exceed 30% of the body size.

→ This filters out "weak" or "indecisive" candles.

Current Candle:

Price touches or breaches the Fibonacci 61.8% retracement level from the previous range.

Closes above this level.

Closes above the Trend Filter (SMA) line.

A position is opened only if there are no other open trades at the moment.

🔴 Short (Sell):

Previous Candle:

Must be red (close lower than open).

Must have a body not smaller than a specified minimum.

The lower wick must not exceed 30% of the body size.

Current Candle:

Price touches or breaches the Fibonacci 61.8% retracement level from the previous range.

Closes below this level.

Closes below the Trend Filter (SMA) line.

A trade is opened only if there are no other open positions.

🔹 Risk Management
Stop-Loss = ATR × multiplier (default is 5).

Take-Profit = ATR × the same multiplier.

Thus, the default risk/reward ratio is 1:1, but it can be easily adjusted by changing the coefficient. Although, strangely enough, this ratio has shown the best results on some assets on the 1-hour timeframe.

🔹 Chart Visualization
Fibonacci level for Long — Green line with circles.

Fibonacci level for Short — Red line with circles.

Trend Filter line (SMA) — Blue.

🔹 Strengths of the Strategy
✅ Utilizes a proven market pattern — retracement to the 61.8% level.
✅ Further filters entries using trend and candlestick patterns.
✅ Simple, transparent logic that is easy to expand (e.g., adding other Fib levels, an EMA filter, etc.).

🔹 Limitations
⚠️ Performs better in trending markets; can generate false signals during ranging (sideways) conditions.
⚠️ The fixed 1:1 risk/reward ratio is not always optimal and could be refined.
⚠️ Performance depends on the selected timeframe and ATR parameters.

📌 Summary:
The strategy seeks corrective entries in the direction of the trend, confirmed by candlestick patterns. It is versatile and can be applied to forex pairs, cryptocurrencies, and stocks.

⚠️ Not financial advice. Pay close attention to risk management to avoid blowing your account. The strategy is not repainting — I have personally verified it through real testing — but it may not necessarily replicate the same results in the future, as the market is constantly changing. Test it, profit, and good luck to everyone!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。