Trend Type Indicator

Trend Type Indicator

Trend Type Indicator 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.

Types of trends

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.

* Original description from author: BobRivera990

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
kats Bonsoir, cet indicateur est vraiment très bien avec plusieurs possibilités en coloration . ...
roccafragius Thank you Ivan for your indicators, very very interesting!!!!
kats Bonsoir, Pensez vous pouvoir répondre à ma question posée ci dessus? Ce serait vraiment tr...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván Hi! You should change $rbox, $gbox and $bbox variables. Also r,g,b for last box.
finplus Thanks Ivan.
roccafragius Ivan, I just want to say you.. very very great job!!!! Thank you so much for this indicator!...
Iván
3 weeks ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
MaoRai54 Thanks, now it's OK. in your first code at line 15-16 it's missing.
Madrosat Hello Ivan Did you try a strategy with this indicator
Iván Hi. No I didn't. This is a code translation requested by an user a few days ago.
Iván
2 months ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
Iván
3 months ago
Madrosat Hello Ivan You have interesting topics on indicators , smart supertrend, optimised trend t...
Iván Hi! thanks. All of these codes are translations requested in the forum. I've on mind to back...
Raspete01 Buenos días Iván, estoy intentando llevar el código eliminando los colores y pasando un Back...
ARLEQUIN49 Hello Ivan, Would it be possible to convert the code of this QQE MOD indicator which accomp...
ARLEQUIN49 here is the code: //@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = i...
Iván Hi, Yes I can translate it but please, create a new topic for it.
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
9 months ago
B-Xtrender
B-Xtrender
8
Indicators
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
P. Marlowe Very poweful indeed. It deserves close attention. I really appreciate very much IFTA backgro...
JS
9 months ago
Trendilo
Trendilo
0
Indicators

Top