Installation and deployment. Cloud services.

Some tips for running Zorro on your home PC or on a web server:

Zorro on old computers

For operating systems prior to Windows 8, or when you'll get a 'Dll not found' or similar error message on Zorro start, you may need to install the VC++ 2022 32-bit redistributable package from Microsoft. You can download it either from Microsoft or from our server. It will unpack and install itself.

Zorro 64-bit and C++

The Zorro installation includes a 32 bit version (Zorro.exe) and a 64 bit version (Zorro64.exe). The 32-bit Zorro is the everyday version for all normal tasks, and runs even on old PCs with Windows XP. Zorro64 is about 15% faster and can access more memory, which offers advantages for backtesting large asset portfolios with high resolution historical data. Since most broker plugins are 32 bit, the 32 bit Zorro is normally used for live trading. Unless you're high frequency trading, speed and memory footprint matter only for backtests and optimizations.

The 32-bit Zorro version needs no further software, but for Zorro64 you need a 64-bit system with the VC++ 2022 64-bit redistributable package installed. You can download it either from Microsoft or from our server. It will unpack and install itself.

While the 32-bit Zorro has its own on-the-fly C compiler (lite-C), the 64-bit Zorro needs the free Visual C++ community edition for running C++ scripts. If you have Zorro S, enter the path to the VC++ compiler in Zorro.ini. C++ files will then start directly. You need not specifically learn C++, since it's (mostly) backwards compatible to C. The free Zorro version supports C++ also, but then you'll need to create a VC++ project for any .cpp script and manually compile it to a DLL.

Zorro on Linux or Mac

Although Zorro is a Windows program, it can also run under Linux and OS X with Wine or VMWare. You can find threads on the Zorro forum where Ubuntu and Mac installations are discussed. The basic steps for Wine:

For VMWare, install the VMWare Player and the Windows Virtual Machine, then install Zorro within the VM. The Windows VM also contains Visual Studio for supporting C++ scripts.

A tiny incompatibility of the current Wine version with the Windows COleDateTime class can cause some Zorro backtest results under Wine to deviate slightly from backtest results under Windows, due to tiny variations in bar start and end times. Also, when resizing MFC windows under Wine, they are not always correctly redrawn. The Wine developers have been informed about the issues and they will be hopefully fixed in future Wine versions.

Zorro on 4k TVs

Windows programs appear 'zoomed' on some very hi-res displays, in order to prevent a too small GUI. For disabling this, adjust the DPI (Dots Per Inch) scaling settings on your operating system. This is a common issue when applications do not scale properly on high-resolution displays. The general steps:

Zorro in the cloud

Zorro can run on a Windows Server and can be controlled by PHP scripts. In this way it can be used for live trading, but also for web based applications or for advisory services.

Virtual private servers (VPS) are offered by many commercial providers for a small fee, like $20 per month. You'll normally get a fast and reliable online connection to the broker or exchange, and can access Zorro via Internet from anywhere. It's recommended to select a large and reliable company, like 1&1, Google, Microsoft, or Amazon, for hosting a live trading VPS. Amazon offers its EC2™ servers even free during the first year. Installation with a broker or MT4 connection on a VPS is not totally easy to a beginner, so we're offering a VPS installation service on the support page. If you want to do it yourself, here are the basic steps for setting up an Amazon VPS:

It is recommended to disable automatic Windows updates for preventing reboots that interrupt the trading session. Make also sure that the time and the time zone of the VPS is set up correctly. It does not matter which time zone - you can either use your PC's time zone, or the VPS time zone, or any other time zone - but the VPS time must match the zone. If it is wrong, Zorro will display a wrong UTC time in the server window, and strategies based on market open and close times - such as gap trading - won't work anymore. If in doubt, set the VPS to the same time and time zone of your PC at home.

Additional software

Zorro can utilize functions and libraries from several other free software packages: R, Python, and Visual Studio C++. If you want to code in C++ or if you need additional statistical or machine learning functions, install the packages and enter their paths in ZorroFix.ini. When your trading algorithm uses R or Python, it must be also installed on the trading server. Visual Studio is not needed for deployment, but you might need to install the redistributable package, vc_redist.x86.exe or vc_redist.x64.exe. They are freely available from Microsoft.

