OPEN-SOURCE SCRIPT
已更新 [blackcat] L1 Richard Poster Trend Persistence

Level 1
Background
In Traders’ Tips of February 2021, the focus is Richard Poster’s article in the February 2021 issue, “Trend Strength: Measuring The Duration Of A Trend”.
Function
In his article in this issue, Richard Poster outlines several common ways to evaluate the strength and duration of trends. Then he evaluates their sensitivity to volatility. Next, he steps up our game a bit by proposing an indicator that seeks to measure a trend’s persistence rate, or TPR for short. TPR turns out to be relatively insensitive to the influence of volatility.
Financial markets are not stationary; price curves can swing all the time between trending, mean-reverting, or entire randomness. Without a filter for detecting trend regime, any trend-following strategy will bite the dust sooner or later. In his article in this issue, Richard Poster offers a trend persistence indicator (TPR) for helping to avoid unprofitable market periods.The TPR indicator measures the steepness of a SMA (simple moving average) slope and counts the bars where the slope exceeds a threshold. The more steep bars, the more trending the market. Threshold, TPR period, and SMA period are the parameters of the TPR indicator.
Remarks
This is a Level 1 free and open source indicator.
Feedbacks are appreciated.
Background
In Traders’ Tips of February 2021, the focus is Richard Poster’s article in the February 2021 issue, “Trend Strength: Measuring The Duration Of A Trend”.
Function
In his article in this issue, Richard Poster outlines several common ways to evaluate the strength and duration of trends. Then he evaluates their sensitivity to volatility. Next, he steps up our game a bit by proposing an indicator that seeks to measure a trend’s persistence rate, or TPR for short. TPR turns out to be relatively insensitive to the influence of volatility.
Financial markets are not stationary; price curves can swing all the time between trending, mean-reverting, or entire randomness. Without a filter for detecting trend regime, any trend-following strategy will bite the dust sooner or later. In his article in this issue, Richard Poster offers a trend persistence indicator (TPR) for helping to avoid unprofitable market periods.The TPR indicator measures the steepness of a SMA (simple moving average) slope and counts the bars where the slope exceeds a threshold. The more steep bars, the more trending the market. Threshold, TPR period, and SMA period are the parameters of the TPR indicator.
Remarks
This is a Level 1 free and open source indicator.
Feedbacks are appreciated.
發行說明
OVERVIEWThe [blackcat] L1 Richard Poster Trend Persistence indicator measures the duration and strength of trends in the market. By analyzing the persistence of uptrends and downtrends, this script provides insights into trend continuity and helps traders identify potential entry and exit points. It plots a ratio indicating trend strength and generates buy/sell signals along with alerts 📊↗️.
FEATURES
Measures trend persistence over a specified length.
Calculates a trend persistence ratio based on consecutive uptrend and downtrend counts.
Plots the trend persistence ratio with dynamic coloring:
Gradient colors representing trend strength.
Generates buy and sell signals based on crossover and crossunder conditions 🚀📉
Adds visual labels for easy identification of trade signals:
"Buy" labeled in green during upward crosses.
"Sell" labeled in red during downward crosses.
Provides alert conditions for both buy and sell signals 🔔
HOW TO USE
Add the indicator to your TradingView chart by selecting it from the indicators list.
Monitor the plotted trend persistence ratio for changes in trend strength.
Observe the buy ("Buy") and sell ("Sell") labels on the chart for potential trade opportunities.
Set up alerts based on the generated signals to receive notifications when conditions are met 📲.
Combine this indicator with other tools for confirmation before making trading decisions.
INPUT PARAMETERS
Trend Persistence Length: Define the number of bars used to measure trend persistence (default is 20).
SMA Length: Specify the Simple Moving Average (SMA) length (default is 5).
Threshold Fixed: Set the fixed threshold value for determining uptrends and downtrends (default is 1.0).
Multiplier: Choose the multiplier factor for calculating SMA differences (default is 10).
Price Point: Define the price point increment (default is 0.01).
LIMITATIONS
The indicator might generate false signals in choppy or ranging markets 🌪️.
Users should always confirm signals with other forms of analysis.
The effectiveness of the indicator depends on the chosen parameters.
NOTES
Ensure that you have sufficient historical data available for accurate calculations.
Test the indicator thoroughly on demo accounts before applying it to live trading 🔍.
Adjust the input parameters to fit different market conditions and timeframes.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。