Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Can you post an image of your equivalent Control Center window. I am curious as to why your Tools menu co-ordinates on Control Center are different to my version of NT8.
To identify co-ordinate positions on a Window, run the program AutoHotkey Window Spy found in the AutoHotkey installation
"C:\Program Files\AutoHotkey\WindowSpy.ahk"
This should also be listed under Windows Start menu for AutoHotkey
Hover your mouse over the Nt8 Control Center to find the co-ordinates of the Tools menu.
However rather than go down this path, if others also encounter similar issues because of layout changes between different versions of NT8, I can change the script to work on an open Historical Data window which the user has to manually open before running the script.
Can you help answer these questions from other members on NexusFi?
Ok, run the WindowSpy program, select the Control Center window so it is Active in Windows, hover your mouse over the centre of the Tools section and tell me what co-ordinates you get in the "Mouse Position" section under "Window"
"
trendisyourfriend
Quebec Canada
Market Wizard
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,177
Thanks Received: 6,021
333,12 between the two letters 'o' of Tools
The other mouse click for 'Get Market Replay Data' :
/* Select Instrument Field */
MouseClick("Left", 30, 625)
Mine is at 18, 629
traderap101
London UK
Posts: 18 since Jul 2022
Thanks Given: 3
Thanks Received: 16
OK, it looks like there are subtle changes in the window layout between different versions of NinjaTrader. The following variables are the positions the script uses for mouse clicks and download button status. These will need to be checked for their co-ordinate positions for a users NT8 version if it's not V8.1.1.1.
These can be found through AutoHotkey Window Spy C:\Program Files\AutoHotkey\WindowSpy.ahk and then the code will need to be changed.
I will have a think about whether there is an alternative way to find these positions programmatically for the next version.
The script works perfectly now with these settings:
I needed to modify three mouseclick coordinates and another one for the BG color of the download button.
trendisyourfriend
Quebec Canada
Market Wizard
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,177
Thanks Received: 6,021
Do you think you could adapt your script to download historical datas ?
Ideally, here is what i would need:
Given a defined list of instruments, i need to download data from a specific date in the past to now using a 1 minute chart.
Then, once the minute data have been downloaded, we repeat the process but this time using a 500 tick chart.
trendisyourfriend
Quebec Canada
Market Wizard
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,177
Thanks Received: 6,021
I tried to run your script to download 2 days and for 3 instruments. It just processes 1 instrument, the 1st in the list and for 1 day. After that, i see no activity going on and if i try to bring another window in front, the script brings the historical data window in front but still nothing happens. I need to close the historicacl data window to force the script to generate an error and stop.
trendisyourfriend
Quebec Canada
Market Wizard
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,177
Thanks Received: 6,021
I found the problem thid morning with fresh eyes.
I needed to update this line:
traderap101
London UK
Posts: 18 since Jul 2022
Thanks Given: 3
Thanks Received: 16
V1.2 Market Replay Download for Multi-Instrument and Multi-Date
Here is V1.2 of the code. The main changes in this version are:
Resizes the Historical Data window to a predefined size during the script execution so that fields are in known positions during execution. Reverts back to original size after script execution.
XTools variable added so that script can handle x-axis variation of the Tools menu position in the Control Center window between NinjaTrader 8.0.28.0 and NinjaTrader 8.1.1.1. For NinjaTrader 8.0.28.0 change the script as follows
XTools := 300
Adds an option to see a progress window with status bar whilst the download is happening. This is just a visual and has no bearing on the script itself. To turn it off
ShowStatusWindow := false
User Parameters
The most likely parameters that a user may need to modify are the following:
/* Comma separated instrument list to download. Make sure you type in the correct name without any extraneous spaces or characters. */
InstrumentList := "MNQ 09-23,MES 09-23"
/* Starting date to process in YYYYMMDD format */
StartDate := 20230605
/* Number of days to download */
NumberofDaysToDownload := 2
/* Skip Days */
SkipSaturday := true
SkipSunday := false
/* Download progress status window toggle */
ShowProgressWindow := true
/* Number of millseconds to wait between keystroke/mouse actions on windows */
SleepBetweenActions := 400
Usage
If you need to abort the script then close the Historical Data window. Do NOT bring any other window into active focus whilst it is running as the script might accidentally send mouse clicks / keystrokes into the wrong window.