freqtrade_origin/freqtrade/tests/test_indicator_helpers.py

14 lines
349 B
Python
Raw Normal View History

2018-02-13 09:37:59 +00:00
import pandas as pd
2018-03-17 21:44:47 +00:00
2018-02-13 09:37:59 +00:00
from freqtrade.indicator_helpers import went_up, went_down
def test_went_up():
series = pd.Series([1, 2, 3, 1])
assert went_up(series).equals(pd.Series([False, True, True, False]))
def test_went_down():
series = pd.Series([1, 2, 3, 1])
assert went_down(series).equals(pd.Series([False, False, False, True]))