Add order_types to sample strategy

This commit is contained in:
Matthias 2018-11-17 10:26:15 +01:00
parent 6e78efd971
commit 3ab0cf49af
2 changed files with 8 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class DefaultStrategy(IStrategy):
# Optimal ticker interval for the strategy
ticker_interval = '5m'
# Optional order types
# Optional order type mapping
order_types = {
'buy': 'limit',
'sell': 'limit',

View File

@ -48,6 +48,13 @@ class TestStrategy(IStrategy):
# run "populate_indicators" only for new candle
ta_on_candle = False
# Optional order type mapping
order_types = {
'buy': 'limit',
'sell': 'limit',
'stoploss': 'market'
}
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
"""
Adds several different TA indicators to the given DataFrame