Multiple Zorros

If one Zorro is good, many Zorros are even better. The free Zorro version can trade with one instance, one broker, and one account only. Zorro S allows to run many Zorro instances simultaneously with different scripts (for details about setting up multiple broker connections, see Account List). How many Zorro instances can run at the same time depends on the broker API, the Internet bandwidth, and the PC speed and memory resources. As an example, a Amazon EC2 Micro Instance can support about 4 Zorro instances with a direct broker connection, or up to 2 instances with a MT4 connection.

If the parallel trading Zorros use different broker APIs, set the NOLOCK flag for speeding up API access. Otherwise a synchronization mechanism lets any Zorro wait with accessing the broker API until other Zorros have finished their API access.

When running multiple Zorros with the same script, make sure that they don't write into the same logs or temporary files. The Script string and/or the LogNumber variable can be used to let any Zorro generate different file names. For communication between different Zorro instances, see Interprocess Communication.

Unlocking Zorro S

Zorro S licenses come either with a key file (for permanent licenses) or with a 20-digit token (for subscriptions). If you have a key, unzip it in the Zorro folder - that's all. If you have a token, enter it in Zorro.ini. Permanent licenses include 2 years Zorro updates. For updating Zorro further after 2 years, the period can be extended. Private traders can install Zorro S on multiple PCs or servers that are under their exclusive control. Corporations need one license per PC or server.

Disable live trading

If you let your apprentice develop trading strategies, you can cripple his Zorro so that live trading is disabled. For this, open the Plugin folder and remove all .dll files inside. Zorro can then still run scripts and backtests and has access to online data sources, but cannot connect to a broker or exchange.

Surviving reboots

Rebooting a live trading server should be avoided. But if it still happens, the trading session can be automatically resumed when the server restarts. Here's the procedure - you'll need Zorro S since the free version does not fully support command lines:

START /D "C:\Program Files(x86)\Global Prime - MetaTrader 4\Terminal.exe"
START Zorro.exe -trade MyStrategy -stay

The startup.bat file will then be executed at any reboot. Depending on the Windows version, the Startup folder can be different - on older versions it's named Autostart and you can edit it with msconfig. On Windows Server, open Administrative Tools / Task Scheduler and enter the task with the properties "Start a program" / "When the computer starts". Please note that some server configurations are reported to start Zorro in minimized mode with no GUI when no user is logged in. In this case, use "At Log on" rather than "At startup", specify the user account in the task properties, and use the Microsoft Sysinternals Autologon program to establish automatic logon at start.

Fallback server

A server breakdown due to a hardware failure can be fatal for some trading systems. In such a case, a fallback server should immediately take over the trading when the original server becomes unresponsive. This is the suggested setup of such a configuration:

Time-triggered scripts

If you want to start a session at a specific time or date, such as every Monday at 15:30 pm, you can do that with the Zorro command line and the Windows Task Scheduler. Here's the procedure - you'll need Zorro S since the free version does not fully support command lines:

Publishing the trading status

It is recommended that you regularly observe Zorro's trade list, profit status, and messages on your PC or smartphone. For this purpose, Zorro displays the trade status and the message window permanently on a website that's updated once per minute. The tricky part is to make that page visible on the Internet. Here's the instruction for Amazon EC2 with Windows Server 2012 / 2016 (similar for Google Cloud instances):

Providing trade signals

Some trade copy services such as ZuluTrade™ offer a free VPS for their signal providers.  The VPS is already configured, completely with MT4, but it's a little tricky to copy Zorro onto it. Here's the procedure for ZuluTrade (Zorro S required):

When you provide signals, please play fair in the interest of your followers. Do not use martingale or similar methods, even though this might attract more followers at first. In the end, only the few signal providers that survive more than one or two months will earn long-term trust and profits.

See also:

 Brokers, Getting Started, engine API

► latest version online