mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Reduce limit order cross threshold
This commit is contained in:
@@ -613,6 +613,7 @@ Once you will be happy with your bot performance running in the Dry-run mode, yo
|
||||
* Orders are simulated, and will not be posted to the exchange.
|
||||
* Market orders fill based on orderbook volume the moment the order is placed.
|
||||
* Limit orders fill once the price reaches the defined level - or time out based on `unfilledtimeout` settings.
|
||||
* Limit orders will be converted to market orders if they cross the price by more than 1%.
|
||||
* In combination with `stoploss_on_exchange`, the stop_loss price is assumed to be filled.
|
||||
* Open orders (not trades, which are stored in the database) are kept open after bot restarts, with the assumption that they were not filled while being offline.
|
||||
|
||||
|
||||
@@ -863,8 +863,8 @@ class Exchange:
|
||||
if self.exchange_has('fetchL2OrderBook'):
|
||||
orderbook = self.fetch_l2_order_book(pair, 20)
|
||||
if ordertype == "limit" and orderbook:
|
||||
# Allow a 3% price difference
|
||||
allowed_diff = 0.03
|
||||
# Allow a 1% price difference
|
||||
allowed_diff = 0.01
|
||||
if self._dry_is_price_crossed(pair, side, rate, orderbook, allowed_diff):
|
||||
logger.info(
|
||||
f"Converted order {pair} to market order due to price {rate} crossing spread "
|
||||
|
||||
Reference in New Issue
Block a user