Why don't you use ibcontroller? Is Mark's program faster? Or you already put too much effort into it so you just use it... (Btw, I also tried Mark's program's earlier version on linux with wine, but it crashed (probably because of wine), so I did not experiment with it, and went with the java) Asterix.
When I glanced at Mark's AHK script, I had no trouble understanding what it did despite not ever having used AHK before, and with that as a starting point, I'll never have to rely on somebody else to adapt it to my needs. Being able to fix things myself is important to me, particularly as it relates to trading, and AHK lets me do just that.
Because I need to kill time waiting for the next setup (I'm using my 2nd pc for that), and probably also because i need to get a life...lol
As someone who was very disappointed by IBâs decision to remove single-click trading from BookTrader, I want to chime in and say that the IBController solution is working great for me. It took some time to figure out how to get it setup and working, but Iâm glad I did. I actually appreciate some of the other functionality it provides, making my logins quicker and automatically closing dialogue boxes I donât care about. Big props to Asterix for updating IBController. Not only did it keep me from having to subscribe to software I donât want (e.g. Buttontrader), but it lets me keep using my favorite DOM⦠Iâve tried or used most of the ones on the market, and for my style of trading I find BookTrader to be the best. Thanks!
Auto_Confirm_v6.exe + source Since the "transmit" button changes its position relatively to the x coordinate of the mouse on the screens when you submit the order with Booktrader , I used an if statement to branch the execution of the script. Thus now it's just 1 click for each condition. Plus to avoid accidental clicks triggered by the loop since sometimes it was running faster than TWS and triggered a second click because the "Order Confirmation" Window wasn't closed yet, now the script makes sure it's closed before running the next iteration. Piece of code to illustrate the core of the script: Loop { WinWait, Order Confirmation ;waits for window titled Order Confirmation CoordMode, Mouse,Screen ;sets mouse cordinates mode to relative to screen MouseGetPos, xpos, ypos ;Stores mouse coordinates to variables if ( xpos >= 300) ;if mouse x coordinate is greater than or equal to 300 then... { CoordMode, Mouse,Relative ;sets mouse coordinates mode to relative to active window, that is the "Order Confirmation" window Click 278,104 ;mouse move & click coordinates } else ;duh! ;D { CoordMode, Mouse,Relative ;sets mouse coordinates mode to relative to active window Click 50,104 ;mouse move & click coordinates } CoordMode, Mouse,Screen ;sets mouse coordinates mode to relative to screen Mousemove xpos, ypos ;moves mouse to stored coordinates(back to initial click position) winwaitclose,Order Confirmation ;This way the script won't trigger another loop iteration until the Conf. Window is closed (no more random clicks) } Exe and source inside the zip file
Many thanks for your effort, Mark and Asterix. I'm sticking with AHK script for now, it's a more flexible solution in case IB makes some changes to the pop-up. It's relatively easy to modify the script and recompile the exe. Below is a ReadMe about how to install and use Auto_Confirm.exe. All this info is scattered over a few posts in the very long thread, which makes things a bit confusing, especially for less experienced members and also for those who have never used AutoHotkey. The ReadMe could be included in the zip package as ReadMe.txt. -------- ReadMe -------- "Auto_Confirm_exe" is built from an AutoHotkey script. You can learn more about the scripts and how to compile them by following the link below: http://www.autohotkey.com/ However, to get "Auto_Confirm_exe" working, you do not have to download or install anything from AutoHotkey website, everything needed is already included in the zip file "auto_confirm_v*.exe + source.zip". The zip file contains: a) auto_confirm_v*.exe - this is the actual executable b) auto_confirm_v*.ahk - source file, useful if you decide to modify and then compile the script yourself c) ReadMe.txt - help file In order to get the script running please do the following (instructions are for Windows XP but should be similar with Vista or Win-7): 1) Unpack the zip file (r-click on the file and select program like 7-zip, WinZip, etc). The contents of zip file should be extracted to any empty folder. It's always a good idea to have things organized, so for example, if your TWS is installed in: C:\Program Files\Jts you can create a new folder and subfolder: C:\Program Files\JtsAddons\AutoConfirm and extract the files there. 2) Create shortcuts to Start Menu and/or Desktop icon: - from Windows Explorer single click on the file "Auto_Confirm_v*.exe" (don't double click at the file at this point!) - select: File - Create Shortcut - single click on created shortcut and hit Ctrl+C - go to: C:\Documents and Settings\YourUserProfile\Start Menu\Programs - select the folder where you want to copy the shortcut to and hit Ctrl+V - you can create a Desktop icon the same way, the icons are in: C:\Documents and Settings\YourUserProfile\Desktop - after the shortcuts have been successfully copied to Start Menu and/or Desktop they can be deleted from their original location. To use the script you need to do the following: - start TWS (it can also be started after the script has been launched) - click on the new Desktop icon or launch the script from the Start Menu - a new icon that looks like "H" will appear in System Tray (right bottom corner of the screen) - you can pause or exit (stop) the script by right clicking on this icon. You can also pause the script by hitting Pause key Below are a few things to remember. 1) Whenever a window titled Order Confirmation pops up it is automatically selected and Transmit button is clicked. If, at any time, you really want to be able to confirm the order by clicking on this or any other similar pop-up, you will have to first pause or stop (exit) the script. 2) Pause/Break key is linked to AutoConfirm so it won't work normally (Win+Break works ok, though). To assign a different key to perform Pause function you would need to modify AHK file and recompile it.
Hey thanks for the ReadMe file, I will include it with next releases (even though I'm pretty sure this is the final, unless they change something), good job
I received a message from a fellow trader who thought there was a problem with the script: See image below: