Skip to content
cargocultscience edited this page May 8, 2024 · 56 revisions

Hotkeys

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!

  1. Ensure that you have the "Order Panel" somewhere on the TSX page layout. DOM traders take note, you may have turned this off. image
  2. Download the following extension for Chrome https://www.autocontrol.app/
  3. Import the following file topstep-auto-control.acs into the extension image
  4. Once the file is loaded you should see sections like the following image
  5. You may use your keyboard to execute any of the mapped shortcut

StreamDeck

image

  1. StreamDeck profile for TopStepX Hotkeys can be downloaded here TopStepX.Cargocult.streamDeckProfile

Order Buttons

  • Buy
  • Sell
  • Join Bid
  • Join Ask
  • Close
  • Reverse
  • Cancel Orders
  • Flatten All
  • Cancel All

Set Quantity

  • Hotkeys for setting the value of the quantity box to 1,2,3,4,5,10,15

Market Buy/Sell Quantity

  • Hotkeys for buy/sell of 1,2,3,4,5,10,15

Join Passive Side of Book At Fixed Quantity

  • Hotkeys for buy/sell of 1,2,3,4,5,10,15

Change contract

  • Generic function added to switch to any symbol
  • es, nq, gc, cl, ym, nkd, rty, si, mnq, mes explicitly mapped to numpad 1-9

Change account

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.
image

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.

Installing and Editing Config

Install

Edit

  • 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" image image

StreamDeck

  • once this is in place you can map any StreamDeck key to the account switch key sequences defined above image

celsius-celsius-energy Venmo Tip Jar image

Clone this wiki locally