Jump to content
Medved Trader Forums

Trading (and other) customizable Hotkeys functionality suggestions needed


Mike Medved
 Share

Recommended Posts

Dear MT Users :)

I am working on setting up fully customizable hot key support in MT. Mostly for trading.

 

example: on a chart place a bracket order at certain offsets from current price for a certain fraction of current position and send it

example: switch trading account to a different one

example: change the current quantity in the trading tab to a different number or a multiplier to current number

 

I need suggestions for what actions the user should be able to assign to a hotkey since each needs to be implemented differently. The editor for hotkeys also needs to be convenient in terms of UI. If you have an example of such UI somewhere, please link to it.

This functionality will also be available from something like AutoHotKey third party product, for more advanced users.

Link to comment
Share on other sites

The existing will work. The hotkeys that you assign will share the keys with the existing shortcuts, so if you assign a key that already is taken by a shortcut it will warn you that you're about to override it. And vice versa.

The "hotkeys" would be primarily (or exclusively? haven't decided yet) trading-oriented, and would be used for customizable rapid-fire placement and management of orders.

Link to comment
Share on other sites

Hi,

For quick orders it would be nice to have the following. 
I use these button in IB TWS to quickly enter trades at the ask or bid with a preset offset so that all my order goes through.
(The buttons with the *Asterix at the top right are armed and execute immediately)
But I like your charts better and it would need only 2 buttons and the quantity box.
Thanks.

Medved QAT Trade Buttons.png

IB TWS Trade Buttons.png

Edited by Marty
Link to comment
Share on other sites

Marty, we have a user that swears by AutoHotKey. If MT has the hotkey functionality, it will be able to interface with AutoHotKey that would be able to send anything the hotkeys allows through its own interface to MT - through a keypress or a button or whatever script you put into the AutoHotKey.

Of course, we will also make sure that the hotkeys would have an editor that will allow the function to be assigned to a keypress and be initiated inside MT.

Probably will allow a "Hotkey dashboard" window where you will be able to put in buttons that will be linked to hotkey scripts... will see.

Link to comment
Share on other sites

I have used AutoHotkey and like to have the buttons on each chart, that way I can trade on any chart.
The way I would use MT is I watch 11 stocks at a time on 1 min charts, if I see a setup I can quickly put the quantity and click the button, very easy :)
Currently this is how I use TWS but must make a button for each quantity (very annoying)

Edited by Marty
Link to comment
Share on other sites

5 minutes ago, Marty said:

I have used AutoHotkey and like to have the buttons on each chart, that way I can trade on any chart.
The way I would use MT is I watch 11 stocks at a time on 1 min charts, if I see a setup I can quickly put the quantity and click the button, very easy :)
Currently this is how I use TWS but must make a button for each quantity (very annoying)

Hmm. Maybe allow user to add a "hot key strip" somewhere on the window where you'd be able to put in buttons tied to hotkeys.

Basically once the hotkey functionality is there, how to execute them is a matter of UI and will follow :)

But I need to make a list of what that functionality will be and put it all in.

Link to comment
Share on other sites

Hey Mike!

Really excited to see this feature around the corner! My experience with hot keys and buttons has been with Lightspeed; there are two components (1) saved orders and (2) mapping the saved orders to hot keys and/or buttons. Some examples I use:

Sell Order (Half Position Size, 2 cents below the ASK) - Position sizes are 100%, 50%, 25%.

image.png

Buy Order (Buy 1,000 shares 2 cents above the ASK)

image.png

Sell Order (Sell position 2 cents below the BID, used to bailout of a position)

image.png

 

Hot Keys

CTRL+1,2,3,n to get into a position depending on the size I want

CTRL+A -- Sell All
CTRL+S -- Sell Half
CTRL+D -- Sell Quarter

CTRL+Z -- Sell All (Bailout)
CTRL+X -- Sell Half (Bailout)
CTRL+D -- Sell Quarter (Bailout)

Same letters used with SHIFT+, but the orders will be to the short side.

ALT+Q -- Cancels any open orders that match the symbol of the focused window. For example if I'm focused on a level 2 window with AMD displayed, hitting ALT+Q will cancel any open AMD orders.

image.png

image.png

Edited by Donald Q.
Link to comment
Share on other sites

Hello Mike,

Here's a feature request I posted some time ago, see if this can be incorporated

https://forums.medvedtrader.com/topic/3449-order-entry-template/#comment-17224

Hot keys for trading are major time saver, most beneficial for day trading, but I see myself using to manage basket orders, multiple bracket orders and sending executions for multiple broker accounts quickly. Creating and moving Trailing/stop limit orders.

As mentioned above, TWS allows saving preconfigured orders as hotkeys/hot buttons, which is great except TWS itself. :P

There is DAS trader Pro that caters to day traders and have simple order execution script language that traders love.

https://dastrader.com/docs/how-do-i-use-hotkeys/

Sample hotkey scripts for Buy Limit Order:

ROUTE=LIMIT;Price=Ask-0.5;Share=100;ACCOUNT=ACCTNUMBER;TIF=DAY+;BUY=Send

