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
Nicolas change the last line with: return v coloured(r,g,b) style(line,2), v+band coloured(168,168,1...
Paolo.B Thanks ... works as i wanted.
Kanamax Bonjour Nicolas, comme Paolo.B je souhaiterais utiliser cette indicateur au sein d'un code. ...
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
StephFor //ind1 = ZigZagPoint[2*averagetruerange[200]](close) avr = 3 //3% ind1 = ZigZag[avr](close...
Manu L. @Steph un grand merci pour ton aide mais :-( J'ai copier le code tel quel mais cependant j...
AlphaMauss Je n'ai pas réussi à faire fonctionner l'indicateur avec le code fourni en commentaire sur P...
Daniele Maddaluno Écrivez-moi où vous préférez you can easily find me on LinkedIn
AK27 C'est payant visiblement sur linkdin je peux pas vous envoyer, discord vous avez ?
Nicolas C'est dans ce sujet: https://www.prorealcode.com/topic/trendline-une-approche-du-trading/ M...
Pensera Bonjour Nicolas, comment est-il possible de backtester cet indicateur? cela fait une erreu...
Nicolas Oui bien sûr, il doit y avoir pas mal de sujets dans le forum à ce propos.
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Nicolas Oui c'est possible. Merci de ne pas poster des demandes qui sont hors sujets. Pour les deman...
Igor Merci pour cet itf. Question : comment faire pour instruire un screener ?
Nicolas tester le croisement du Close avec la première valeur de l'indicateur : "TrailingStop", faci...
Guillaume Mcm I gave the above message fix ;)
Tradingrob Is it possible to put the itf-file in the right way here in Prorealcode? so the right 'trend...
Guillaume Mcm Update link ;) https://www.prorealcode.com/topic/trend-histogramme-cci-mise-a-jour-suite-...
woktrade Superbe !
Vonasi An updated version with a bug fix can be found here: https://www.prorealcode.com/topic/dis...
snucke hey Vonasi is it possible you can help me get this indicator to show how much a market mo...
Screw27 Hi man, I installed the indicator and i don't know why but my graph it is so big
HelixKing sounds interesting I'll take a look
Godo Bonjour Souhait Sam, Après de nombreux essais pour le mettre en format afin d'utiliser ce c...
Nicolas Il faut supprimer celles qui existent dans la fenêtre d'optimisation et les créer en dur dan...
crusoe76 hi there, anyone can help making this strategy work, i have a message saying replace variabl...
Screw27 Salut nicolas j'aimerais savoir tes résulats grace a cettte methode
eva.g.forsgren It dose not work, I get a strap instead of candels???????????????????????????????????????????
Nicolas That indicator is the one below the chart. The indicator to put on the price chart is this o...
pyhrus P.S : IG , que j'ai contacté ,m'indique que la version V11 , ne sera pas disponible avant un...
Hasardeur Dear Nicolas, is there someting at the arry to modify in order to run the trend at the actu...
MALIMALO Dear Nicolas, just try touse your indicator with backtest but it's not working. is anybody...
ribes65 Bonjour Nicolas, Merci pour votre travail. Est-il envisageable de créer un screener pour ...
Nicolas Bien sûr, merci de formuler une demande dans le forum des screeners pour prorealtime. En res...
ipbvba Est il possible de le transformer en indicateur (pour ne plus avoir les lignes mais uniqueme...

Top