3acor Posted August 19 Report Share Posted August 19 Can a hotkey be configured to be executed on the chart according to the account linked on the chart? So for example, if account ABC is selected on the chart, the hotkey will for examplebuy 100 shares If account XYZ is selected on the chart, the hotkey will for example sell 50 shares Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 19 Report Share Posted August 19 sure, the quantity field can have an expression. for example: Account == "11223344" ? 100 : 50 Quote Link to comment Share on other sites More sharing options...
3acor Posted August 19 Author Report Share Posted August 19 Would it not be possible to have the same hotkey shortcut(i.e. SHIFT + X) for two accounts and that hotkey would execute differently according to the account being selected in the chart? So for example if I have account ABC selected on the chart and I press SHIFT +X, the hotkey would buy me 100 shares However if I have account XYZ selected on the chart and I press SHIFT +X, the hotkey would sell me 50 shares Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 19 Report Share Posted August 19 no, that you cannot do Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 19 Report Share Posted August 19 1 hour ago, 3acor said: Would it not be possible to have the same hotkey shortcut(i.e. SHIFT + X) for two accounts and that hotkey would execute differently according to the account being selected in the chart? So for example if I have account ABC selected on the chart and I press SHIFT +X, the hotkey would buy me 100 shares However if I have account XYZ selected on the chart and I press SHIFT +X, the hotkey would sell me 50 shares ok, let me update that. You can, but in a single Hotkey definition. You can have two ORDER sections in the hotkey and Specify ActiveSession to be: Account == "1111111" for the first account and Account == "22222" for the second account, with corresponding account #s of course. That way each ORDER section can be dedicated to specific account without having to do expressions in every field you want to customize Quote Link to comment Share on other sites More sharing options...
3acor Posted August 19 Author Report Share Posted August 19 So does that mean the hotkey will trigger on both accounts at the same time? so it will buy 100 shares on Account "11111" and Account "22222"? Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 19 Report Share Posted August 19 not if you implement it the way I said. ActiveSession would be true on the first order only if executed from account 11111 and second order would have it false so would not execute. And vice versa for account 2222 Quote Link to comment Share on other sites More sharing options...
3acor Posted August 20 Author Report Share Posted August 20 (edited) so like that?? Edited August 20 by 3acor Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 20 Report Share Posted August 20 No, you created 2 extra sections that do nothing and where you put in the ActivSection=true. Get rid of that. You need to do what I told you with ActiveSection entry in each ORDER action. click on the + icon next to each ORDER entry to show all available fields. Then instead of TRUE for each one, put in the expression I gave you. 1 Quote Link to comment Share on other sites More sharing options...
3acor Posted August 20 Author Report Share Posted August 20 oh yes it works now! Thanks a lot ! Quote Link to comment Share on other sites More sharing options...
3acor Posted August 30 Author Report Share Posted August 30 Is there a hotkey to close a position that will use MKT order if it is submitted during regular trading hours but will use LMT order if it used in extended hours? Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 30 Report Share Posted August 30 do not have an RTH flag in hotkeys at this time. However a LIMIT order with the price well above the ASK (for BUY) would be basically same as a market, so why not just use a limit order? Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 30 Report Share Posted August 30 actually, you can do expression for the action and reference the Boolean value RegSession and send limit or market depending on true or false Quote Link to comment Share on other sites More sharing options...
3acor Posted August 30 Author Report Share Posted August 30 48 minutes ago, Jerry Medved said: do not have an RTH flag in hotkeys at this time. However a LIMIT order with the price well above the ASK (for BUY) would be basically same as a market, so why not just use a limit order? I do use that but sometimes it might not trigger if the price is moving fast and/or the limit price it too far from market price the exchange will reject it Quote Link to comment Share on other sites More sharing options...
3acor Posted August 30 Author Report Share Posted August 30 13 minutes ago, Jerry Medved said: actually, you can do expression for the action and reference the Boolean value RegSession and send limit or market depending on true or false How can I do that for this hotkey? Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 30 Report Share Posted August 30 the very simplest way is to just have 2 actions. One for market, one for Limit. in each section put the expression for ActiveSession. For one set it to RegSession and for the other, !RegSession (! is for NOT) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.