2025.09.08
This commit is contained in:
parent
bc8d621152
commit
f5740c735c
|
|
@ -1,3 +1,6 @@
|
|||
2025.09.08:
|
||||
. Re-enabled long to short autoswitch.
|
||||
|
||||
2025.09.07:
|
||||
. Increased wait time after sending market orders.
|
||||
|
||||
|
|
|
|||
2
main.py
2
main.py
|
|
@ -18,7 +18,7 @@ import exchange_wrapper
|
|||
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
|
||||
|
|
|
|||
14
trader.py
14
trader.py
|
|
@ -1136,6 +1136,12 @@ class trader:
|
|||
if not self.config.get_liquidate_after_switch():
|
||||
self.restart = True
|
||||
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
|
||||
self.status.set_pause_reason("filtering open orders")
|
||||
|
|
@ -1262,14 +1268,6 @@ class trader:
|
|||
self.pause = False
|
||||
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)
|
||||
self.status.set_status_string(self.generate_status_strings())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue