Skip to content

Commit

Permalink
Slightly change wording, fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Apr 1, 2022
1 parent b4b594c commit 2f967f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions docs/leverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
Please only use advanced trading modes when you know how freqtrade (and your strategy) works.
Also, never risk more than what you can afford to lose.


Please read the [strategy migration guide](https://www.freqtrade.io/en/latest/strategy_migration/#strategy-migration-between-v2-and-v3) to migrate your strategy from a freqtrade v2 strategy, to v3 strategy that can short and trade futures
Please read the [strategy migration guide](strategy_migration.md#strategy-migration-between-v2-and-v3) to migrate your strategy from a freqtrade v2 strategy, to v3 strategy that can short and trade futures.

## Shorting

Shorting is not possible when trading with [`trading_mode`](#understand-tradingmode) set to `spot`. To short trade, `trading_mode` must be set to `margin`(currently unavailable) or [`futures`](#futures), with [`margin_mode`](#margin-mode) set to `cross`(currently unavailable) or [`isolated`](#isolated-margin-mode)

For a strategy to short, the strategy class must set the class variable `can_short = True`

Please read [strategy customization](https://www.freqtrade.io/en/latest/strategy-customization/#entry-signal-rules) for instructions on how to set signals to enter and exit short trades
Please read [strategy customization](strategy-customization.md#entry-signal-rules) for instructions on how to set signals to enter and exit short trades.

## Understand `trading_mode`

Expand Down
2 changes: 1 addition & 1 deletion docs/strategy-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Edit the method `populate_entry_trend()` in your strategy file to update your en

It's important to always return the dataframe without removing/modifying the columns `"open", "high", "low", "close", "volume"`, otherwise these fields would contain something unexpected.

This method will also define a new column, `"enter_long"` (`"enter_short"` for shorts), which needs to contain 1 for entries, and 0 for "no action". `enter_long` column is a mandatory column that must be set even if the strategy is shorting only.
This method will also define a new column, `"enter_long"` (`"enter_short"` for shorts), which needs to contain 1 for entries, and 0 for "no action". `enter_long` is a mandatory column that must be set even if the strategy is shorting only.

Sample from `user_data/strategies/sample_strategy.py`:

Expand Down

0 comments on commit 2f967f6

Please sign in to comment.