Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_trending_up():
df = to_dataframe(data)
ma = TA.HMA(df)
assert isinstance(trending_up(ma, 10), Series)
assert not trending_up(ma, 10).values[-1]
def test_trending_down():
df = to_dataframe(data)
ma = TA.HMA(df)
assert isinstance(trending_down(ma, 10), Series)
assert trending_down(ma, 10).values[-1]
def test_hma():
"""test TA.HMA"""
ma = TA.HMA(ohlc)
assert isinstance(ma, series.Series)
assert ma.values[-1] == 6428.9693186290006