diff --git a/docs/deprecated.md b/docs/deprecated.md index 5d4797d07..ddd71dc7e 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -48,17 +48,12 @@ Please switch to the new [Parametrized Strategies](hyperopt.md) to benefit from // TODO-lev: update version here -## Strategy changes +## Strategy changes between V2 and V3 -As strategies now have to support multiple different signal types, some things had to change. +We have put a great effort into keeping compatibility with existing strategies, so if you just want to continue using freqtrade in spot markets, there are no changes necessary. +While we may drop support for the current interface sometime in the future, we will announce this separately and have an appropriate transition period. -Dataframe columns: - -* `buy` -> `enter_long` -* `sell` -> `exit_long` -* `buy_tag` -> `enter_tag` - -New columns are `enter_short` and `exit_short`, which will initiate short trades (requires additional configuration!) +Please follow the [Strategy migration](strategy_migration.md) guide to migrate your strategy to the new format to start using the new functionalities. ### webhooks - `buy_tag` has been renamed to `enter_tag` diff --git a/docs/strategy_migration.md b/docs/strategy_migration.md new file mode 100644 index 000000000..d2614444a --- /dev/null +++ b/docs/strategy_migration.md @@ -0,0 +1,26 @@ +# Strategy Migration between V2 and V3 + +We have put a great effort into keeping compatibility with existing strategies, so if you just want to continue using freqtrade in spot markets, there should be no changes necessary for now. + +To support new markets and trade-types (namely short trades / trades with leverage), some things had to change in the interface. +If you intend on using markets other than spot markets, please migrate your strategy to the new format. + +## Quick summary / checklist + +* Dataframe columns: + * `buy` -> `enter_long` + * `sell` -> `exit_long` + * `buy_tag` -> `enter_tag` (used for both long and short trades) + * New column `enter_short` and corresponding new column `exit_short` +* trade-object now has the following new properties: `is_short`, `enter_side`, `exit_side` and `trade_direction`. +* New `side` argument to callbacks without trade object + * `custom_stake_amount` + * `confirm_trade_entry` +* Renamed `trade.nr_of_successful_buys` to `trade.nr_of_successful_entries`. +* Introduced new `leverage` callback +* `@informative` decorator now takes an optional `candle_type` argument +* helper methods `stoploss_from_open` and `stoploss_from_absolute` now take `is_short` as additional argument. + +## Extensive explanation + + diff --git a/mkdocs.yml b/mkdocs.yml index 5e1eb0c87..c95d53b86 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -23,6 +23,7 @@ nav: - Backtesting: backtesting.md - Hyperopt: hyperopt.md - Leverage: leverage.md + - Strategy migration: strategy_migration.md - Utility Sub-commands: utils.md - Plotting: plotting.md - Exchange-specific Notes: exchanges.md