NexusFi: Find Your Edge


Home Menu

 





Speeding up NinjaTrader with a RAM drive (ramdisk)


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 20 posts (13 thanks)
    2. looks_two Zondor with 18 posts (24 thanks)
    3. looks_3 kronie with 14 posts (2 thanks)
    4. looks_4 bob7123 with 12 posts (15 thanks)
      Best Posters
    1. looks_one pawnbroker with 3.4 thanks per post
    2. looks_two Zondor with 1.3 thanks per post
    3. looks_3 bob7123 with 1.3 thanks per post
    4. looks_4 Big Mike with 0.7 thanks per post
    1. trending_up 60,870 views
    2. thumb_up 94 thanks given
    3. group 41 followers
    1. forum 111 posts
    2. attach_file 6 attachments




 
Search this Thread

Speeding up NinjaTrader with a RAM drive (ramdisk)

  #41 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


bob7123 View Post
What Luck! A rainy Saturday here, and a new geeky thing to try. Cool, thanks!

I got everything working as you suggested. WOW charts load faster. Previously I thought delays were due to the IQFeed servers being slow, but I guess not. Great thread!

I found the freeware Dataram RAMDisk worked fine for me, available here. You don't have to pay anything unless you want to make a Ramdrive that is more than 4 GB. I made my RamDrive 1.5GB and it has tons of free space. It is set to backup to my hard drive every 5 minutes, so I am not worried about losing data.

Of course, I couldn't stop there though... I moved my Firefox cache to the ramdrive too. (I'm one of those people that keep a zillion tabs open.) Old but still correct instructions to do that are here: How to Change Cache Size and Location in Firefox

Also, the junction tool you mentioned is not needed after XP, so on my win7 machine I got this GUI tool to create the links:
LinkShellExtension
. I suggest that anyone who gets the LSE might want to read all of the documentation. Not only are junctions supported, but a WHOLE bunch of other options too.

Finally, in regards to SSDs, I have a SSD C drive, and a regular D drive. I manually moved most of my USERS folder to D. I did this so that files that are written to more often are not stored on the SSD, as writing to the SSD drive can degrade it over time. It looks like there is a better way to do that when doing a clean install, using something called "Audit mode" that I had never heard of.

Link to that info is here: Microsoft Answers Page

I've got a new bigger SSD on order, when it gets here I plan to use it to reinstall a fresh copy of windows to get rid of a lot of unused apps. I'll also use the link above to keep more files on the D drive.

And for laughs, I am including a screenshot of the results of HD Tune for my SSD, regular drive and RamDrive.

@bob7123
I am trying to set up the Ramdisk you mentioned and I'm curious. I want to move everything that is in the Documents\NinjaTrader folder to the ramdisk. Do I need to reinstall NT and redirect the installation to the ramdisk or if not, how do I set it up so NT knows to look for everything on the ramdisk?

Thanks,
Mike

Oh wait a second...I didn't read far enough. Looks like I need to get the LinkShellExtension

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
77 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
37 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
17 thanks
  #42 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657


MWinfrey View Post
@bob7123
I am trying to set up the Ramdisk you mentioned and I'm curious. I want to move everything that is in the Documents\NinjaTrader folder to the ramdisk. Do I need to reinstall NT and redirect the installation to the ramdisk or if not, how do I set it up so NT knows to look for everything on the ramdisk?

Thanks,
Mike

Oh wait a second...I didn't read far enough. Looks like I need to get the LinkShellExtension

I just used the junction command in post 1.

Basically, setup the ram disk (R:), then copy the contents of the NinjaTrader folder to R:\NinjaTrader. Then junction Documents\NinjaTrader -> R:\NinjaTrader.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #43 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


Well I'm at a loss. Using junction.exe as mentioned in the first post of this thread, I ran into some problems. I created a ramdisk and created a folder called db on the ramdisk and copied all the data from the NT db folder to the ramdisk. then from a command prompt I issued the following command,

junction "C:\Users\Main\Documents\NinjaTrader 7\db" g:\db

got this error

Error creating C:\Users\Main\Documents\NinjaTrader 7\db:
Cannot create a file when that file already exists.

also tried reversing and got the same error.
junction g:\db "C:\Users\Main\Documents\NinjaTrader 7\db"

so, I tried running the same command without a folder on the ramdisk but that only created a link from drive g: back to the drive c: folder.

What am I missing?

Thanks,
Mike

Reply With Quote
  #44 (permalink)
 
bob7123's Avatar
 bob7123 
Amsterdam, The Netherlands
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninja, IRT, ToS
Broker: EdgeClear, LMAX
Trading: NQ
Posts: 668 since Oct 2011
Thanks Given: 134
Thanks Received: 2,682


MWinfrey View Post
Well I'm at a loss. Using junction.exe as mentioned in the first post of this thread, I ran into some problems. I created a ramdisk and created a folder called db on the ramdisk and copied all the data from the NT db folder to the ramdisk. then from a command prompt I issued the following command,

