ninjatrader/utilities/ram-drive/README.md

69 lines
2.3 KiB
Markdown

# NinjaTrader RAM Drive
A guide to creating and using a RAM drive to speed up NinjaTrader.
This involves placing the NT database folder (where all the downloaded data resides) into RAM.
The one downside is that when you turn off your computer, that data is gone.
NT will automatically rebuild the database the next time it launches, though.
Still, make sure to save a backup of your database folder before attempting this, just in case.
To begin, download the following tools:
ImDisk Toolkit (for creating the RAM drive):
[https://sourceforge.net/projects/imdisk-toolkit/](https://sourceforge.net/projects/imdisk-toolkit/)
Link Shell Extension (for creating a symbolic link from the database folder on the RAM drive to the default NT directory):
[https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#download](https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#download)
First step is to create the RAM drive with ImDisk Toolkit.
Here's what it should look like. Just click OK.
![Create RAM Drive](./images/create_ram_drive.png)
I created a 20GB one in the screenshot, but that's because I had lots of RAM to spare.
At the time I'm writing this, the database folder on my machine is < 2GB, so you probably won't need anywhere near that much space.
Next, format the drive.
Just use the default settings:
![Format RAM Drive](./images/format_ram_drive.png)
In the end, you should see something like this:
![RAM Drive Created](./images/ram_drive_created.png)
Next, navigate to your NT directory.
It's in your Documents folder by default.
Example location:
```
C:\Users\<YOU>\Documents\NinjaTrader 8
```
Inside of that folder, there is a folder named db.
Rename it so that it serves as a backup (e.g., "db-backup") .
Now create the symbolic link so that any data written to the database goes to the RAM drive instead:
Create a folder named "db" on the RAM drive (D:\ in the above example).
If Link Shell Extension is installed, right click on that folder and select "Pick Link Source":
![Pick Link Source](./images/pick_link_source.png)
Then navigate back to your NT directory, right click and select "Drop As..." -> "Symbolic Link":
![Drop as Symbolic Link](./images/drop_as_symbolic_link.png)
Now when NT is launched, it should place all the downloaded data on the RAM drive instead of the SSD / HDD.
---