High Pass Filter Trading Signal
- Indicators
- Safwan Rushdi Khalil Arekat
- Version: 1.6
- Updated: 29 May 2023
Latest Changes in 1.6: Added Signal Modes input. Mode 1 : HPF positive go long blue, HPF negative go short red. Mode 2: slow envelope only, HPF above upper envelope go long blue, HPF below lower envelope go short red. Mode 3: HPF above both upper envelopes - go long blue, HPF below both lower envelopes go short red. Mode 4: Go long blue if HPF crosses above upper slow, but fast upper should be below slow upper at the time, exit when HPF crosses below upper fast, reverse logic for short red . Mode 5: Signals from slow envelope only (white) and its half envelope (yellow). The exported buffer (for iCustom) is the signal (+10 for blue, -10 for red, 0 otherwise) . It can be displayed if desired by selecting "display signal", but signal is always exported regardless. The Strategy tester results below are for Mode 4, which was superior to others in my tests.
This indicator issues trading signals based on a biquad high pass digital filter. High pass filters are an underappreciated type of oscillator that are seldom used in technical analysis. My two previous free indicators ( DFT of Price and Q n D Frequency Response) give an introduction to the characteristics of high pass and other digital filter. In short, a high pass filter quenches the low frequency components of a signal and preserves the high frequency ones. It acts to de-trend a signal by removing the trend and keeping the volatility and cyclic components.
Blue histogram lines are go long signal, and Red regions go short. The indicator can be called via "iCustom" to import the first buffer signal which is +10 for long and -10 for short and 0 otherwise. The signal is always on, but it can be monitored (if desired) by the input options.
Inputs
fo form 0 to 0.5
Q: better not change from 0.75.
RMS_Periods_1 : any integer
RMS_Periods_2 : any integer lower than RMS_Periods_1
Optimisation results are given in the second screenshot for Gold 4H between Jan 1, 2022 and Jul 1, 2022 for lot-size 0.1. Screen shot three shows performance of first entry in table between Jan 1, 2022 and Feb 1, 2023. (forward testing after Trade 37 from July 1,22 to Feb 1, 23) The EA follows exactly signals by the indicator - no stop loss or take-profit. The optimisation is for inputs: open price, optimise fo , period_1 and period_2.