ALMA VHF Filter (MA & Signal Band)

ALMA VHF Filter (MA & Signal Band)

2 indicators in this post, the ALMA moving average with its offset  automatically adjusted with a VHF (Vertical Horizontal Filter). The second one is a signals band made of 2 moving average calculated separately with Highs and Lows of the last X periods (Window setting).

I made it first as a rough idea and found it interesting for scalping trading as it reacts quickly enough to find good entries of potential new movement (and quickly revert on false signals), and automatically adapt the band due to volatility while in good trend, resulting of a “keep on trading” technique.

The VHFp controls the period of the VHF filter.

Hi/Lo bands made of this moving average:


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. soulintact • 11/11/2018 #

    A very good combination Nicolas, thanks!

  2. Stenozar • 11/11/2018 #

    Hi Nicolas, I see two itf files; we should put both on them on the graph? thank you!

    • Nicolas • 11/11/2018 #

      Only the second one if you want to have the same indicator as the one presented in the picture.

  3. Stenozar • 11/11/2018 #

    Thanks Nicolas!

  4. carlvan • 11/11/2018 #

    Dear Nicolas, as usual big thank you for sharing those gems!
    I imported your code of Alma HiLo bands into PRT and it charts perfectly.
    However, when I tried to build a system and backtest it, it charts the result automatically but the entry/exit signals are mished mashed, at the wrong place – very strange.
    My opinion is that it might be due to the “CALL” routines you used in the code.
    I tried to fix this but unlucky so far.
    Do you think this can be fixed?
    Here is your code, with the trade signals (long and exit only for simplicity):

    defparam cumulateorders=false

    //PRC_ALMA VHF Filter Hi/Lo band | indicator
    //Nicolas @
    //Sharing ProRealTime knowledge
    Window = 7
    Sigma = 3
    VHFp = 21
    // — end of settings

    HH = CALL “PRC_ALMA VHF filter”[window, sigma, VHFp](high)
    LL = CALL “PRC_ALMA VHF filter”[window, sigma, VHFp](low)

    if hh<hh[1] and lowLL[1] and high>hh then

    if trend=1 then

    if not longonmarket and close[1] crosses over iline[1] and Close>High[1] then
    buy at market
    if longonmarket and close < iline then
    sell at market

    • Nicolas • 11/11/2018 #

      You should not use offset in this case. Delete all the [1] references in your code. BTW, trend of the indicator doesn’t change when price go through the line, so in order to launch orders according to the indicator, you should use the “trend” variable and its change between 2 candlesticks.

  5. carlvan • 11/11/2018 #

    That works now, thank you !

  6. atxeel • 11/11/2018 #

    Hello Nicolas, the Indi is really great. Unfortunately, I get an error message that takes a long time to calculate, up to 2 seconds. Have it tried with defparam calculateonlastbars unfortunately without success, Maybe you have another solution. Thank you.

    • Nicolas • 11/11/2018 #

      Yes, that’s how it goes when using loops..

  7. JosephFelix • 11/11/2018 #

    Hi, Could I please have help with adding these indicators ‘on price’? Every indicator that I add plots as a sub-graph. What am I doing wrong here?

    • Nicolas • 11/11/2018 #

      Just add it on price by clicking the wrench on the left upper side of the price chart.

Register or


avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Nicolas Add indicator on price by using the wrench on the left upper side of your price chart.
efahmy Thanks Mate, Much appreciated.,
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here:
JMat45 Thank you, Vonasi.
5 months ago
Nicolas Merci d'ouvrir un nouveau sujet sur le forum des indicateurs, on verra ce qu'on peut faire p...
sachinssmp required above mt4 indicators & mt4 template plz
Nicolas we do not provide mt4 indicators on our website, you can download and use the above code on ...
camporan You can use it 5M onwards, but the longer timeframe the more accurate it is. My preferred ar...
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!
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
Jan Wind Good evening Roberto, I do not understand Italian, so I could not read the background. ...
robertogozzi Results, while matching when it's SMA compared to TRSMA, are different in the case of WMA an...
Lafras very late to identify signal
nader003 Hi .. how can we get this indicator for MT4 platform
Nicolas You can ask for private custom coding to our programming services: https://www.prorealcode.c...
funkystuff Salut Balmora, Ton indicateur est plutôt intéressant :) Penses-tu qu'il soit possible de l'...
rrenaud_ig Great work ! My only concern is about risk management. Your results are based on 10k. Max lo...
Tony87 can we have a update on this one please?
Nicolas Discussions with many other versions and improvements can be found here: https://www.proreal...
Vonasi A modified version of this indicator can be found here:
Nicolas Try to restrain to trading hours when Volumes are present (customized trading hours: righ cl...
Choliver Bonsoir Nicolas, Merci pour cet indicateur. Même s'il n'y a officiellement pas de volume s...
Brisvegas Thats Awesome thank you
Vinks_o_7 Thanks Vonasi !
Juanjo Me alegro que haya sido de utilidad.
kelso11 How can i change the colour of the channel ? Many Thanks
Nicolas In the indicator's settings window.
Stenozar Thanks Leo!
Madrosat Hi Leo something is missing in the strategy above because it does not work at all as it is
Leo I don't know, I just copy paste the strategy. The optimisation of the values I wrote them in...
Bard Thanks for this great addition. How would you "finish the syntax" if you were to use an ALMA...
Bard Problems with Safari latest s/ware and this site and links and adding code. Let me add the...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
Nicolas Alpha transparency from 0 to 255.
ehtsham Hi, Sir can you tell me how to put this code in indicator plz
Jan Wind Ehtsham, all you need to do is change the code in line 18 and line 20 (see the code above...