Add strategy-migration doc page
This commit is contained in:
@@ -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`
|
||||
|
||||
|
26
docs/strategy_migration.md
Normal file
26
docs/strategy_migration.md
Normal file
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user