Add order_types to sample strategy
This commit is contained in:
parent
6e78efd971
commit
3ab0cf49af
@ -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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user