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 • 187 days ago #

    A very good combination Nicolas, thanks!

  2. Stenozar • 187 days ago #

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

    • Nicolas • 186 days ago #

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

  3. Stenozar • 185 days ago #

    Thanks Nicolas!

  4. carlvan • 185 days ago #

    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 • 184 days ago #

      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 • 184 days ago #

    That works now, thank you !

  6. atxeel • 172 days ago #

    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 • 171 days ago #

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

  7. JosephFelix • 169 days ago #

    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 • 168 days ago #

      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
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'...
Balmora74 @Pacolopez Hi ! I run this code live on IG CFDs (not via IG Interactive Broker).
Balmora74 @Pacolopez read this :
PacoLopez Thanks Balmora74. 100% clear now. Not posible at all with IB Only option by now with IG ...
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
carlvan Thank you for posting this, useful
Manuel9z MUCHAS Gracias por este indicador. Lo estoy integrando en un sistema Probuilder SP500 1h. El...
Juanjo Me alegro que haya sido de utilidad.
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...
osupero Buenisimo Sr Nicolas, seria posible que sólo marcara por encima o por debajo de una media mo...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
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...
ottimo Congratulations Nicolas, What should I do for the 2 files I have to add them both in the gr...
Nicolas Only the "//PRC_StepALMA-VHF Hi/Lo band" is required, it uses the second code automatically....
ottimo Thank you Nicolas, great indicator, N. 1
Tradingrob Hi Nicolas, when i upload this indicator in my list and use it as indicator. I get a totally...
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
Vonasi Jissey - Je pense qu'il est préférable que vous commenciez un sujet sur le forum ProOrder et...
jissey Bonjour Vonasi, ma stratégie est simple; Passage du niveau 50 par la closeline , à l'achat ...
Vonasi I cannot communicate in French with you. Please start a topic in the forums to discuss your ...
tradingpro salve io faccio spread trading e volevo sapere come impostare un profitto da chiudere in a...
Nicolas Per favore non fare domande generali, non correlate al post. Usa invece il forum.
Appsoluxions Hi Nicolas, do you have the MT4 version of the indicator? I am not sure if these kind of que...
Nicolas Hi, don't have one sorry. But you can still ask for private coding through our programming s...
Appsoluxions Cool. Thanks for the response.
Nicolas Yes, this could be easily programmed with the assisted creation tool.
Karthick S Hi Nicolas, Can you please share MT4 version of this? Cheers
Nicolas No. This website is only dedicated to ProRealTime programming :)