Reduced the amount of 'calculating optimal order size' notifications when starting a short trader
This commit is contained in:
parent
d0a189b68a
commit
35dc6e75ce
|
|
@ -356,8 +356,8 @@ class trader:
|
||||||
#if step==0:
|
#if step==0:
|
||||||
# step = self.broker.amount_to_precision(self.config.get_pair(),min_size)
|
# step = self.broker.amount_to_precision(self.config.get_pair(),min_size)
|
||||||
previous_size = 0
|
previous_size = 0
|
||||||
|
self.broker.logger.log_this(f"Calculating optimal order size ...",2,self.config.get_pair())
|
||||||
while True: #This loop should have a safeguard
|
while True: #This loop should have a safeguard
|
||||||
self.broker.logger.log_this(f"Calculating optimal order size ...",2,self.config.get_pair())
|
|
||||||
total_cost = self.dca_cost_calculator(total_size,amount_of_safety_orders,scalar)
|
total_cost = self.dca_cost_calculator(total_size,amount_of_safety_orders,scalar)
|
||||||
if total_cost>=amount:
|
if total_cost>=amount:
|
||||||
return previous_size
|
return previous_size
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue