fixed errors and making flake pass

This commit is contained in:
Gert Wohlgemuth 2018-07-16 20:40:17 -07:00
parent a280d1fba6
commit e880b94aeb
2 changed files with 4 additions and 2 deletions

View File

@ -105,7 +105,7 @@ class Analyze(object):
""" """
return self.strategy.stoploss return self.strategy.stoploss
def analyze_ticker(self, ticker_history: List[Dict]) -> DataFrame: def analyze_ticker(self, ticker_history: List[Dict], pair: str) -> DataFrame:
""" """
Parses the given ticker history and returns a populated DataFrame Parses the given ticker history and returns a populated DataFrame
add several TA indicators and buy signal to it add several TA indicators and buy signal to it

View File

@ -6,7 +6,6 @@ import warnings
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import Dict from typing import Dict
from abc import ABC
from pandas import DataFrame from pandas import DataFrame
@ -30,6 +29,7 @@ class IStrategy(ABC):
# associated ticker interval # associated ticker interval
ticker_interval: str ticker_interval: str
@abstractmethod
def populate_indicators(self, dataframe: DataFrame) -> DataFrame: def populate_indicators(self, dataframe: DataFrame) -> DataFrame:
""" """
Populate indicators that will be used in the Buy and Sell strategy Populate indicators that will be used in the Buy and Sell strategy
@ -40,6 +40,7 @@ class IStrategy(ABC):
DeprecationWarning) DeprecationWarning)
return dataframe return dataframe
@abstractmethod
def populate_buy_trend(self, dataframe: DataFrame) -> DataFrame: def populate_buy_trend(self, dataframe: DataFrame) -> DataFrame:
""" """
Based on TA indicators, populates the buy signal for the given dataframe Based on TA indicators, populates the buy signal for the given dataframe
@ -51,6 +52,7 @@ class IStrategy(ABC):
dataframe.loc[(), 'buy'] = 0 dataframe.loc[(), 'buy'] = 0
return dataframe return dataframe
@abstractmethod
def populate_sell_trend(self, dataframe: DataFrame) -> DataFrame: def populate_sell_trend(self, dataframe: DataFrame) -> DataFrame:
""" """
Based on TA indicators, populates the sell signal for the given dataframe Based on TA indicators, populates the sell signal for the given dataframe