Repository: freqtrade/freqtrade

Issue:
Hyperoptable parameter type: CategoricalParameter is not returning correctly.
## Describe your environment

  * Operating system: MacOS 11.2.3 (20D91)
  * Python Version: using the version shiped freqtradeorg/freqtrade:stable (Image ID 73a48178c043)
  * CCXT version: using the version shiped freqtradeorg/freqtrade:stable (Image ID 73a48178c043)
  * Freqtrade Version: freqtrade 2021.4
  
Note: All issues other than enhancement requests will be closed without further comment if the above template is deleted or not filled out.

## Describe the problem:

Hi! It appears the Hyperoptable parameter type: `CategoricalParameter` is not returning correctly.

If I run the example as per the Freqtrade Docs [here](https://www.freqtrade.io/en/stable/hyperopt/#hyperoptable-parameters), namely setting a  `CategoricalParameter` like so:

```
buy_rsi_enabled = CategoricalParameter([True, False]),
```

...then when running the Hyperopt tool there is an error in the `populate_buy_trend` as below:

```
if self.buy_adx_enabled.value:
AttributeError: 'tuple' object has no attribute 'value'
```

It would appear that the `CategoricalParameter` is not actually returning one of the categories (even a default) but instead returning a Python Tuple.

### Steps to reproduce:

  1. Follow the example in the [Docs](https://www.freqtrade.io/en/stable/hyperopt/#hyperoptable-parameters)
  
### Observed Results:

  * What happened? There was an AttributeError: 'tuple' object has no attribute 'value'. 
  * What did you expect to happen? The 'value' property to exist and be set to either True or False

### Relevant code exceptions or logs

Note: Please copy/paste text of the messages, no screenshots of logs please.

  ```
2021-05-02 09:48:02,421 - freqtrade - ERROR - Fatal exception!
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/home/ftuser/.local/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 431, in _process_worker
    r = call_item()
  File "/home/ftuser/.local/lib/python3.9/site-packages/joblib/externals/loky/process_executor.py", line 285, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/home/ftuser/.local/lib/python3.9/site-packages/joblib/_parallel_backends.py", line 595, in __call__
    return self.func(*args, **kwargs)
  File "/home/ftuser/.local/lib/python3.9/site-packages/joblib/parallel.py", line 262, in __call__
    return [func(*args, **kwargs)
  File "/home/ftuser/.local/lib/python3.9/site-packages/joblib/parallel.py", line 262, in <listcomp>
    return [func(*args, **kwargs)
  File "/home/ftuser/.local/lib/python3.9/site-packages/joblib/externals/loky/cloudpickle_wrapper.py", line 38, in __call__
    return self._obj(*args, **kwargs)
  File "/freqtrade/freqtrade/optimize/hyperopt.py", line 288, in generate_optimizer
    backtesting_results = self.backtesting.backtest(
  File "/freqtrade/freqtrade/optimize/backtesting.py", line 352, in backtest
    data: Dict = self._get_ohlcv_as_lists(processed)
  File "/freqtrade/freqtrade/optimize/backtesting.py", line 196, in _get_ohlcv_as_lists
    self.strategy.advise_buy(pair_data, {'pair': pair}), {'pair': pair})[headers].copy()
  File "/freqtrade/freqtrade/optimize/hyperopt_auto.py", line 31, in populate_buy_trend
    return self.strategy.populate_buy_trend(dataframe, metadata)
  File "/freqtrade/user_data/strategies/Strategy004.py", line 149, in populate_buy_trend
    if self.buy_adx_enabled.value:
AttributeError: 'tuple' object has no attribute 'value'
  ```



Discussion:

Resolving patch:
diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py
--- a/freqtrade/__init__.py
+++ b/freqtrade/__init__.py
@@ -1,5 +1,5 @@
 """ Freqtrade bot """
-__version__ = 'develop'
+__version__ = '2021.8'
 
 if __version__ == 'develop':
 


Test patch: