Answers for "bill wiliams fractal python pandas"

0

bill wiliams fractal python pandas

def roll(df):
    bear_fractal = df['high'].rolling(5, center=True).apply(lambda x: x[2] == max(x), raw=True)
    bull_fractal = df['low'].rolling(5, center=True).apply(lambda x: x[2] == min(x), raw=True)
    return bear_fractal, bull_fractal
Posted by: Guest on January-12-2022

Python Answers by Framework

Browse Popular Code Answers by Language