Improve performance and latency using Mac Parallels virtual machine for Windows running NT8

If you're experiencing latency, delays, or timeout errors in your CrossTrade log and you're running Windows on Mac Parallels, you may have a performance problem. This guide will help you execute trades from TradingView or the CrossTrade API in under 1 second.

Improve performance and latency using Mac Parallels virtual machine for  Windows running NT8

If you're experiencing latency, delays, or timeout errors in your CrossTrade log and you're running Windows on Mac Parallels, you may have a performance problem.

NinjaTrader does not officially endorse the use of NT8 inside of virtual machines, but plenty of people do it, including CrossTraders. Even the NT8 support staff gives advice on how to run NT8 inside a Parallels VM.

What is a virtual machine?

A virtual machine (VM) functions just like any physical computer—be it a laptop, smartphone, or server. It has a CPU, memory, storage disks for your files, and can connect to the internet when necessary. While physical computers are made up of tangible hardware components, VMs are considered virtual or software-defined computers that exist within physical servers solely as code.

In essence, a virtual machine is a digital version of a physical computer. It can run programs and operating systems, store data, connect to networks, and perform other computing tasks. The main difference is that a VM relies entirely on virtual resources rather than physical hardware components.

Issues arise, however, if those virtual resources are not configured problem. Even if the underlying hardware, e.g., brand new Mac laptop has sufficient horsepower, the VM itself may be resource-constrained and your trading account could be paying the consequences.

Tips for Maximizing Parallels Performance on Mac for NinjaTrader

Running NinjaTrader on a Mac using Parallels Desktop can offer a seamless trading experience, but performance issues may arise if your system isn't configured optimally.

Since both NinjaTrader and virtual machines (VMs) demand significant resources, it's essential to fine-tune your setup for maximum efficiency. This guide will help you optimize performance when running NinjaTrader on a Parallels virtual machine, ensuring smooth data processing and chart rendering.

We recommend following the official Parallels performance improvement guide below, which we'll do our best to summarize.

KB Parallels: Improve virtual machine performance on Mac

Virtual Machine Performance Optimization

One of the key factors in enhancing performance in Parallels is understanding how resources are distributed between macOS (host) and the virtual machine (guest).

1. Allocate Even Hardware Resources

Ensure that resources like CPU and RAM are evenly distributed between macOS and your VM. Ideally, each should have the necessary resources to function without overwhelming the system. For example, allocate at least 8GB of RAM and 4+ CPU cores to your VM to support NinjaTrader's heavy data requirements.

2. Monitor CPU Usage

Parallels Desktop offers a built-in CPU Usage Monitor. When usage in your VM exceeds 70%, it will light up in red. Clicking it opens Windows Task Manager, allowing you to identify and manage resource-intensive processes. Reducing these will improve your VM's overall performance.

3. Optimize NinjaTrader’s Workspaces and Charts

NinjaTrader’s performance is influenced by the number of open charts, indicators, and instruments.

  • Limit Workspaces and Instruments:
    Close any unnecessary workspaces and reduce the number of charts and instruments. The more charts you run (especially tick-based ones), the more strain you put on your system. Stick to the essentials for smoother performance.
  • Manage Indicators:
    Using indicators set to "Calculate On Each Tick" can slow things down. Instead, configure them to "On Bar Close" or "On Price Change," unless you're tracking tick-heavy instruments. This will free up processing power without compromising analysis.
  • Remove Unnecessary Drawing Objects:
    Over time, drawing objects like lines and shapes can accumulate and negatively impact performance. Clean up your charts periodically.
  • Leverage Parallels Desktop Settings:
    Parallels Desktop has several built-in features that can boost performance:
  • Automatic Resource Manager:
    If you're using Parallels Desktop 17 or later, activate the Automatic Resource Manager feature. This will automatically allocate resources based on your Mac’s hardware, ensuring optimal performance for NinjaTrader.
  • Manually Adjust CPU & Memory:
    If you're manually adjusting resources, shut down your VM and configure CPU and memory settings within the recommended values. Typically, assigning half of your available CPU cores ensures the best performance for both macOS and the VM.
  • Use SSD Storage:
    If your Mac uses a hard disk drive (HDD), consider upgrading to a solid-state drive (SSD). SSDs provide a substantial performance boost, especially when handling large volumes of market data.
  • Disable TRIM for HDDs:
    If your Mac uses an HDD (or Fusion Drive), ensure the TRIM option is disabled to prevent unnecessary system strain.

4. Optimize Data Loading and Replay Features

NinjaTrader’s historical data loading and tick replay features can cause performance slowdowns if not managed properly.

  • Limit Days to Load: Loading too much historical data can overwhelm your system. Reduce the number of days loaded on your charts and Market Analyzer to ensure faster performance.
  • Use Tick Replay Wisely: Tick replay is a resource-intensive feature that should only be enabled for strategies that specifically require it. Disable it for simpler strategies to conserve resources.

5. General Performance Tips for Mac and Parallels Desktop

Parallels' performance is also tied to how macOS is functioning and how well your virtual machine is configured.

  • Check Available Disk Space: Ensure your Mac’s startup disk has enough free space. A full disk can significantly slow down both macOS and your VM.
  • Update Parallels Desktop: Regularly check for Parallels updates to ensure you're using the latest version, which often includes performance improvements and bug fixes.
  • Run Virtual Machines on Internal Storage: If possible, store your VM on your Mac’s internal SSD. Running a VM from an external drive can slow down performance, particularly during resource-heavy tasks.
  • Avoid Multiple VMs: Running several virtual machines at once can strain your system. If you're not using them simultaneously, shut down unneeded VMs to free up resources.
  • Disable Mac Antivirus Programs: Mac antivirus software can slow down your VM. Either disable it or add your VM’s location to the antivirus whitelist.

6. Daily Maintenance for NinjaTrader

  • Restart NinjaTrader Daily: Memory leaks and background processes can build up over time, slowing down the application. Restarting NinjaTrader each day will keep things running smoothly.
  • Clear Simulation Account History: Excessive simulated trade data can bog down performance. Periodically clear your simulation account history to free up resources.
  • Disable Unnecessary Market Data Recording: If you don't need to record live data for playback, turn off this feature to prevent unnecessary data accumulation.

7. Upgrading Hardware for Better Performance

If you frequently experience slowdowns, consider hardware upgrades to boost your Mac’s overall performance.

  • Upgrade to an SSD: Replacing your Mac’s HDD with an SSD is one of the most effective ways to increase performance. SSDs significantly improve load times and responsiveness, particularly when handling large data sets or tick-based charts in NinjaTrader.
  • Increase RAM: If you notice high memory usage in macOS's Activity Monitor, it may be time to upgrade your RAM. Many Macs support RAM upgrades, which will allow you to allocate more memory to both your macOS and your VM, improving overall performance.

Conclusion

Running NinjaTrader on Parallels Desktop can be a powerful setup, but it requires careful attention to resource management and system configuration. By optimizing your virtual machine’s settings, managing NinjaTrader’s workload, and performing regular maintenance, you can maximize performance and ensure a smooth trading experience. Additionally, hardware upgrades like moving to an SSD or increasing RAM can further enhance the speed and efficiency of your setup.

Stay ahead of performance bottlenecks, and keep your system in top shape for real-time trading with these key optimizations!


Start your free trial

Try CrossTrade for 7 days.

Sign Up