Skip to content

Commit

Permalink
Give the maker entries more time to fill before attempting to retry u…
Browse files Browse the repository at this point in the history
…sing bestbid or bestask
  • Loading branch information
donewiththedollar committed Sep 9, 2024
1 parent dffc075 commit 9e442b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions directionalscalper/core/strategies/bybit/bybit_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5744,7 +5744,7 @@ def issue_grid_safely(side: str, grid_levels: list, amounts: list):
self.clear_grid(symbol, 'buy')
modified_grid_levels_long[0] = best_bid_price
issue_grid_safely('long', modified_grid_levels_long, amounts_long)
time.sleep(2)
time.sleep(4)
else:
logging.info(f"[{symbol}] Long position filled or max retries reached, exiting loop.")
break # Exit loop once the order is filled or max retries are reached
Expand Down Expand Up @@ -5784,7 +5784,7 @@ def issue_grid_safely(side: str, grid_levels: list, amounts: list):
self.clear_grid(symbol, 'sell')
modified_grid_levels_short[0] = best_ask_price
issue_grid_safely('short', modified_grid_levels_short, amounts_short)
time.sleep(2)
time.sleep(4)
else:
logging.info(f"[{symbol}] Short position filled or max retries reached, exiting loop.")
break # Exit loop once the order is filled or max retries are reached
Expand Down Expand Up @@ -5864,7 +5864,7 @@ def issue_grid_safely(side: str, grid_levels: list, amounts: list):
# Call issue_grid_safely with the modified grid levels
issue_grid_safely('long', modified_grid_levels_long, amounts_long)

time.sleep(2)
time.sleep(4)

# Update the last signal time and reset the MFIRSI signal
self.last_signal_time[symbol] = current_time
Expand Down Expand Up @@ -5897,7 +5897,7 @@ def issue_grid_safely(side: str, grid_levels: list, amounts: list):
# Call issue_grid_safely with the modified grid levels
issue_grid_safely('short', modified_grid_levels_short, amounts_short)

time.sleep(2)
time.sleep(4)

# Update the last signal time and reset the MFIRSI signal
self.last_signal_time[symbol] = current_time
Expand Down

0 comments on commit 9e442b8

Please sign in to comment.