I tried it with the delay and it simply did it slower, without actually triggering a sell limit. It just opens the "confirm order placement" y/n box then it closes without putting the sell limit in. It's so weird because when I do the exact same thing for the buy limit, it works.
This is a big bummer because this is an extremely useful hotkey to have... should I just try reinstalling ninjatrader or something? I don't think there is anything wrong with your code.
You did not mention order confirmation before. Looks like you have Order Confirmation active and the order confirmation pop-up window is receiving some of the key strokes, causing the unintended behavior. The script is not intended to work with Order Confirmation given that its purpose is to enter orders quickly. If you turn off order confirmation, I think it should work as designed. To turn off order confirmation go to Tools->Options->General Tab, and De-Select 'Confirm Order Placement'
The following user says Thank You to monpere for this post:
I roll over futures contracts based on volume. I wrote the following NinjaTrader indicators, RolloverVolume and BarChartDotComVolumes so i can determine which contracts have the highest volume for my traded instruments. But given that I use this functionality only once a month for monthly contracts or once every 3 months for quarterly contracts, there's no real reason why I want these indicators on my charts the rest of the time, even though I wrote them in such a way to use minimal resources.
So, I wrote this AutoHotkey script to duplicate the latter indicator and get the contracts volume from barchart.com without involving NinjaTrader at all, therefore it can be used with any trading platform. I can just run the script on demand, once a month to determine which contract I want to trade. It gets end of day volume by default, or you can pass an "I" as a command line argument in order to get intraday volume instead. You can update the list of instruments in the code.
Note: The code may need to be updated, if barchart.com changes the format of the associated web page in the future.
Last edited by monpere; January 1st, 2013 at 07:33 PM.
The following 8 users say Thank You to monpere for this post:
Anyone familiar with modifying indicators via AutoHotKey?
In a NT chart, I'd like to be able to automate the process of bringing up the indicators window (easy enough) and then going through every indicator on the chart and toggling "Update on Bar Close" between True and False.
This would be useful to avoid the resource demands of constantly running realtime charts with Update on Bar Close set to False, but would still provide a means of quickly seeing the current indicators levels if the current bar were closed right now.
I want to modify this by having a simple mouse click + key press to buy and sell. I dont want to use the control key. Can you please share the modified code ?
Is it possible to have the Char Z to buy and Char X to sell , instead of B to buy and S to sell .
Can someone please let me know if the following is possible with AutoHotKey.
My issue is that I'm trying to see if it can function as I need if I try and setup a trading keyboard (Trading Keyboard | Sample Configurations | Keyboard Trader) with 3 separate macros for each key press that will then send the same action to 3 separate platforms.
(1 = Sierra Charts running IQFeed (SIM), 2 = Sierra Charts running CQG (LIVE), 3 = NinjaTrader 8 running IQFeed (SIM).)
I've switch the majority of my trading over to Sierra Charts but I've had to keep NT for Jigsaw DOM which I use to find entries/exits. I've been executing on Sierra Charts with the CQG broker data but I'm finding it difficult when scalping to track the exact price level of my live order entry and stop price level (that's on SC) while looking at the Jigsaw DOM on NT.
So I started looking around for some option that would allow a macro button solution so that when I entered a live trade on Sierra Charts w/CQG broker data, that same order would be entered as a SIM trade on Sierra Charts w/IQFeed and NT8 w/IQFeed and show the same order price levels on the Jigsaw DOM as the order price levels on the live trade on Sierra Charts that is executing the live trade to the broker. Then I only need to closely watch one screen.
I've been trying to test the concept using the current keyboard I have (Roccat MK Pro) and setup the same macro key sequence (Buy Market = ALT+A) in Sierra Charts and (Buy Market = ALT+A) in Ninjatrader 8. (This would not be the case with the dedicated trading keyboard - each platform would get its own unique macro sequence for each task but the 3 unique macros would be bound to the same key press).
The problem I seem to be running into is that it will only execute the macro on whatever chart that has been clicked on to "bring it to the front" in Windows (Running Windows 8.1). So if I first click on Sierra charts chart, then ALT+A it will execute the Buy order on SC. Then if I click on NT8 chart and press ALT+A, it will execute the Buy order on NT8.
Each platform forces the chart to be clicked on first to become "active" and only then will it accept the macro sequence. I've talked to Sierra Charts support and they said I should explore trying to find a solution with AutoHotKey.
Is it possible to write a hotkey/script so that when a key is pressed (EG for a Buy market order), it will first make the required platform chart "active" and then execute the order on that platform, and that this same process can be executed for 3 separate platforms?
Buy At Market button =
Make Sierra Charts LIVE chart# "active" - Execute Buy order
Make Sierra Charts SIM chart# "active" - Execute Buy order
Make Ninjatrader 8 SIM chart# "active" - Execute Buy order
Macros ideally would be all tied to one button on the keyboard or if that isn't possible, tie each macro to one key-switch and use dual or quad key caps so that 2 or 4 key-switches are activated at the same time. The keyboard in the above link has software that allows "layering" of macros (2 layers) on the same switch. From what I can gather this should allow 3 macros to a switch. Would that software ( SoftProg Keyboard and Keypad Programming Utility ) be able to be used with AutoHotKey?
Is there a solution or workaround to getting this to all work as I've described? Will AutoHotKey be the right path to start going down?
I'm only trying to trade 1 instrument at a time - 30yr Treasuries ZB. But I also have 10yr and 5yr charts and DOMs running over a total of 4 screens.
If there are any more details that might help, please let me know.
Last edited by SilverFut; September 1st, 2016 at 12:52 PM.