junction "C:\Users\Main\Documents\NinjaTrader 7\db" g:\db

got this error

Error creating C:\Users\Main\Documents\NinjaTrader 7\db:
Cannot create a file when that file already exists.

also tried reversing and got the same error.
junction g:\db "C:\Users\Main\Documents\NinjaTrader 7\db"

so, I tried running the same command without a folder on the ramdisk but that only created a link from drive g: back to the drive c: folder.

What am I missing?

Thanks,
Mike

The link I put up was to a GUI tool. if you follow this link again, it has some pretty detailed instructions on how to work with it as an extension in windows file explorer.

Junctions are a bit tricky, but if you go slow and try a few things I think you can get it sorted.

Also, I don't want to be accused of telling you to do anything that can cause damage so please back up your system first. I like this tool.

Follow me on Twitter Reply With Quote
Thanked by:
  #45 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

The Link Shell Extension program (freeware) lets you create junctions and symbolic links without having to use the command line. I have been using it without any problems. I have not done any of these mapping operations with the command line.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #46 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657


MWinfrey View Post
Well I'm at a loss. Using junction.exe as mentioned in the first post of this thread, I ran into some problems. I created a ramdisk and created a folder called db on the ramdisk and copied all the data from the NT db folder to the ramdisk. then from a command prompt I issued the following command,

junction "C:\Users\Main\Documents\NinjaTrader 7\db" g:\db

got this error

Error creating C:\Users\Main\Documents\NinjaTrader 7\db:
Cannot create a file when that file already exists.

also tried reversing and got the same error.
junction g:\db "C:\Users\Main\Documents\NinjaTrader 7\db"

so, I tried running the same command without a folder on the ramdisk but that only created a link from drive g: back to the drive c: folder.

What am I missing?

Thanks,
Mike

Copy the contents of the db folder to the ramdisk.

Delete the db folder on the C: drive.

Then use junction, it will create the db folder as a junction to the ramdisk path. The folder on C: cannot already exist.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #47 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


Big Mike View Post
Copy the contents of the db folder to the ramdisk.

Delete the db folder on the C: drive.

Then use junction, it will create the db folder as a junction to the ramdisk path. The folder on C: cannot already exist.

Mike

Oh I see...that makes sense now. Sometimes, the obvious eludes me.

Reply With Quote
  #48 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

I think it's what we call intuition.

An insight from listening to Denise Shull.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #49 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Two of the files that I moved to my RAM disk are the SQLServer CE database files, Ninjatrader and Ninjatrader.Old. But the symbolic link from the Ram Disk to the Ninjatrader db file keeps breaking, with Ninjatrader then creating a new Ninjatrader.Old.sdf file in the db folder. This is causing all kinds of problems, because the folder being created by Ninjatrader is conflicting with the Ninjatrader.sdf file on the RAM disk (Drive X).

Maybe this is because the period character is not permissible in the target file name. To test this idea I renamed the file on the RAM disk Ninjatrader_Old.sdf, replacing the period with an underscore. Then after creating the symbolic link to the db folder, I renamed that link back to Ninjatrader.Old.sdf, which is the file that the Ninjatrader application will be looking for.

So now, the name of the symbolic link is Ninjatrader.Old.SDF, but the TARGET (on the Link Properties page) is X:\db\Ninjatrader_Old.sdf.

It worked fine during first restart of Ninja, so next step is to see if the link is still there after I reboot the computer.

I would welcome comments or PM's from anyone else who is monkeying around with this stuff.

It is one of the few things that can be done to improve Ninjatrader's overall performance. The lack of interest is surprising.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #50 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657



Zondor View Post
Two of the files that I moved to my RAM disk are the SQLServer CE database files, Ninjatrader and Ninjatrader.Old. But the symbolic link from the Ram Disk to the Ninjatrader db file keeps breaking, with Ninjatrader then creating a new Ninjatrader.Old.sdf file in the db folder. This is causing all kinds of problems, because the folder being created by Ninjatrader is conflicting with the Ninjatrader.sdf file on the RAM disk (Drive X).

Maybe this is because the period character is not permissible in the target file name. To test this idea I renamed the file on the RAM disk Ninjatrader_Old.sdf, replacing the period with an underscore. Then after creating the symbolic link to the db folder, I renamed that link back to Ninjatrader.Old.sdf, which is the file that the Ninjatrader application will be looking for.

So now, the name of the symbolic link is Ninjatrader.Old.SDF, but the TARGET (on the Link Properties page) is X:\db\Ninjatrader_Old.sdf.

It worked fine during first restart of Ninja, so next step is to see if the link is still there after I reboot the computer.

I would welcome comments or PM's from anyone else who is monkeying around with this stuff.

It is one of the few things that can be done to improve Ninjatrader's overall performance. The lack of interest is surprising.

Guessing because the file is being recreated by Ninja. When it is re-created, it's probably written to a temp file, then original deleted (breaking sym link), then moved.

I just symlink the entire NinjaTrader 7 directory off of Program Files, never had a problem.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on August 6, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts