Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Hodrick-Prescott Channel - indicator for MetaTrader 5

Views:
14842
Rating:
(35)
Published:
2010.09.22 10:24
Updated:
2016.11.22 07:32
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The indicator plots a price channel using the Hodrick-Prescott Filter.

The first step is to calculate the smoothed values of Close prices. After that it smoothed again with higher smoothing period. As a result we will have HP and HPSlow. On the next step we calculate the standard deviation HP relative to HPSlow and construct the channel.

The indicator prints the ratio of a full channel width to HPSlow[0], presented in percents. This text can be easily moved at any place on the chart - just drag it with double mouse click and move.

We have used the HPF (Hodrick-Prescott Filter) function from https://www.mql4.com/ for smoothing.

Indicator input parameters:

  • HP Fast Period – smoothing period of the HP;
  • HP Slow Period - smoothing period of the HPSlow.

Hodrick-Prescott Channel

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/191

Smoothed Accelerator Smoothed Accelerator

Smoothed Accelerator

MedianPriceChart MedianPriceChart

It plots the bar-averaged price charts (median price).

Position in channel Position in channel

The indicator shows the position of the current price in a channel.

Perceptron With 5 indicators Perceptron With 5 indicators

Using Perceptron, Automatic Learning