ROUTE=LIMIT;Price=Bid-0.05;Share=BP*0.25 ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=last*1.01;Share=BP*0.25;TIF=DAY+;HANDINST=ANY;BUY=SEND

Autohotkey is great, but in my opinion, if MT manages hotkeys internally, it will be more reliable, faster and flexible for growth.

Link to comment
Share on other sites

We have all this in mind. It will be, internally, JSON based, although we may do something like a DAS wizard that would convert to JSON.

Example of an order that could be placed with a hotkey (of course Conditional multi-leg orders would be possible too) (how in the world can you paste code nicely here?)

{

"Vars":
  {
  "tradeaction": "None",
  "If":

      [
          {

            "Condition": "=PositionQty>0",
            "Then": {"tradeaction": "Sell", "atprice": "=CurrentBid"},
            "Else": {"tradeaction": "Buy", "atprice": "=CurrentAsk"}
          }
          {

             "Condition": "=PositionQty=0",
            "Then": {"tradeaction": "None"},
          }
      ]
  }

   "Command":{

      "Order":{
         "Drop":true,
         "Autotransmit":false,
         "ConditionalType":"None",
         "Legs":[
            {
               "PosOnChart": 15,
               "Quantity":20,
               "Action":"=tradeaction",
               "OrderType":"Limit",
               "LimitPrice": "=atprice",
               "Routing":"Auto",
               "TIF":"GTC"
            }
         ]
      }
   }
}

 

 

 

Link to comment
Share on other sites

I use DAS trader. Their hotkeys are not bad They also allow hotkeys to be combined with clicking on charts.

Here are my suggestions:

1) I know the focus is on chart trading but it would be nice to also have the option to use trading hotkeys without having to click on a chart

2) Allow any key to be a hotkey. Eg all function keys, page-up, page-down, home, etc.

3) allow keys to be combined with Ctrl, Alt, Shift keys in making a hotkey.

4) allow hotkey text file to be input. This makes it easy to create and modify the hotkeys in Excel and output to a text file for input to the software.

Link to comment
Share on other sites

Arg. your points 2 and 3 is what we intend to do.

Point 1: the hotkey would be available from chart, DOM, L2 window or trade ticket. The reason is that there has to be some existing machinery to form/place the order and the trading site has to be pre-selected.

Point 4: Well. Currently, as in the post right above yours, the definition of a hotkey is a JSON string. I could I guess allow it to be input in DAS format, then MT would convert it to a JSON string.

 

Link to comment
Share on other sites

If you do make a hotkey text file input then it would be nice to be able to change input files easily - i.e. have a hotkey for input of a script file or even better have hotkeys that can be assigned to read in specific input files).  On my current platform I have one for going long and one for going short and they can be switched via a hotkey macro. The reason I do this is because I like to assign trading actions to normal keys and then have the ability to modify the same key by using it with the shift/ctrl/alt keys - so this really means I only have the function keys available plus a few others.

Link to comment
Share on other sites

I am not sure what you mean, Arg. Are you talking about MT's hotkey text files saved as one file per hot key in some known directory, then you changing the text files on the fly?

Or are you talking about the exact same text file being used as a hotkey, but being assigned to several key combos, and detecting inside itself which combo invoked it?

Link to comment
Share on other sites

I have two hotkey text files - one for long scenario and another for short scenario. Each one has about 50 hotkey commands, one per line. The two files are saved in the same directory using different names. The two files are reverse operations of each other line for line, and each line has the same hotkey. If I want to go long I press a macro hotkey and the long scenario text file is read in, and I have another macro hotkey which reads in the short scenario text file. I can switch quickly while trading, it only takes about 1 second to change over once I press the key.

 

Link to comment
Share on other sites

hmmm we're kind of leaning towards saving each hotkey in its own file. Which in your case would be a full directory reload.

But what you said gives me an idea. Maybe we could do a "global var" kind of thing that you could set in your hotkey settings that would be accessible from every hotkey JSON and would allow it to conditionally do different things.

Link to comment
Share on other sites

These are all good ideas with collective brainstorming. I look forward to implementation, I am sure there will be multiple iterations to accommodate everyone's needs.

I do want to add that if you can give option to use both hard number and relative % to calculate various items.

For example, when scalping, I scale orders by having multiple stop limit orders between 0.25% and 2% of last price for 100 shares each. A 1000 share position may have 10 stop orders.

Can there be a hot key that moves all open orders for an instrument by +/- n ticks or %? This will be like manually trailing the market price.

Link to comment
Share on other sites

All the parameters in the hotkeys will be calculable.

For what I currently have on "hotkeys" (they are right now implemented as having a paste of a JSON string into Chart and DOM windows):

A doc (incomplete, fluid, very much subject to change, but will give you an idea:

https://docs.google.com/document/d/16en463ICqnRfnSjrdWVsvcT5XeEZmhdTYNMCH5IP_lw

Link to comment
Share on other sites

I mentioned this in another thread referenced below, but a hot key to facilitate creating multiple Limit orders, to scale out of a multiple contract (or share) position would be nice.  This would require some form of % or point setting definitions to be created and utilized:

https://forums.medvedtrader.com/topic/3271-tutorials-for-conditional-orders-please/?tab=comments#comment-16619

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...