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
luiskohnen Parece un excelente indicador, lo voy a analizar. Muchas Gracias
Iván De nada!
lkiklkik merci ! which time frame would be the best .?
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
1 month 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
2 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...
Iván
2 months ago
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...
jacquesgermain Bonjour non pas de soucis car src=customclose donc dans le menu configuration/propriété me...
geroniman Merci Jacques , indic tres utile. J'ai un indic à programmer avec du price action. es tu dis...
jacquesgermain ok pour regarder ...
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
8 months ago
B-Xtrender
B-Xtrender
7
Indicators
Fgats I suspected something like this but in the PRT documentation I couldn't find anything to exp...
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à :)
JS
8 months ago
Trendilo
Trendilo
0
Indicators
Nicolas
9 months ago
Anthony2A Bjr, j ai des erreurs sur la ligne 69, 74, 78 et 80. sur drawcandle drawtext et endif. si ...
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
BriceE Bonjour Nicolas, Je suis a la recherche d'indicateurs pour me donner la meilleure indicatio...
Nicolas
10 months ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!

Top