-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Hotkey support is currently implemented using a Chrome extension called AutoControl which allows the execution of JavaScript for a given key press combination. The JavaScript is used to search for page elements (eg Buttons) and preform actions (eg click event). Note that if TopStepX changes the HTML structure page this approach may break until updates can be made to index into the right element.
By downloading this code, you agree that it is for entertainment purposes only. Authors assume no responsibility for any actions this code performs
If you find this work useful, please considering donating paypal / venmo so I can buy more TSX combines!
- Ensure that you have the "Order Panel" somewhere on the TSX page layout. DOM traders take note, you may have turned this off.
- Download the following extension for Chrome https://www.autocontrol.app/
- Import the following file topstep-auto-control.acs into the extension
- Once the file is loaded you should see sections like the following
- You may use your keyboard to execute any of the mapped shortcut
- StreamDeck profile for TopStepX Hotkeys can be downloaded here TopStepX.Cargocult.streamDeckProfile
- Buy
- Sell
- Join Bid
- Join Ask
- Close
- Reverse
- Cancel Orders
- Flatten All
- Cancel All
- Hotkeys for setting the value of the quantity box to 1,2,3,4,5,10,15
- Hotkeys for buy/sell of 1,2,3,4,5,10,15
- Hotkeys for buy/sell of 1,2,3,4,5,10,15
- Generic function added to switch to any symbol
- es, nq, gc, cl, ym, nkd, rty, si, mnq, mes explicitly mapped to numpad 1-9
Account changing works by matching any part of a string (eg 'ACCOUNTFEB123' will match on '123'). Therefore make sure that the strings you use to reference accounts are unique relative to your set of account names. I typically will use the last 5 digits of the account number.
Since everyone's account numbers will be different, and we wish to allow updates to the hotkey code to not wipe out peoples account data, we will allow for a small config file to live on the user's machine that is referenced by the hotkey system.
By default this file is expected to be at C:\topstepx\hotkey-configs.js. I suggest you put your file here to make hotkey updates easier in the future. If you choose a different location that is ok but you will need to repoint to the new location when you take up a new AutoControl file (eg when a new feature is added)
The format of the account switching config is relatively simple
hotkey_accounts = ['practice', '12345']
The order in which the accounts appears in the above will determine which account maps to which hotkey.
The way that this will work is that up to 20 (more can be added if needed) accounts are mapped to hotkeys:
- ctrl + numpad1...numpad0 for accounts 1-10
- alt + numpad1..numpad0 for accounts 11-20
For the example above 'practice' appears in position 1, the first account that matches 'practice' will be switched to when ctrl+numpad1 is pressed. Similarly, '12345' appears in position 2 and therefore the first account that matches '12345' will be selected when ctrl+numpad2 is pressed.
- sample config can be found here: https://github.com/cargocultscience/topstepx/blob/main/hotkeys/hotkey-config.js
- download the config and install it somewhere on your machine. I highly recommend using C:\topstepx\ as a directory to avoid needing to make edits on hotkey code updates in the future.
- you may use any text editor to change the value of the config to match your accounts
- additionally you may use AutoControls built in editor and edit the script "TopStepX Load Config"
- once this is in place you can map any StreamDeck key to the account switch key sequences defined above
Venmo Tip Jar