Introduce strategy_version variable

This commit is contained in:
Matthias
2019-08-26 19:44:33 +02:00
parent 4fcfb1eaca
commit 92011f8294
5 changed files with 40 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ class DefaultStrategy(IStrategy):
Default Strategy provided by freqtrade bot.
You can override it with your own strategy
"""
strategy_version: int = 2
# Minimal ROI designed for the strategy
minimal_roi = {

View File

@@ -60,6 +60,11 @@ class IStrategy(ABC):
stoploss -> float: optimal stoploss designed for the strategy
ticker_interval -> str: value of the ticker interval to use for the strategy
"""
# Strategy interface version
# Default to version 2
# version 1 is the initial interface without metadata dict
# Version 2 populate_* include metadata dict
strategy_version: int = 2
_populate_fun_len: int = 0
_buy_fun_len: int = 0