fixed boosted flag
This commit is contained in:
parent
8869b7226f
commit
df16f76c6b
|
|
@ -1151,10 +1151,10 @@ class trader:
|
|||
tp_level = profit_table[order_index] #it just returns the last value. Otherwise, the percentage gets very small.
|
||||
|
||||
#BOOST LOGIC: If the trader closed n amount of deals within the last t seconds, raise the take profit level by x%
|
||||
should_it_be_boosted = not self.config.get_is_short() and self.check_boosted()
|
||||
if should_it_be_boosted:
|
||||
self.status.set_is_boosted(should_it_be_boosted)
|
||||
if not self.config.get_is_short() and self.check_boosted():
|
||||
self.status.set_is_boosted(True)
|
||||
return tp_level+self.config.get_boosted_amount()
|
||||
self.status.set_is_boosted(False)
|
||||
return tp_level
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue