Trend Impulse Filter

Trend Impulse Filter

There is a lot of indicators similar to this one, however i think this one don’t share the same calculation method and this is why i share it. This indicator aim to forecast price direction using an exponential filter architecture using highest and lowest information for the estimation of a smoothing variable. This filter is similar to the average Max-Min filter.

In the code a is equal to 1 when the price is greater or lower than any past price over length period, else a is equal to 0. The center parameter control the filtering degree of the output, when center is equal to 1 and a = 1 the indicator return the highest or lowest depending on market current trend, when center is superior to 1 the output will be smoother, however the reactivity of the indicator will still depend on the length parameter.

A color option show you the trend of the market, however the generated signals are the same that can be generated from a Donchian channel.

When highest is greater than previous highest the indicator direction will move upward, else if lowest is lower than previous lowest the indicator direction will move downward. Therefore the indicator can give information on the Donchian channels direction and provide a nice filter.

(description above is from the original author alexgrover, all credits go to him).


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?

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

  1. raulmerino1988 • 65 days ago #

    Bonjour Nicolas, je voudrais vous poser une question technique sur les alarmes, mais je ne peux pas vous contacter.

    • Nicolas • 64 days ago #

      Les questions non liées à ce post doivent être posées sur les forums.

  2. jacob78692110 • 61 days ago #

    Bonjour, quand je colle le code, l’indicateur n’est pas sur les prix mais il est la où se trouve l’emplacement rsi, stochastique, etc…. je comprend pas tous les code je colle ce trouve en bas

    • Nicolas • 60 days ago #

      Il faut l’appliquer sur le prix, en allant dans les paramètres du prix.

  3. tonycom95 • 11 days ago #

    Bonjour Nicolas est ce que cet outil est utilisable sur les actions ? Désolé si ma question est stupide mais je débute en bourse

Register or


avatar avatar avatar avatar avatar avatar
Related users ' posts
XXXXVII Fixed ITF Trend Background //Indicateur CCI ID2 = CCI[50] => 60 ID3 = CCI[100] => 60...
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
Darren Nash Thanks Souhail, in the end i just copy/paste the logic with variables and it works. I rem...
Darren Nash One thing to note also for DOW trading if using IG, change the buy/sell qty from 1 to 2
mostafa samady How can I optimize it for DAX 30? Thanks!
born2trading hello Nicolas, sorry for off-topic question, but can you tell me what kind of indicator you ...
Nicolas Not an indicator but an option in PRT v11.
Screw27 Salut nicolas j'aimerais savoir tes résulats grace a cettte methode
eva.g.forsgren Jag får felkod på rad 56?
Nicolas This indicator only works on PRTv11 onwards.
Jan If you start PRT via your trading account at, the PRT version 11 is not available yet...
Nicolas No, all codes on our website are to be used with ProRealTime:
Nicolas Poni qui la tua domanda se è correlata a questo indicatore, altrimenti apri un nuovo argomen...
bob789 Once you download it, how do you upload it into PRT? thanks
Nicolas How to import file page: in the help section of the website explains howto
kenssa import through the indicator page/window in the Proreal time
danistuta Hi, thank it works with prorealtime 10.3:-) I'd like test on EUR/USD...could you s...
Jan Just run the code for this pair, make sure you have the right spread filled. What you could...
oxy75 Hello. I understood that we were waiting to choose two values ​​between 0 and 69 for the two...
Stockastiss Can this code be simply transferred into Backtestingcode so one doesnt need to use call ? (i...
Vonasi Sorry for the late reply. Add the code to your strategy and remove line 5 and line 39. Chang...
leofi Go visit and watch 2em post
Dritan Hi,I am new on Prorealtime and coding.I downloaded the indi but I have it on a separate wind...
Nicolas Use the color variables R and G to test if the trend is bullish (R=0) or bearish (R>0).
s00071609 Where can i find the syntax to test the colour of the line, I am calling the indicator value...
Nicolas You should open a new topic to discuss about the strategy and its coding.
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
scarphace38 Bonsoir, je découvre PRT et je n'arrive pas a afficher le meme résultat pour l'indicateur de...
Dom Hello, commence le trading et découvre par la même occasion le ce n...
Nicolas Merci, ça fait plaisir !
Wilko Thanks for the idea! This type of scoring can really help in not only identifying regimes ...
Vonasi Thanks for the compliments Wilko.
9 months ago
Jan Wind "There are two methods of using Kagi: We buy when there is a turnaround and sell when there...
Nicolas Thanks, let us know how it is going?
Jan Wind Hallo Nicolas, I have tested the pre-mentioned concept, and had to change the concept : ...
Alai-n @Vonasi Thanks
jiddan78 how to convert to afl amibroker ?
Nicolas We do not supply free coding assistance for AFL Amibroker on the website. You can ask for pa...
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)