INNER CODE UNIT · Python
roofing_filter
aticio/legitindicators · legitindicators.py:157
def roofing_filter(data, hp_length, ss_length):
"""Python implementation of the Roofing Filter indicator created by John Ehlers
:param data: list of price data
:type data: list
:param hp_length: High Pass filter length
:type hp_length: int
:param ss_length: period for super smoother
:type ss_length: int
:return: Roofing Filter applied data
:rtype: list
"""
hpf = []
for i, _ in enumerate(data):
if i < 2:
hpf.append(0)
else: