Merge pull request #9592 from ArturoGamRod/docs/fix-typo

fix typo in stoploss_from_absolute code example doc
This commit is contained in:
Matthias
2023-12-25 08:16:40 +01:00
committed by GitHub

View File

@@ -489,7 +489,7 @@ The helper function `stoploss_from_absolute()` can be used to convert from an ab
dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe)
trade_date = timeframe_to_prev_date(self.timeframe, trade.open_date_utc)
candle = dataframe.iloc[-1].squeeze()
sign = 1 if trade.is_short else -1
side = 1 if trade.is_short else -1
return stoploss_from_absolute(current_rate + (side * candle['atr'] * 2),
current_rate, is_short=trade.is_short,
leverage=trade.leverage)