Merge pull request #6559 from freqtrade/short_docs
Futures strategy migration docs
This commit is contained in:
@@ -62,7 +62,8 @@ class IStrategy(ABC, HyperStrategyMixin):
|
||||
# Default to version 2
|
||||
# Version 1 is the initial interface without metadata dict
|
||||
# Version 2 populate_* include metadata dict
|
||||
INTERFACE_VERSION: int = 2
|
||||
# Version 3 - First version with short and leverage support
|
||||
INTERFACE_VERSION: int = 3
|
||||
|
||||
_populate_fun_len: int = 0
|
||||
_buy_fun_len: int = 0
|
||||
|
@@ -35,7 +35,7 @@ class {{ strategy }}(IStrategy):
|
||||
"""
|
||||
# Strategy interface version - allow new iterations of the strategy interface.
|
||||
# Check the documentation or the Sample strategy to get the latest version.
|
||||
INTERFACE_VERSION = 2
|
||||
INTERFACE_VERSION = 3
|
||||
|
||||
# Optimal timeframe for the strategy.
|
||||
timeframe = '5m'
|
||||
|
@@ -36,7 +36,7 @@ class SampleShortStrategy(IStrategy):
|
||||
"""
|
||||
# Strategy interface version - allow new iterations of the strategy interface.
|
||||
# Check the documentation or the Sample strategy to get the latest version.
|
||||
INTERFACE_VERSION = 2
|
||||
INTERFACE_VERSION = 3
|
||||
|
||||
# Can this strategy go short?
|
||||
can_short: bool = True
|
||||
|
@@ -35,7 +35,7 @@ class SampleStrategy(IStrategy):
|
||||
"""
|
||||
# Strategy interface version - allow new iterations of the strategy interface.
|
||||
# Check the documentation or the Sample strategy to get the latest version.
|
||||
INTERFACE_VERSION = 2
|
||||
INTERFACE_VERSION = 3
|
||||
|
||||
# Can this strategy go short?
|
||||
can_short: bool = False
|
||||
|
@@ -110,7 +110,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Report results\n",
|
||||
"print(f\"Generated {df['buy'].sum()} buy signals\")\n",
|
||||
"print(f\"Generated {df['enter_long'].sum()} entry signals\")\n",
|
||||
"data = df.set_index('date', drop=False)\n",
|
||||
"data.tail()"
|
||||
]
|
||||
@@ -348,7 +348,7 @@
|
||||
"hist_data = [trades.profit_ratio]\n",
|
||||
"group_labels = ['profit_ratio'] # name of the dataset\n",
|
||||
"\n",
|
||||
"fig = ff.create_distplot(hist_data, group_labels,bin_size=0.01)\n",
|
||||
"fig = ff.create_distplot(hist_data, group_labels, bin_size=0.01)\n",
|
||||
"fig.show()\n"
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user