fixed missing programmed_stop flag toggle
This commit is contained in:
parent
bb796f6933
commit
f6dba9a098
3
main.py
3
main.py
|
|
@ -1665,7 +1665,7 @@ def unwrapped_last_call(base,quote):
|
|||
|
||||
def unwrapped_deferred_last_call(base,quote,yyyymmdd):
|
||||
'''
|
||||
Programs the trader to not open new deals from a certain future date. Like a VCR.
|
||||
Programs the trader to not open new deals from a certain future date.
|
||||
|
||||
Parameters:
|
||||
base (str): The base currency of the pair.
|
||||
|
|
@ -1686,6 +1686,7 @@ def unwrapped_deferred_last_call(base,quote,yyyymmdd):
|
|||
for x in running_instances:
|
||||
if f"{base}{quote}"==x.pair:
|
||||
x.config.set_programmed_stop_time(limit)
|
||||
x.config.set_programmed_stop(True)
|
||||
#save config file to disk
|
||||
x.broker.rewrite_config_file()
|
||||
return jsonify({"Success": f"Trader scheduled to go offline when profit is reached after {limit}"})
|
||||
|
|
|
|||
Loading…
Reference in New Issue