-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hello ejtraderCT Team,
I am experiencing an issue with the close_all method in the Ctrader class, which is not functioning as expected in my implementation. The method is supposed to close all open positions, but it fails to do so. Here's the relevant snippet from my main.py:
python code
def process_close_all():
# ... code to update and log current positions ...
update_positions_list()
current_positions = api.positions()
ctrader.close_all()
time.sleep(1)
# ... logging message ...
Despite calling ctrader.close_all(), the positions remain open. The close_all method is invoked after retrieving the current positions, but the subsequent positions check reveals that they are not closed. This issue occurs even though there are active positions present.
Could you please help me understand if there's a known issue with this method or if I might be missing something in my implementation? Any guidance or suggestions for troubleshooting this would be greatly appreciated.
Thank you for your assistance.