OPEN-SOURCE SCRIPT

Fibonacci Retracements & Trend Following Strategy V2

This Pine Script strategy generates trading signals using Fibonacci levels and trend-following indicators.

1. Strategy Summary
This strategy analyzes price movements using a combination of Fibonacci levels and trend-following indicators, providing potential trading signals. The strategy includes Fibonacci levels as well as EMA (Exponential Moving Average) and ADX (Average Directional Index) indicators.

2. Indicators and Parameters

Fibonacci Levels

Fibonacci Level 1, Level 2, Level 3, Level 4: Used as Fibonacci retracement levels. These levels are typically set at 0.236, 0.382, 0.618, and 0.786. Users can adjust these values according to their preferences.
Trend-Following Indicator

Trend Length: The period for calculating the EMA used as the trend-following indicator. For example, if set to 20, the EMA will be calculated over 20 periods.
ADX (Average Directional Index)

ADX Length: The period for calculating the ADX. ADX measures the strength of the price trend and is usually set to 14 periods.
ADX Threshold: A threshold value for the ADX. This value determines when trading signals will be activated.

3. Usage Steps

Displaying the Indicator on the Chart:

On the TradingView platform, paste the code into the Pine Editor and click the "Add to Chart" button to add it to the chart.
Analyzing the Indicators:

Fibonacci Levels: Show retracement levels of price movements. When the price reaches one of these levels, potential reversals may occur.
Trend-Following Indicator: EMAs determine the direction of the trend. Green EMA represents an uptrend, while red EMA represents a downtrend.
ADX: Measures the strength of the trend. When ADX surpasses the threshold value, it indicates a strong trend.
Trading Signals:

Long Signal: Generated when the price is above the second Fibonacci level and the trend is upward. Additionally, the ADX value must be above the set threshold.
Short Signal: Generated when the price is below the second Fibonacci level and the trend is downward. Additionally, the ADX value must be above the set threshold.
Target Prices:

Long Targets: Determines upward targets based on Fibonacci levels. These targets indicate expected prices if the price reverses from Fibonacci levels.
Short Targets: Determines downward targets based on Fibonacci levels. These targets indicate expected prices if the price reverses from Fibonacci levels.

4. Chart Displays

Trend Up (Green Line): Shows the rising EMA.
Trend Down (Red Line): Shows the falling EMA.
Fibonacci Levels (Blue Lines): Shows Fibonacci retracement levels.
Long Targets (Green Circles): Shows targets for long positions.
Short Targets (Red Circles): Shows targets for short positions.
Long Signal (Green Label): Buy signal.
Short Signal (Red Label): Sell signal.

5. Important Notes

Retracement and Target Levels: Fibonacci levels can act as potential retracement or support/resistance levels. However, they should always be used in conjunction with other technical analysis tools.
Trend and ADX: ADX is used to determine the strength of the trend. Be aware that when ADX is low, trends may be weak.

6. Example Scenarios

Example 1: If the trend is upward (green EMA) and the price is above the second Fibonacci level, you may receive a long position signal. If the ADX value is above the threshold, the signal may be stronger.
Example 2: If the trend is downward (red EMA) and the price is below the second Fibonacci level, you may receive a short position signal. If the ADX value is above the threshold, the signal may be stronger.

This updated version contains significant improvements in both technical aspects and user experience. Innovations such as ADX calculations and dynamic Fibonacci levels make the strategy more robust and flexible. The code's readability and comprehensibility have been enhanced, and errors have been corrected.

This guide will help you understand the basic operation of the strategy. It is always recommended to conduct your own research and test the strategy before using it.


GOOD LUCK. // halilvarol
ADXchartanalysiscryptotradingeducationalEMASFibonacci RetracementPine utilitiesTechnical AnalysistradingsignalstradingstrategyTrend Analysistrendfollowing

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明