Remove more buy_tag references
This commit is contained in:
@@ -43,3 +43,24 @@ As this does however increase risk and provides no benefit, it's been removed fo
|
||||
|
||||
Using separate hyperopt files was deprecated in 2021.4 and was removed in 2021.9.
|
||||
Please switch to the new [Parametrized Strategies](hyperopt.md) to benefit from the new hyperopt interface.
|
||||
|
||||
## Margin / short changes
|
||||
|
||||
// TODO-lev: update version here
|
||||
|
||||
## Strategy changes
|
||||
|
||||
As strategies now have to support multiple different signal types, some things had to change.
|
||||
|
||||
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!)
|
||||
|
||||
### webhooks - `buy_tag` has been renamed to `enter_tag`
|
||||
|
||||
This should apply only to your strategy and potentially to webhooks.
|
||||
We will keep a compatibility layer for 1-2 versions (so both `buy_tag` and `enter_tag` will still work), but support for this in webhooks will disappear after that.
|
||||
|
@@ -97,7 +97,7 @@ def custom_sell(self, pair: str, trade: Trade, current_time: datetime, current_r
|
||||
current_profit: float, **kwargs):
|
||||
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
|
||||
last_candle = dataframe.iloc[-1].squeeze()
|
||||
if trade.buy_tag == 'buy_signal_rsi' and last_candle['rsi'] > 80:
|
||||
if trade.enter_tag == 'buy_signal_rsi' and last_candle['rsi'] > 80:
|
||||
return 'sell_signal_rsi'
|
||||
return None
|
||||
|
||||
|
Reference in New Issue
Block a user