Improve wording in Note box

This commit is contained in:
Matthias 2021-04-28 20:42:15 +02:00
parent 7c8a367442
commit 3285f6caa3

View File

@ -270,10 +270,10 @@ Imagine you want to use `custom_stoploss()` to use a trailing indicator like e.g
see [Common mistakes when developing strategies](strategy-customization.md#common-mistakes-when-developing-strategies) for more info. see [Common mistakes when developing strategies](strategy-customization.md#common-mistakes-when-developing-strategies) for more info.
!!! Note !!! Note
`dataframe` is indexed by candle date. During dry/live runs `current_time` and `dataframe['date']` contains the candle's open date. During dry/live runs `current_time` and
`trade.open_date_utc` will not match candle dates precisely and using them as indices will throw `trade.open_date_utc` will not match the candle date precisely and using them directly will throw
an error. Use `date = timeframe_to_prev_date(self.timeframe, date)` to round a date to previous an error. Use `date = timeframe_to_prev_date(self.timeframe, date)` to round a date to the candle's open date
candle before using it as a `dataframe` index. before using it to access `dataframe`.
``` python ``` python
from freqtrade.exchange import timeframe_to_prev_date from freqtrade.exchange import timeframe_to_prev_date