The Hodrick-Prescott filter is used in macroeconomics, especially in real business cycle theory to separate the cyclical component of a time series from raw data. It has a zero lag. There is a common disadvantage of such zero lag filters - the recent values are recalculated.
MACD of a Hodrick-Prescott filter - the first post of the thread
Hodrick Prescott Filter (modified adapted Kurt Annens version) - the post
Hodrick-Prescott filter HMA mode indicator - the post
end-point HMA variation of Hodrick-Prescott filter - the post
Hodrick-Prescott filter "no lambda" indicator - the post
Hodrick-Prescott filter "no lambda" histo indicator - the post
goertzel_browser (simple versions, MTF, coloring, etc; Hodrick Prescott filter is used) - goertzel_browser_5.2.1 indicator - the post, - goertzel_browser_5.3 indicator - the post - goertzel_browser_5.4 indicator - the post - goertzel_browser_5.4_nrp indicator - the post - goertzel_browser_5.5 indicator - the post (standalone indicator) - goertzel_browser_5.51 indicator - the post - goertzel_browser_5.52 indicator - the post - goertzel_browser_5.53 indicator - the post - goertzel_browser_5.1_cs_detrendampsmooth_1 indicator - the post
Added the arrows and something i should have added from the start, now for the fast average you have a choice from 10 different fast averages. This is fast average is Hull with Slow being Kaufman Ama with m30 chart and the macd using 4 hr. timeframe.
I have a question, your indicator qqe histo repaints. How come? I had it checked didnt find it repainting, then i went visual and saw that the lines change for historic candles...
Depends where the current price goes, accordingly the past line go up or down... Why is that?
Identifying trend direction and potential reversals can be challenging when price movements fluctuate around changing market levels. The HalfTrend algorithm addresses this by tracking price structure and updating its baseline when specific conditions are met. However, combining this approach with volatility-based channel boundaries provides additional context for observing price movement around the trend line. In this article, we will build a HalfTrend Channel indicator in MQL5 using the HalfTrend algorithm and an ATR-based channel calculation.
This article builds a HalfTrend Channel indicator in MQL5 that combines rolling price extremes with a HalfTrend baseline and a Wilder‑smoothed ATR(100) to form adaptive channel boundaries. It explains the trend‑state machine, ATR smoothing, and the logic for detecting close‑price crossings of the bands. The result helps you study confirmed directional shifts and price behavior around a volatility‑adjusted reference line.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hodrick-Prescott filter
The Hodrick-Prescott filter is used in macroeconomics, especially in real business cycle theory to separate the cyclical component of a time series from raw data. It has a zero lag. There is a common disadvantage of such zero lag filters - the recent values are recalculated.
More information on one sided HP filter you can find here : statistics - Hodrick–Prescott filter (one-sided version) - Mathematica Stack Exchange or here time series - Formula for one-sided Hodrick-Prescott filter - Cross Validated and in pdf file attached to this post.
Forum threads (thanks to mladen)
- goertzel_browser_5.2.1 indicator - the post,
- goertzel_browser_5.3 indicator - the post
- goertzel_browser_5.4 indicator - the post
- goertzel_browser_5.4_nrp indicator - the post
- goertzel_browser_5.5 indicator - the post (standalone indicator)
- goertzel_browser_5.51 indicator - the post
- goertzel_browser_5.52 indicator - the post
- goertzel_browser_5.53 indicator - the post
- goertzel_browser_5.1_cs_detrendampsmooth_1 indicator - the post
The articles
CodeBase
============
Camisa,
Added the arrows and something i should have added from the start, now for the fast average you have a choice from 10 different fast averages. This is fast average is Hull with Slow being Kaufman Ama with m30 chart and the macd using 4 hr. timeframe.
Updated version posted here : https://www.mql5.com/en/forum/180002
hi in that pic
i seen one colored candles .. what is that indicator name. if possible can you share here
hi in that pic i seen one colored candles .. what is that indicator name. if possible can you share here
Good day Mr Ramzam or any one, I'm interested in the 2 band indicator which are on the main window of the image you shared in post #1122
Does any know the name of that band or could you please share, I'm curious to test something on it/with it.
Hey mntiwana Tiwana
what are the settings you are using in this picture (with colors blue+golden rod (half trend tt))
I guess the Red & Blue arrows is using default (that is: 2)
Best Regards
Thanks mntiwana Tiwana
Hey mntiwana Tiwana
what are the settings you are using in this picture (with colors blue+golden rod (half trend tt))
I guess the Red & Blue arrows is using default (that is: 2)
Best Regards
Thanks mntiwana Tiwana
Man,unfortunately i have no template of that time,i tried finding in my belonging folder if there is,but sorry.
It is of years ago but you can play/exercise with parameters and form/adjust like that,not a hard task,as you already have the both codes.
regards
Hello,
Mladen thank you for everything you do...
I have a question, your indicator qqe histo repaints. How come? I had it checked didnt find it repainting, then i went visual and saw that the lines change for historic candles...
Depends where the current price goes, accordingly the past line go up or down... Why is that?
Sorry if this is not correct thread.
Thank you
I checked this old indicator ( Half Trend indicator from post #692) and it works now for new MT4 builds:
More Half Trend indicators:
Forum on trading, automated trading systems and testing trading strategies
Halt Trend EA
Sergey Golubev, 2019.02.09 07:59
Half Trend indicator (just in case someone will create EA based on it) -
Building a HalfTrend Channel Indicator in MQL5