Removing Orders Programmatically from Order Manager
Author: boreland
Creation Date: 11/4/2016 6:12 PM
profile picture

boreland

#1
Is there there a way to removed cancelled orders programmatically from the order manager? With 15sec charts the list starts to get very long and difficult to manage.

Ok I found the auto remove button.
profile picture

Cone

#2
Unfortunately not. :(

You might be able to create an AutoIT script to hit the "Remove Completed" button every few minutes. I'll give it a try and let you know.
profile picture

Cone

#3
The following AutoIT script clicks the "Remove Completed" button about every 5 minutes between 9am and 4pm. Make sure to start it after 9am (local time) or it will terminate immediately!

The Orders tool needs to be open (can be minimized) with the proper Account selected.

CODE:
Please log in to see this code.
profile picture

boreland

#4
@cone Very creative and interesting solution. Where does this scrip get run. Inside a strategy or someplace else?
profile picture

Cone

#5
It runs in its own AutoIt process that looks for a window with the assigned $hWnd title and sends keystrokes and mouse clicks to that $hWnd process.

The scripts are saved as "au3" files that you can right click and run, or, you can compile a script and generate an "exe" to run on a machine that doesn't have AutoIT installed.

Everything to know about AutoIt is here -> https://www.autoitscript.com/site/
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).