2025.09.08

This commit is contained in:
Nicolás Sánchez 2025-09-08 18:21:35 -03:00
parent bc8d621152
commit f5740c735c
3 changed files with 11 additions and 10 deletions

View File

@ -1,3 +1,6 @@
2025.09.08:
. Re-enabled long to short autoswitch.
2025.09.07: 2025.09.07:
. Increased wait time after sending market orders. . Increased wait time after sending market orders.

View File

@ -18,7 +18,7 @@ import exchange_wrapper
import trader import trader
version = "2025.09.07" version = "2025.09.09"
''' '''
Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

View File

@ -1135,7 +1135,13 @@ class trader:
self.switch_to_long(already_received_quote=self.status.get_quote_spent()) self.switch_to_long(already_received_quote=self.status.get_quote_spent())
if not self.config.get_liquidate_after_switch(): if not self.config.get_liquidate_after_switch():
self.restart = True self.restart = True
return 1 return 1
#Check for autoswitch (long->short)
if not self.config.get_is_short() and self.status.get_so_amount()==self.status.get_no_of_safety_orders() and self.config.get_autoswitch():
self.switch_to_short()
self.status.save_to_file(is_backup=True)
self.restart = True
return 0
#Extract ids from order list #Extract ids from order list
self.status.set_pause_reason("filtering open orders") self.status.set_pause_reason("filtering open orders")
@ -1262,14 +1268,6 @@ class trader:
self.pause = False self.pause = False
self.update_status(True) self.update_status(True)
#Check for autoswitch (long->short)
#Commented out because i'm not sure where this should go
#if not self.config.get_is_short() and self.status.get_so_amount()==self.status.get_no_of_safety_orders() and self.config.get_autoswitch():
# self.switch_to_short()
# self.status.save_to_file(is_backup=True)
# self.restart = True
# return 0
#Render status line(s) #Render status line(s)
self.status.set_status_string(self.generate_status_strings()) self.status.set_status_string(self.generate_status_strings())