check_status does not return 1 if self.so is None
This commit is contained in:
parent
d29355d021
commit
9dfc063e23
|
|
@ -1,3 +1,6 @@
|
||||||
|
2025.01.31:
|
||||||
|
. In check_status, when safety order = None it does not return 1 anymore.
|
||||||
|
|
||||||
2025.01.10:
|
2025.01.10:
|
||||||
. Added is_paused to status_dict.
|
. Added is_paused to status_dict.
|
||||||
|
|
||||||
|
|
|
||||||
2
main.py
2
main.py
|
|
@ -24,7 +24,7 @@ In case the permissions of the certificate changes, reset them this way:
|
||||||
# ll /etc/letsencrypt/
|
# ll /etc/letsencrypt/
|
||||||
'''
|
'''
|
||||||
|
|
||||||
version = "2025.01.10"
|
version = "2025.01.31"
|
||||||
|
|
||||||
'''
|
'''
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -1116,7 +1116,7 @@ class trader:
|
||||||
#Here, would it be wise to attempt to reload the safety order from the status dict?
|
#Here, would it be wise to attempt to reload the safety order from the status dict?
|
||||||
self.broker.logger.log_this("Safety order is None",1,self.pair)
|
self.broker.logger.log_this("Safety order is None",1,self.pair)
|
||||||
self.so = self.broker.get_empty_order()
|
self.so = self.broker.get_empty_order()
|
||||||
return 1
|
#return 1
|
||||||
if self.tp_order["id"]=="":
|
if self.tp_order["id"]=="":
|
||||||
self.broker.logger.log_this(f"Take profit order missing. Stopping bot. Order ID: {self.tp_order['id']}",1,self.pair)
|
self.broker.logger.log_this(f"Take profit order missing. Stopping bot. Order ID: {self.tp_order['id']}",1,self.pair)
|
||||||
self.broker.cancel_order(self.so["id"],self.pair)
|
self.broker.cancel_order(self.so["id"],self.pair)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue