BobRivera990

Trend Type Indicator by BobRivera990

Usage:

The purpose of this indicator is to programmatically determine the type of price trend using technical analysis 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 multiple time frame charts confirm a similar trend, then it is considered a very strong trend and ideal for Trend trading.

Remarks:
By default, the last status is related to 8 periods before the latest closing price.

Related definitions:

The three basic types of trends are up, down, and sideways.

1. Uptrend
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.

2. Downtrend
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.

3. Sideways
A sideways trend is the horizontal price movement that occurs when the forces of supply and demand 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 technical analysis tools: ATR and ADX

1. Average True Range (ATR)
The average true range (ATR) is a technical analysis indicator that measures market volatility .
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 volatility has decreased and we conclude that the current trend is sideways

2. Average Directional Index ( ADX )
The average directional index ( ADX ) is a technical analysis indicator used by some traders to determine the strength of a trend.
The trend has strength when ADX is above 25.
So when the ADX 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 & -DI ).
A general interpretation would be that during a strong trend, when +DI is higher than -DI , it is an uptrend. When -DI is higher than +DI , it is a downtrend.

Parameters:

"Use ATR …" ________________________// Use Average True Range (ATR) to detect Sideways Movements
"ATR Length"_______________________ // length of the Average True Range (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 ADX ..."_______________________ // Use Average Directional Index ( ADX ) to detect Sideways Movements
"ADX Smoothing”____________________// length of the Average Directional Index ( ADX ) used to detect Sideways Movements
"DI Length"_________________________// length of the Plus and Minus Directional Indicators ( +DI & -DI ) used to determine the direction of the trend
"ADX Limit" ________________________// A level of ADX 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

Resources:

https://www.investopedia.com/
開源腳本

秉持真正的TradingView精神,該腳本的作者將其開源發佈,因此交易者可以理解和驗證它。為作者加油!您可以免費使用它,但是在發佈中重複使用此程式碼受網站規則的約束。您可以把它加入到常用以在圖表上使用它。

想在圖表上使用此腳本?

評論

thanks!
200 代幣
+3 回覆
500 代幣
+2 回覆
BobRivera990 LonesomeTheBlue
@LonesomeTheBlue,
Dear Master, Thank you for your support and attention :)
+1 回覆
500 代幣
+2 回覆
200 代幣
+1 回覆
100 代幣
+1 回覆
@PineCoders, Do you guys even check something before putting in editors pick? This runs on delay.

Have you guys even read the description?
Remarks:
By default, the last status is related to 8 periods before the latest closing price. What do you think it means? It has minimum lag of 8 periods which can be extended to 15.

This indicator is a stupid joke on the name of this community. I mean there are far more better indicators out there. I guess I,m not supposed to any links here other wise I'd posted a video showing each and everything here. If it had the option of switching on/off lag this may be considered but I guess doing that the author wont be able to find a single screenshot.
No offence to the author ,I have no hard feeling for ya man.
+33 回覆
PineCoders TitanQred
@TitanQred, We not only we read the description and code of our Editors Picks, we do it for ALL open-source scripts published on the platform. There is nothing inherently wrong with the fact that the indicator displays late information; it's what most pivot, zig zag and many other indicators do, and contrary to many other authors of those scripts, this one mentions it.

Our Editors' Picks strive to achieve a diversity reflecting that of TradingViewers, which necessarily entails that not all our selections will be useful or interesting to all traders. While you may not find this selection suitable for you, we hope you can allow us to entertain the hope that others will.
+13 回覆
TitanQred PineCoders
@PineCoders, Just like what you said, my comment will certainly help others.
+5 回覆