diff --git a/docs/strategy-customization.md b/docs/strategy-customization.md index 51540f690..cfac77608 100644 --- a/docs/strategy-customization.md +++ b/docs/strategy-customization.md @@ -230,12 +230,16 @@ Common values are `"1m"`, `"5m"`, `"15m"`, `"1h"`, however all values supported Please note that the same buy/sell signals may work with one interval, but not the other. This setting is accessible within the strategy by using `self.ticker_interval`. -### Metadata dict +### Metadata dictionary -The metadata-dict (available for `populate_buy_trend`, `populate_sell_trend`, `populate_indicators`) contains additional information. -Currently this is `pair`, which can be accessed using `metadata['pair']` - and will return a pair in the format `XRP/BTC`. +The metadata dictionary (available for `populate_buy_trend`, `populate_sell_trend`, `populate_indicators`) contains additional information. -The Metadata-dict should not be modified and does not persist information across multiple calls. +Currently this is: + +- Currency pair in the format `XRP/BTC`, which can be accessed using `metadata['pair']`. +- Timeframe used by the bot in its string form (`5m`, `1h`), which can be accessed as `metadata['timeframe']`. + +The metadata dictionary should not be modified and does not persist information across multiple calls. Instead, have a look at the section [Storing information](#Storing-information) ### Storing information diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index be5a6813a..85d58e18d 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -379,6 +379,8 @@ class IStrategy(ABC): :param metadata: Additional information, like the currently traded pair :return: a Dataframe with all mandatory indicators for the strategies """ + logger.debug(f"Populating indicators: " + f"pair {metadata.get('pair')}, timeframe {metadata.get('timeframe')}") if self._populate_fun_len == 2: warnings.warn("deprecated - check out the Sample strategy to see " "the current function headers!", DeprecationWarning) @@ -394,6 +396,8 @@ class IStrategy(ABC): :param pair: Additional information, like the currently traded pair :return: DataFrame with buy column """ + logger.debug(f"Populating buy signals: " + f"pair {metadata.get('pair')}, timeframe {metadata.get('timeframe')}") if self._buy_fun_len == 2: warnings.warn("deprecated - check out the Sample strategy to see " "the current function headers!", DeprecationWarning) @@ -409,6 +413,8 @@ class IStrategy(ABC): :param pair: Additional information, like the currently traded pair :return: DataFrame with sell column """ + logger.debug(f"Populating sell signals: " + f"pair {metadata.get('pair')}, timeframe {metadata.get('timeframe')}") if self._sell_fun_len == 2: warnings.warn("deprecated - check out the Sample strategy to see " "the current function headers!", DeprecationWarning)