Adding 30 minutes, 1 hour, 1 day tickers

This commit is contained in:
Jean-Baptiste LE STANG
2018-01-12 17:02:35 +01:00
parent 5a82d99482
commit e2e2005567
12 changed files with 160 additions and 95 deletions

View File

@@ -280,13 +280,13 @@ def analyze_ticker(ticker_history: List[Dict]) -> DataFrame:
return dataframe
def get_signal(pair: str, signal: SignalType) -> bool:
def get_signal(pair: str, signal: SignalType, interval: int) -> bool:
"""
Calculates current signal based several technical analysis indicators
:param pair: pair in format BTC_ANT or BTC-ANT
:return: True if pair is good for buying, False otherwise
"""
ticker_hist = get_ticker_history(pair)
ticker_hist = get_ticker_history(pair, interval)
if not ticker_hist:
logger.warning('Empty ticker history for pair %s', pair)
return False