Trends indicator

Trends indicator

Hi,
This is my first development.
And I’m happy to share it with you.

This is a simple indicator to identify a trend.
Using the position of the moving averages.

If the short average above the long average = trend increases
But, if the long average above the short average = trend declines.

So far everything is simple,
The idea in this indicator is that it does not tell when the short average began to rise above the long average
But counting the number of candles chosen – and only if during all this time they are still arranged in the same order – he will signal.

Reading the signals:
0 = No trend
1 = upward trend
1 = downward trend

The following data is subject to change:
– Number of candles in the short average.
– The number of candles of the long average.
– Number of candles that the indicator will count (before the signal).

I personally think of using it as a database for scanning.
But it can also be used for other things …

I’m happy to share this with everyone. Because I believe that in this way we can all contribute to each other for progress and success.

Note: I’d love to get ideas for improving …

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

  1. David • 05/21/2017 #

    Balance thanks for sharing this excellent indicator. 
    Here are some thoughts.

     please add comments to code (many people here are not coders and would greatly benefit from comments to understand and learn learn from you)
    reviewing the indicator visually It seems to be reasonable at picking a change to the trend but of course we are dealing with historic data so it’s lagging and will always be. In my reading people suggest weighting the newer data over the older data – something to consider. 
    generally there are 3 states in the market (1) UPTREND, (2) DOWNTREND and (3) SIDEWAYS/consolidation/lack of trend. Within those states there is HIGH/AVERAGE/LOW volatility but let’s leave that for now. 

    Is there a way to include (3) sideways/consolidation/lack of trend? = 0 
    Also: 1 and -1 is a great start but almost too black and white. We need to know how strong the trend actually is 10/-10 = very strong to 0 no trend – how could we do this?

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Stenozar Hi Sever, how can I visualize the coloured areas?
Sever Hi Stenozar, You need to add the color zones yourself , just go to Add Color Zone To set ...
atlante hi nicolas this indicator have 2 wrong borderline and islalastbarupdate. thank you can you h...
Nicolas That'"s because you are not using PRT v11? Just remove lines 59 to 62
Kanamax Hi Roberto, sorry for my confusing previous posts (forget them). My request is very simple,...
robertogozzi Please start a new topic in ProOrder support.
robertogozzi There you go: myMagicTrend = CALL “Magic Trend custom”[20, 14, 1, 5] alpha = 105 b = 0...
johann8 exactly :) Thank you all for the help!
max_92 Ciao Roberto, ho scaricato l'indicatore e come ti avevano già scritto sopra anch'io vedo la ...
Xenotrax A première vue, sa à l'air d'être un indicateur très puissant sur de petites temporalités, j...
merri Bonjour Nicolas, Comment transformer cet indicateur en bot sur PRT ?
Nicolas Cela a déjà été fait, voir ce sujet: https://www.prorealcode.com/topic/strategia-con-lindica...
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. ...
Boris Hi IVMcm, thanks for your amazing work. I have tested all of your indicators and use some of...
IV Mcm With pleasure and thanks!
ashiash how to use this indicator can i use tradingview platform
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.....
Maxime Baudin Super travail !
Yanic c'est top j'adore
Maxime Baudin Merci l'ami, passe une bonne semaine
IV Mcm Merci de même ;)
Roland57800 Bonjour Noobywan, si je comprends bien l'utilisation de ce code que je trouve particulièr...
Noobywan Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en am...
Fabian This Code draws only a retangle if the condition has been confirmed and NOT before (in that ...
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/
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.
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...

Top