We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Crash on PrecisionFilter logic
Just got this crash from the PrecisionFilter on a develop based new branch, running it on FTX leveraged tokens. This error never happened before.

```
2020-03-28 00:43:49,891 - freqtrade.commands.trade_commands - INFO - worker found ... calling exit
2020-03-28 00:43:49,891 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'type': status, 'status': 'process died'}
2020-03-28 00:43:49,953 - freqtrade.freqtradebot - INFO - Cleaning up modules ...
2020-03-28 00:43:49,953 - freqtrade.rpc.rpc_manager - INFO - Cleaning up rpc modules ...
2020-03-28 00:44:05,419 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/commands/trade_commands.py", line 20, in start_trading
    worker.run()
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 66, in run
    state = self._worker(old_state=state)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 104, in _worker
    self._throttle(func=self._process_running, throttle_secs=self._throttle_secs)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 125, in _throttle
    result = func(*args, **kwargs)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 139, in _process_running
    self.freqtrade.process()
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py", line 142, in process
    self.active_pair_whitelist = self._refresh_whitelist(trades)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py", line 168, in _refresh_whitelist
    self.pairlists.refresh_pairlist()
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/pairlistmanager.py", line 91, in refresh_pairlist
    pairlist = pl.filter_pairlist(pairlist, tickers)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py", line 59, in filter_pairlist
    if not ticker or (stoploss and not self._validate_precision_filter(ticker, stoploss)):
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py", line 36, in _validate_precision_filter
    stop_price = ticker['ask'] * stoploss
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
```
Crash on PrecisionFilter logic
Just got this crash from the PrecisionFilter on a develop based new branch, running it on FTX leveraged tokens. This error never happened before.

```
2020-03-28 00:43:49,891 - freqtrade.commands.trade_commands - INFO - worker found ... calling exit
2020-03-28 00:43:49,891 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'type': status, 'status': 'process died'}
2020-03-28 00:43:49,953 - freqtrade.freqtradebot - INFO - Cleaning up modules ...
2020-03-28 00:43:49,953 - freqtrade.rpc.rpc_manager - INFO - Cleaning up rpc modules ...
2020-03-28 00:44:05,419 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/commands/trade_commands.py", line 20, in start_trading
    worker.run()
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 66, in run
    state = self._worker(old_state=state)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 104, in _worker
    self._throttle(func=self._process_running, throttle_secs=self._throttle_secs)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 125, in _throttle
    result = func(*args, **kwargs)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py", line 139, in _process_running
    self.freqtrade.process()
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py", line 142, in process
    self.active_pair_whitelist = self._refresh_whitelist(trades)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py", line 168, in _refresh_whitelist
    self.pairlists.refresh_pairlist()
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/pairlistmanager.py", line 91, in refresh_pairlist
    pairlist = pl.filter_pairlist(pairlist, tickers)
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py", line 59, in filter_pairlist
    if not ticker or (stoploss and not self._validate_precision_filter(ticker, stoploss)):
  File "/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py", line 36, in _validate_precision_filter
    stop_price = ticker['ask'] * stoploss
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `freqtrade/pairlist/PriceFilter.py`
Content:
```
1 import logging
2 from copy import deepcopy
3 from typing import Any, Dict, List
4 
5 from freqtrade.pairlist.IPairList import IPairList
6 
7 logger = logging.getLogger(__name__)
8 
9 
10 class PriceFilter(IPairList):
11 
12     def __init__(self, exchange, pairlistmanager,
13                  config: Dict[str, Any], pairlistconfig: Dict[str, Any],
14                  pairlist_pos: int) -> None:
15         super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)
16 
17         self._low_price_ratio = pairlistconfig.get('low_price_ratio', 0)
18 
19     @property
20     def needstickers(self) -> bool:
21         """
22         Boolean property defining if tickers are necessary.
23         If no Pairlist requries tickers, an empty List is passed
24         as tickers argument to filter_pairlist
25         """
26         return True
27 
28     def short_desc(self) -> str:
29         """
30         Short whitelist method description - used for startup-messages
31         """
32         return f"{self.name} - Filtering pairs priced below {self._low_price_ratio * 100}%."
33 
34     def _validate_ticker_lowprice(self, ticker) -> bool:
35         """
36         Check if if one price-step (pip) is > than a certain barrier.
37         :param ticker: ticker dict as returned from ccxt.load_markets()
38         :return: True if the pair can stay, false if it should be removed
39         """
40         compare = ticker['last'] + self._exchange.price_get_one_pip(ticker['symbol'],
41                                                                     ticker['last'])
42         changeperc = (compare - ticker['last']) / ticker['last']
43         if changeperc > self._low_price_ratio:
44             self.log_on_refresh(logger.info, f"Removed {ticker['symbol']} from whitelist, "
45                                              f"because 1 unit is {changeperc * 100:.3f}%")
46             return False
47         return True
48 
49     def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
50 
51         """
52         Filters and sorts pairlist and returns the whitelist again.
53         Called on each bot iteration - please use internal caching if necessary
54         :param pairlist: pairlist to filter or sort
55         :param tickers: Tickers (from exchange.get_tickers()). May be cached.
56         :return: new whitelist
57         """
58         # Copy list since we're modifying this list
59         for p in deepcopy(pairlist):
60             ticker = tickers.get(p)
61             if not ticker:
62                 pairlist.remove(p)
63 
64             # Filter out assets which would not allow setting a stoploss
65             if self._low_price_ratio and not self._validate_ticker_lowprice(ticker):
66                 pairlist.remove(p)
67 
68         return pairlist
69
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/freqtrade/pairlist/PriceFilter.py b/freqtrade/pairlist/PriceFilter.py
--- a/freqtrade/pairlist/PriceFilter.py
+++ b/freqtrade/pairlist/PriceFilter.py
@@ -37,6 +37,12 @@
         :param ticker: ticker dict as returned from ccxt.load_markets()
         :return: True if the pair can stay, false if it should be removed
         """
+        if ticker['last'] is None:
+
+            self.log_on_refresh(logger.info,
+                                f"Removed {ticker['symbol']} from whitelist, because "
+                                "ticker['last'] is empty (Usually no trade in the last 24h).")
+            return False
         compare = ticker['last'] + self._exchange.price_get_one_pip(ticker['symbol'],
                                                                     ticker['last'])
         changeperc = (compare - ticker['last']) / ticker['last']
@@ -47,7 +53,6 @@
         return True
 
     def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:
-
         """
         Filters and sorts pairlist and returns the whitelist again.
         Called on each bot iteration - please use internal caching if necessary

