Fibonacci Retracements & Trend Following Strategy V2This 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
Tradingstrategy
ARIMA Indicator with Optional SmoothingOverview
The ARIMA (AutoRegressive Integrated Moving Average) Indicator is a powerful tool used to forecast future price movements by combining differencing, autoregressive, and moving average components. This indicator is designed to help traders identify trends and potential reversal points by analyzing the historical price data.
Key Features
AutoRegressive Component (AR): Utilizes past values to predict future prices.
Moving Average Component (MA): Averages past price differences to smooth out noise.
Differencing: Reduces non-stationarity in the time series data.
Optional Smoothing: Applies EMA to the ARIMA output for a smoother signal.
Customizable Parameters: Allows users to adjust AR and MA orders, differencing periods, and smoothing lengths.
Concepts Underlying the Calculations
Differencing: Subtracts previous prices from current prices to remove trends and seasonality, making the data stationary.
AutoRegressive Component (AR): Predicts future prices based on a linear combination of past values.
Moving Average Component (MA): Uses past forecast errors to refine future predictions.
Exponential Moving Average (EMA): Applies more weight to recent prices, providing a smoother and more responsive signal.
How It Works
The ARIMA Indicator first calculates the differenced series to achieve stationarity. Then, it computes the simple moving average (SMA) of this differenced series. The indicator uses the AR and MA components to adjust the SMA, creating an approximation of the ARIMA model. Finally, an optional smoothing step using EMA can be applied to the ARIMA approximation to produce a smoother signal.
How Traders Can Use It
Traders can use the ARIMA Indicator to:
Identify Trends: Detect emerging trends by observing the direction of the ARIMA line.
Spot Reversals: Look for divergences between the ARIMA line and the price to identify potential reversal points.
Generate Trading Signals: Use crossovers between the ARIMA line and the price to generate buy or sell signals.
Filter Noise: Enable the optional smoothing to filter out market noise and focus on significant price movements.
Example Usage Instructions
Add the ARIMA Indicator to your chart.
Adjust the input parameters to suit your trading strategy:
Set the SMA Length (e.g., 14).
Choose the Differencing Period (e.g., 1).
Define the AR Order (p) and MA Order (q) (e.g., 1).
Configure the Smoothing Length if smoothing is desired (e.g., 5).
Enable or disable smoothing as needed.
Observe the ARIMA line (blue) and compare it to the price chart.
Use the ARIMA line to identify trends and potential reversals.
Implement trading decisions based on the ARIMA line’s behavior relative to the price.
TSI w SuperTrend decision - Strategy [presentTrading]This strategy aims to improve upon the performance of Traidngview's newly published "Trend Strength Index" indicator by incorporating the SuperTrend for better trade execution and risk management. Enjoy :)
█ Introduction and How it is Different
The "TSI with SuperTrend Decision - Strategy" combines the Trend Strength Index (TSI) with SuperTrend indicators to determine entry and exit points. Unlike traditional strategies that rely solely on one indicator, this method leverages the strengths of both TSI and SuperTrend to provide a more nuanced and adaptive trading strategy.
This dual approach allows for capturing trends more effectively, especially in volatile markets.
BTCUSD 8h LS Performance
█ Strategy, How it Works: Detailed Explanation
🔶 Trend Strength Index (TSI)
The TSI is a momentum oscillator that shows both the direction and strength of a trend. It is calculated by comparing the price movement with the bar index over a specified period. The formula for TSI is as follows:
```
TSI = (PC / |PC|)
where:
PC = Change in price over the period
```
In this strategy, TSI is calculated using the closing prices and a default period of 64 bars. The TSI values help identify overbought and oversold conditions, providing signals for potential market reversals.
🔶 SuperTrend Indicator
The SuperTrend is a trend-following indicator based on the average true range (ATR). It helps in identifying the direction of the market trend. The SuperTrend calculation involves:
```
SuperTrend = HLC3 ± (Factor * ATR)
where:
HLC3 = (High + Low + Close) / 3
Factor = User-defined multiplier
ATR = Average True Range over a period
```
The SuperTrend settings in this strategy include a length of 10 bars and a factor of 3.0.
Last Bull Cycle of BTC
🔶 Entry and Exit Conditions
The strategy uses the TSI and SuperTrend together to determine entry and exit points:
- Long Entry: When the SuperTrend indicates a downward trend (st.d < 0) and the TSI is above the oversold level (-0.241).
- Long Exit: When the SuperTrend indicates an upward trend (st.d > 0) and the TSI is below the overbought level (0.241).
- Short Entry: When the SuperTrend indicates an upward trend (st.d > 0) and the TSI is below the overbought level (0.241).
- Short Exit: When the SuperTrend indicates a downward trend (st.d < 0) and the TSI is above the oversold level (-0.241).
█ Trade Direction
The strategy allows users to select the trade direction through the `tradeDirection` input. The options are:
- Both: Enables both long and short trades.
- Long: Enables only long trades.
- Short: Enables only short trades.
█ Default Settings
- TSI Length: 64
- SuperTrend Length: 10
- SuperTrend Factor: 3.0
- Trade Direction: Both
- Take Profit (%): 30.0
- Stop Loss (%): 20.0
Impact of Default Settings
- TSI Length: A longer TSI period smooths out noise but may lag in identifying trends. A shorter period is more responsive but can generate false signals.
- SuperTrend Length: A shorter length provides quicker signals but can be prone to whipsaws. A longer length is more reliable but may delay entries and exits.
- SuperTrend Factor: A higher factor increases the distance of the SuperTrend from the price, reducing sensitivity to minor price fluctuations.
- Trade Direction: Allows flexibility in trading strategies by enabling both long and short trades based on market conditions.
- Take Profit and Stop Loss: These settings manage risk by automatically closing trades at predefined profit or loss levels. Higher percentages provide larger potential gains but also higher risk.
Persistent Homology Based Trend Strength OscillatorPersistent Homology Based Trend Strength Oscillator
The Persistent Homology Based Trend Strength Oscillator is a unique and powerful tool designed to measure the persistence of market trends over a specified rolling window. By applying the principles of persistent homology, this indicator provides traders with valuable insights into the strength and stability of uptrends and downtrends, helping to inform better trading decisions.
What Makes This Indicator Original?
This indicator's originality lies in its application of persistent homology , a method from topological data analysis, to financial markets. Persistent homology examines the shape and features of data across multiple scales, identifying patterns that persist as the scale changes. By adapting this concept, the oscillator tracks the persistence of uptrends and downtrends in price data, offering a novel approach to trend analysis.
Concepts Underlying the Calculations:
Persistent Homology: This method identifies features such as clusters, holes, and voids that persist as the scale changes. In the context of this indicator, it tracks the duration and stability of price trends.
Rolling Window Analysis: The oscillator uses a specified window size to calculate the average length of uptrends and downtrends, providing a dynamic view of trend persistence over time.
Threshold-Based Trend Identification: It differentiates between uptrends and downtrends based on specified thresholds for price changes, ensuring precision in trend detection.
How It Works:
The oscillator monitors consecutive changes in closing prices to identify uptrends and downtrends.
An uptrend is detected when the closing price increase exceeds a specified positive threshold.
A downtrend is detected when the closing price decrease exceeds a specified negative threshold.
The lengths of these trends are recorded and averaged over the chosen window size.
The Trend Persistence Index is calculated as the difference between the average uptrend length and the average downtrend length, providing a measure of trend persistence.
How Traders Can Use It:
Identify Trend Strength: The Trend Persistence Index offers a clear measure of the strength and stability of uptrends and downtrends. A higher value indicates stronger and more persistent uptrends, while a lower value suggests stronger and more persistent downtrends.
Spot Trend Reversals: Significant shifts in the Trend Persistence Index can signal potential trend reversals. For instance, a transition from positive to negative values might indicate a shift from an uptrend to a downtrend.
Confirm Trends: Use the Trend Persistence Index alongside other technical indicators to confirm the strength and duration of trends, enhancing the accuracy of your trading signals.
Manage Risk: Understanding trend persistence can help traders manage risk by identifying periods of high trend stability versus periods of potential volatility. This can be crucial for timing entries and exits.
Example Usage:
Default Settings: Start with the default settings to get a feel for the oscillator’s behavior. Observe how the Trend Persistence Index reacts to different market conditions.
Adjust Thresholds: Fine-tune the positive and negative thresholds based on the asset's volatility to improve trend detection accuracy.
Combine with Other Indicators: Use the Persistent Homology Based Trend Strength Oscillator in conjunction with other technical indicators such as moving averages, RSI, or MACD for a comprehensive analysis.
Backtesting: Conduct backtesting to see how the oscillator would have performed in past market conditions, helping you to refine your trading strategy.
Advanced Fractal and Hurst IndicatorAdvanced Fractal and Hurst Indicator (AFHI)
Description:
The Advanced Fractal and Hurst Indicator (AFHI) is a custom technical analysis tool designed to identify market trends and potential reversals by leveraging the concepts of Fractal Dimension and the Hurst Exponent . These advanced mathematical concepts provide insights into the complexity and persistence of price movements, making this indicator a powerful addition to any trader's toolkit.
How It Works:
Fractal Dimension (FD) :
The Fractal Dimension measures the complexity of price movements. A higher Fractal Dimension indicates a more complex, choppy market, while a lower value suggests smoother trends.
The FD is calculated using the log difference of price movements over a specified length.
Hurst Exponent (HE) :
The Hurst Exponent indicates the tendency of a time series to either regress to the mean or cluster in a direction. Values below 0.5 indicate a tendency to revert to the mean (mean-reverting), while values above 0.5 suggest a trending market.
The HE is calculated using the rescaled range method, comparing the range of price movements to the standard deviation.
Composite Indicator :
The Composite Indicator combines the smoothed Fractal Dimension and Hurst Exponent to provide a single value indicating market conditions. This is done by normalizing the FD and HE values and combining them into one metric.
A positive Composite Indicator suggests an uptrend, while a negative value indicates a downtrend.
Smoothing :
Both FD and HE values are smoothed using a simple moving average to reduce noise and provide clearer signals.
Trend Confirmation :
A 50-period moving average (MA) is used to confirm the trend direction. The price being above the MA indicates an uptrend, while below the MA indicates a downtrend.
Background Shading :
The indicator pane is shaded green during uptrend conditions (positive Composite Indicator and price above MA) and red during downtrend conditions (negative Composite Indicator and price below MA).
How Traders Can Use It:
Identifying Trends :
Traders can use the AFHI to identify current market trends. The background shading in the indicator pane provides a visual cue for trend direction, with green indicating an uptrend and red indicating a downtrend.
Trend Confirmation :
The Composite Indicator line, plotted in purple, helps confirm the trend. Positive values suggest a strong uptrend, while negative values indicate a strong downtrend.
Entry and Exit Signals :
Traders can use the transitions of the Composite Indicator and the background shading to time their entry and exit points. For instance, a shift from red to green shading suggests a potential buy opportunity, while a shift from green to red suggests a potential sell opportunity.
Alerts :
The script includes alert conditions that can notify traders when the Composite Indicator signals a new trend direction. Alerts can be set up for both uptrends and downtrends, helping traders stay informed of key market changes.
Strategy Development :
By integrating AFHI into their trading strategies, traders can develop more robust systems that account for market complexity and persistence. The indicator can be used alongside other technical tools to enhance decision-making and improve trade accuracy.
Heikin Ashi ROC Percentile Strategy**User Guide for the "Heikin Ashi ROC Percentile Strategy"**
This strategy, "Heikin Ashi ROC Percentile Strategy", is designed to provide an easy-to-use framework for trading based on the Heikin Ashi Rate of Change (ROC) and its percentiles.
Here's how you can use it:
1. **Setting the Start Date**: You can set the start date for the strategy in the user inputs at the top of the script. The variable `startDate` defines the point from which the script begins executing trades. Simply input the desired date in the format "YYYY MM DD". For example, to start the strategy from March 3, 2023, you would enter `startDate = timestamp("2023 03 03")`.
2. **Adjusting the Midline, Lookback Period, and Stop Loss Level**: The `zerohLine`, `rocLength`, and `stopLossLevel` inputs allow you to adjust the baseline for ROC, the lookback period for the SMA and ROC, and the level at which the strategy stops the loss, respectively. By tweaking these parameters, you can fine-tune the strategy to better suit your trading style or the particular characteristics of the asset you are trading.
3. **Understanding the Trade Conditions**: The script defines conditions for entering and exiting long and short positions based on crossovers and crossunders of the ROC and the upper and lower "kill lines". These lines are defined as certain percentiles of the ROC's highest and lowest values over a specified lookback period. When the ROC crosses above the lower kill line, the script enters a long position; when it crosses below the upper kill line, it exits the position. Similarly, when the ROC crosses below the upper kill line, the script enters a short position; when it crosses above the lower kill line, it exits the position.
In my testing, this strategy performed best on a day and hour basis. However, I encourage you to experiment with different timeframes and settings to see how the strategy performs under various conditions. Remember, there's no one-size-fits-all approach to trading; what works best will depend on your specific circumstances, goals, and risk tolerance.
If you find other useful applications for this strategy, please let me know in the comments. Your feedback is invaluable in helping to refine and improve this tool. Happy trading!
FuriousFX Trading Confirmation ListThis is a simple script that allows user to define the confirmations, position them (pin them) to the top middle bottom left or right on the screen and check them off
Once the user checks the confirmation it changes from red or any other default color to green (indicating it has played out).
There are similar script out there but what makes this script unique is one how it is generated and more importantly the mechanism of changing color.. You also have the option to pick from a pick list in the options of how many (up to 10) confirmations you want to generate and you can define change them at any time..
To use this script simply do the following :
1) add it to your chart, double click on the default table
2)select the desired number of confirmations
3)Select the desired position and default colors (default is top right and dark red)
4)Define your criteria for confirmations in appropriate boxes by writing over the default values
5)Start using it, when you see your desired confirmation, double click on the table again and select "Confirmed?" check box.. Once selected the color of that confirmation will turn green...
This script is done to keep people disciplined and enter only according to their trading strategy, as we all know that the biggest reason why people lose in trading is impatience fear and greed...
This script attemps to solve problems of overtrading, entering too early or too late..
Hope you guys enjoy it..
Feel free to write comments for improvements or copy it for your needs.
SP IndicatorSP Indicator - One of the best indicators for scalping trading on any timeframes. The best readings are given on 5, 15 and 30 minute frames.
For readings, several indicators are combined into one, which allows you to get a more accurate forecast, which is more than 90%.
Instruction.
The indicator is easy to use. Just install it and follow the arrows to go long or short. Stop loss set small, about 1-2%. In most cases, this is sufficient.
Good luck in bidding!
Three EMA Crossover Trading StrategyUse it with any forex currency pair or any stock with any timeframe.
It is a trend following trading strategy so works best in trending market.
So once you identify the market is trading you just simply use this trading strategy.
Video Explanation : Youtube
Detail Explanation : www.peopleisliking.com