The purpose of this indicator is to programmatically determine the type of price trend using tools.
You can do a quick check on the asset’s higher and lower time frames. For example, if you are trading on an H1 chart, you can check the m5 chart to ensure that the trend is in the same direction and similarly check the H4 chart to ensure that the higher time frame price is also moving in the same direction.
If charts confirm a similar trend, then it is considered a very strong trend and ideal for Trend trading.
By default, the last status is related to 8 periods before the latest closing price.
The three basic types of trends are up, down, and sideways.
An uptrend describes the price movement of a financial asset when the overall direction is upward. The uptrend is composed of higher swing lows and higher swing highs.
Some market participants ("long" trend traders) only choose to trade during uptrends.
A downtrend refers to the price action of a security that moves lower in price as it fluctuates over time.
The downtrend is composed of lower swing lows and lower swing highs.
A sideways trend is the horizontal price movement that occurs when the forces of are nearly equal. This typically occurs during a period of consolidation before the price continues a prior trend or reverses into a new trend.
How it works:
Step 1: Sideways Trend Detection
In this step we want to distinguish the sideways trend from uptrend and downtrend. For this purpose, we use two common tools: ATR and
The (ATR) is a indicator that measures market .
We also use a 20-period moving average of the ATR.
When the ATR is below the average of its last 20-periods, it means that the rate of price has decreased and we conclude that the current trend is sideways
2. ( )
The ( ) is a indicator used by some traders to determine the strength of a trend.
The trend has strength when is above 25.
So when the is less than or equal to 25, there is no strong trend, and we conclude that the current type of trend is sideways.
Step 2: Detect uptrend from downtrend
If it turns out that the current price trend is not sideways, then it is either uptrend or downtrend.
For this purpose, we use plus and minus directional Indicators (+ DI & ).
A general interpretation would be that during a strong trend, when is higher than , it is an uptrend. When is higher than , it is a downtrend.
"Use ATR …" ________________________// Use (ATR) to detect Sideways Movements
"ATR Length"_______________________ // length of the (ATR) used to detect Sideways Movements
"ATR Moving Average Type" ___________// Type of the moving average of the ATR used to detect Sideways Movements
"ATR MA Length" ____________________// length of the moving average of the ATR used to detect Sideways Movements
"Use ..."_______________________ // Use ( ) to detect Sideways Movements
"ADX Smoothing”____________________// length of the ( ) used to detect Sideways Movements
"DI Length"_________________________// length of the Plus and Minus Directional Indicators ( & ) used to determine the direction of the trend
"ADX Limit" ________________________// A level of used as the boundary between Trend Market and Sideways Market
"Smoothing Factor"__________________// Factor used for smoothing the oscillator
"Lag"______________________________// lag used to match indicator and chart
Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.