{"golden_diff": "diff --git a/freqtrade/pairlist/PriceFilter.py b/freqtrade/pairlist/PriceFilter.py\n--- a/freqtrade/pairlist/PriceFilter.py\n+++ b/freqtrade/pairlist/PriceFilter.py\n@@ -37,6 +37,12 @@\n         :param ticker: ticker dict as returned from ccxt.load_markets()\n         :return: True if the pair can stay, false if it should be removed\n         \"\"\"\n+        if ticker['last'] is None:\n+\n+            self.log_on_refresh(logger.info,\n+                                f\"Removed {ticker['symbol']} from whitelist, because \"\n+                                \"ticker['last'] is empty (Usually no trade in the last 24h).\")\n+            return False\n         compare = ticker['last'] + self._exchange.price_get_one_pip(ticker['symbol'],\n                                                                     ticker['last'])\n         changeperc = (compare - ticker['last']) / ticker['last']\n@@ -47,7 +53,6 @@\n         return True\n \n     def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:\n-\n         \"\"\"\n         Filters and sorts pairlist and returns the whitelist again.\n         Called on each bot iteration - please use internal caching if necessary\n", "issue": "Crash on PrecisionFilter logic\nJust got this crash from the PrecisionFilter on a develop based new branch, running it on FTX leveraged tokens. This error never happened before.\r\n\r\n```\r\n2020-03-28 00:43:49,891 - freqtrade.commands.trade_commands - INFO - worker found ... calling exit\r\n2020-03-28 00:43:49,891 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'type': status, 'status': 'process died'}\r\n2020-03-28 00:43:49,953 - freqtrade.freqtradebot - INFO - Cleaning up modules ...\r\n2020-03-28 00:43:49,953 - freqtrade.rpc.rpc_manager - INFO - Cleaning up rpc modules ...\r\n2020-03-28 00:44:05,419 - freqtrade - ERROR - Fatal exception!\r\nTraceback (most recent call last):\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/main.py\", line 36, in main\r\n    return_code = args['func'](args)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/commands/trade_commands.py\", line 20, in start_trading\r\n    worker.run()\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 66, in run\r\n    state = self._worker(old_state=state)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 104, in _worker\r\n    self._throttle(func=self._process_running, throttle_secs=self._throttle_secs)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 125, in _throttle\r\n    result = func(*args, **kwargs)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 139, in _process_running\r\n    self.freqtrade.process()\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py\", line 142, in process\r\n    self.active_pair_whitelist = self._refresh_whitelist(trades)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py\", line 168, in _refresh_whitelist\r\n    self.pairlists.refresh_pairlist()\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/pairlistmanager.py\", line 91, in refresh_pairlist\r\n    pairlist = pl.filter_pairlist(pairlist, tickers)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py\", line 59, in filter_pairlist\r\n    if not ticker or (stoploss and not self._validate_precision_filter(ticker, stoploss)):\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py\", line 36, in _validate_precision_filter\r\n    stop_price = ticker['ask'] * stoploss\r\nTypeError: unsupported operand type(s) for *: 'NoneType' and 'float'\r\n```\nCrash on PrecisionFilter logic\nJust got this crash from the PrecisionFilter on a develop based new branch, running it on FTX leveraged tokens. This error never happened before.\r\n\r\n```\r\n2020-03-28 00:43:49,891 - freqtrade.commands.trade_commands - INFO - worker found ... calling exit\r\n2020-03-28 00:43:49,891 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'type': status, 'status': 'process died'}\r\n2020-03-28 00:43:49,953 - freqtrade.freqtradebot - INFO - Cleaning up modules ...\r\n2020-03-28 00:43:49,953 - freqtrade.rpc.rpc_manager - INFO - Cleaning up rpc modules ...\r\n2020-03-28 00:44:05,419 - freqtrade - ERROR - Fatal exception!\r\nTraceback (most recent call last):\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/main.py\", line 36, in main\r\n    return_code = args['func'](args)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/commands/trade_commands.py\", line 20, in start_trading\r\n    worker.run()\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 66, in run\r\n    state = self._worker(old_state=state)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 104, in _worker\r\n    self._throttle(func=self._process_running, throttle_secs=self._throttle_secs)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 125, in _throttle\r\n    result = func(*args, **kwargs)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/worker.py\", line 139, in _process_running\r\n    self.freqtrade.process()\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py\", line 142, in process\r\n    self.active_pair_whitelist = self._refresh_whitelist(trades)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/freqtradebot.py\", line 168, in _refresh_whitelist\r\n    self.pairlists.refresh_pairlist()\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/pairlistmanager.py\", line 91, in refresh_pairlist\r\n    pairlist = pl.filter_pairlist(pairlist, tickers)\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py\", line 59, in filter_pairlist\r\n    if not ticker or (stoploss and not self._validate_precision_filter(ticker, stoploss)):\r\n  File \"/Users/yazeed/Sites/freqtradeLATEST/freqtrade/pairlist/PrecisionFilter.py\", line 36, in _validate_precision_filter\r\n    stop_price = ticker['ask'] * stoploss\r\nTypeError: unsupported operand type(s) for *: 'NoneType' and 'float'\r\n```\n", "before_files": [{"content": "import logging\nfrom copy import deepcopy\nfrom typing import Any, Dict, List\n\nfrom freqtrade.pairlist.IPairList import IPairList\n\nlogger = logging.getLogger(__name__)\n\n\nclass PriceFilter(IPairList):\n\n    def __init__(self, exchange, pairlistmanager,\n                 config: Dict[str, Any], pairlistconfig: Dict[str, Any],\n                 pairlist_pos: int) -> None:\n        super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)\n\n        self._low_price_ratio = pairlistconfig.get('low_price_ratio', 0)\n\n    @property\n    def needstickers(self) -> bool:\n        \"\"\"\n        Boolean property defining if tickers are necessary.\n        If no Pairlist requries tickers, an empty List is passed\n        as tickers argument to filter_pairlist\n        \"\"\"\n        return True\n\n    def short_desc(self) -> str:\n        \"\"\"\n        Short whitelist method description - used for startup-messages\n        \"\"\"\n        return f\"{self.name} - Filtering pairs priced below {self._low_price_ratio * 100}%.\"\n\n    def _validate_ticker_lowprice(self, ticker) -> bool:\n        \"\"\"\n        Check if if one price-step (pip) is > than a certain barrier.\n        :param ticker: ticker dict as returned from ccxt.load_markets()\n        :return: True if the pair can stay, false if it should be removed\n        \"\"\"\n        compare = ticker['last'] + self._exchange.price_get_one_pip(ticker['symbol'],\n                                                                    ticker['last'])\n        changeperc = (compare - ticker['last']) / ticker['last']\n        if changeperc > self._low_price_ratio:\n            self.log_on_refresh(logger.info, f\"Removed {ticker['symbol']} from whitelist, \"\n                                             f\"because 1 unit is {changeperc * 100:.3f}%\")\n            return False\n        return True\n\n    def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:\n\n        \"\"\"\n        Filters and sorts pairlist and returns the whitelist again.\n        Called on each bot iteration - please use internal caching if necessary\n        :param pairlist: pairlist to filter or sort\n        :param tickers: Tickers (from exchange.get_tickers()). May be cached.\n        :return: new whitelist\n        \"\"\"\n        # Copy list since we're modifying this list\n        for p in deepcopy(pairlist):\n            ticker = tickers.get(p)\n            if not ticker:\n                pairlist.remove(p)\n\n            # Filter out assets which would not allow setting a stoploss\n            if self._low_price_ratio and not self._validate_ticker_lowprice(ticker):\n                pairlist.remove(p)\n\n        return pairlist\n", "path": "freqtrade/pairlist/PriceFilter.py"}], "after_files": [{"content": "import logging\nfrom copy import deepcopy\nfrom typing import Any, Dict, List\n\nfrom freqtrade.pairlist.IPairList import IPairList\n\nlogger = logging.getLogger(__name__)\n\n\nclass PriceFilter(IPairList):\n\n    def __init__(self, exchange, pairlistmanager,\n                 config: Dict[str, Any], pairlistconfig: Dict[str, Any],\n                 pairlist_pos: int) -> None:\n        super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)\n\n        self._low_price_ratio = pairlistconfig.get('low_price_ratio', 0)\n\n    @property\n    def needstickers(self) -> bool:\n        \"\"\"\n        Boolean property defining if tickers are necessary.\n        If no Pairlist requries tickers, an empty List is passed\n        as tickers argument to filter_pairlist\n        \"\"\"\n        return True\n\n    def short_desc(self) -> str:\n        \"\"\"\n        Short whitelist method description - used for startup-messages\n        \"\"\"\n        return f\"{self.name} - Filtering pairs priced below {self._low_price_ratio * 100}%.\"\n\n    def _validate_ticker_lowprice(self, ticker) -> bool:\n        \"\"\"\n        Check if if one price-step (pip) is > than a certain barrier.\n        :param ticker: ticker dict as returned from ccxt.load_markets()\n        :return: True if the pair can stay, false if it should be removed\n        \"\"\"\n        if ticker['last'] is None:\n\n            self.log_on_refresh(logger.info,\n                                f\"Removed {ticker['symbol']} from whitelist, because \"\n                                \"ticker['last'] is empty (Usually no trade in the last 24h).\")\n            return False\n        compare = ticker['last'] + self._exchange.price_get_one_pip(ticker['symbol'],\n                                                                    ticker['last'])\n        changeperc = (compare - ticker['last']) / ticker['last']\n        if changeperc > self._low_price_ratio:\n            self.log_on_refresh(logger.info, f\"Removed {ticker['symbol']} from whitelist, \"\n                                             f\"because 1 unit is {changeperc * 100:.3f}%\")\n            return False\n        return True\n\n    def filter_pairlist(self, pairlist: List[str], tickers: Dict) -> List[str]:\n        \"\"\"\n        Filters and sorts pairlist and returns the whitelist again.\n        Called on each bot iteration - please use internal caching if necessary\n        :param pairlist: pairlist to filter or sort\n        :param tickers: Tickers (from exchange.get_tickers()). May be cached.\n        :return: new whitelist\n        \"\"\"\n        # Copy list since we're modifying this list\n        for p in deepcopy(pairlist):\n            ticker = tickers.get(p)\n            if not ticker:\n                pairlist.remove(p)\n\n            # Filter out assets which would not allow setting a stoploss\n            if self._low_price_ratio and not self._validate_ticker_lowprice(ticker):\n                pairlist.remove(p)\n\n        return pairlist\n", "path": "freqtrade/pairlist/PriceFilter.py"}]}