Support - Frequently Asked Questions

When you're a Zorro Sponsor, you are entitled to free technical support by email. Otherwise you can post your question on the user forum, or subscribe a support ticket in the web store. For technical support please email your question to support (at) opgroup.de, and give your support ticket number or your user name that is displayed in Zorro's startup message.

General questions about financial trading and Zorro features are answered on the FAQ page on the Zorro website. The most frequent technical questions are listed below.

Strategy development & support

Q. I have the idea of a complex strategy, but don't know how to start.
A. Start small. Make first a very simple version and test it thorough and carefully. Afterwards add the more complex stuff, such as filtering, trade management functions, or special indicators, and test again at any step. For finding ideas and methods, read through the literature in the book list.

Q. How can I add another asset so that I can trade it and select it with the Asset scrollbox?
A. Open the History\AssetsFix.csv spreadsheet with Excel (or with the script editor) and add a new line with the parameters of the new asset. The details are described in the manual under Asset List.
For backtesting that asset you'll also need to download its price history with the Download script.

Q. I got an MTR4 expert advisor and want to use it with Zorro.
A. Read here how to convert MTR4 indicators or "expert advisors" to Zorro scripts.

Q. I have the C source code of an indicator and want to convert it to lite-C.
A. C code will normally run unchanged, but you need to remove its framework, such as main() functions, DLL export declarations, or C library headers. You can find an example here. Read here about the differences between standard C code and Zorro's "lite-C" code.

Q. Sometimes I edit a strategy, hit [Save] and re-test. But the changes I made are not reflected in the test. Sometime I can't even find the .log file or the .csv trade history in the Log folder. What happened to the changed files?
A. Your changes are possibly directed by the Windows User Access Control (UAC) to a different folder on your PC. Make sure to look in the right folder and edit the right script - or otherwise turn off the UAC.

Q. I'm using global variables in my script. When I run it the second time, it behaves differently than the first time.
A. Static and global variables keep their content until the script is modified or compiled. If necessary, set them to their initial values on script start, like this: if(is(INITRUN)) MyStaticVar = 0;. Read more about local, global, and static variables here.

Q. How can I find out if the last trade was a winner or a loser?
A. If LossStreakTotal is > 0, the last trade was lost.

Q. How do I place two pending orders so that the order that's opened first cancels the other one?
A. Place the first pending order, and check in its TMF if the entry condition of the second order is fulfilled. In that case enter the second order at market, and close the first while it's still pending.

Q. How can I count the number of winning trades within the last N trades?
A. Use a for(all_trades) loop, and count the number of closed trades. As soon as the number is above the total number of closed trades (NumWinTotal+NumLossTotal) minus N, start counting the number of winning trades.

Q. How can I place two different profit targets so that half of the position closes when the first one is hit, and the rest on the second?
A. The best and simplest solution is opening two trades with two different profit targets, each with half the lot volume. If your broker does not allow opening several trades at the same time, use OrderDelay for delaying the second trade a few seconds.

Q. How can I run a function on every price tick of a certain asset?
A. Use a tick function. It will be executed every time when a new price quote arrives. Note that the tick execution frequency will be different in real trading and in the backtest, due to the fewer price ticks in M1 price data. If this is an issue for the particular strategy, use t1 price data.

Q. How can I skip all bars that fall outside market hours?
A. Bars are added whenever price quotes of the traded assets arrive from the broker API, regardless of the market hour. For skipping them, use the TimeFrame mechanism. Set TimeFrame to 0 when the market closes, and to the negative number of skipped bars when it opens again. Alternatively, manually shift series only during market hours.

Q. How can I store variables so that a new trading session automatically starts with their their last values?
A. Use AlgoVar or TradeVar variables. They are preserved among sessions. If you have to store a lot more data, save and load them with file functions.

Q. How can I evaluate additional data that are not provided by my broker - for instance the VIX, or the COTR?
A. Use a http function (for accessing data directly from a website) or the dataDownload or assetHistory functions for retrieving them from a web service. Google, Stooq, AlphaVantage, Quandl, CryptoCompare, and many other services provide historical data as well as (sometimes) current prices for most existing assets and indices, so you can use them for live trading as well as in the backtest.

Q. How can I compile my script to an executable for avoiding to have its source code on a server?
A. With the EXE flag: Put a set(EXE); command in your script, or start Zorro with the -x command line option, then click [Test] or [Train]. Your script will be compiled to a machine code .x file from which the source code can not be retrieved anymore. You need Zorro S for this.

Q. I use my own price data and asset list, and get results very different to the tests in the manual.
A. The manual results are generated with price and asset data from a standard FXCM or IB account. Run first a test with the included data and asset lists, then with your own data, and compare both performance reports, especially the trading costs. Look also into the logs and check where their trades differ.

Q. I have an incredibly profitable system, but my script does not work. I even get: "Error 111 - Crash in run()". I don't know what's wrong - how can I fix it?
A.
Look under Troubleshooting.

Q. My script does not still work. I got a support ticket - please fix my script!
A. Zorro Support can answer technical questions, help with technical issues, and suggest solutions. But we are not permitted to write, modify, debug, or fix user scripts. If you need someone to fix your script, please contact oP group and ask them for a quote. They'll code it for you - it's their job.

Live trading

Q. Can I copy the Zorro folder on a USB drive and run Zorro from there?
A. Yes. Make sure that you have full access rights to that drive.

Q. How many Zorro S instances can simultaneously trade on a PC or VPS?
A. The number of parallel running programs on a PC is limited by the available memory, the internet bandwidth, and the CPU performance. In the case of Zorro, on an average PC the limit is about 8..10 instances.

Q. I'm getting error messages when I try to connect to IB / Oanda / FXCM / MTR4.
A. Read the manual about IB / Oanda / FXCM / MTR4 etc for learning how to connect to your broker and which assets are available. The 3 most frequent reasons for connection failure are wrong login data, a wrong account type (demo / real) or a server outage (at weekends or holidays).

Q. I want to trade with the MTR4 bridge, but MTR4 has no Zorro EA.
A. You must install the MTR4 bridge as described here.
Please also read the remarks that cover all known issues with MTR4 bridges. If you are not familiar with installing files and folders on a PC, ask someone for assistance. oP group also offers an installation service on the Zorro download page.

Q. I've set the stop loss in my script to 10 pips from the entry price, but in my trading platform it looks like 15 pips.
A. The stop loss that really stops your trade and the stop loss that you see in your trading platform are two very different things. For details, look in the manual under StopFactor.
 

Q. My system does not close trades in live trading. It works in the backtest.
A. US citizens are often not allowed to directly close Forex trades (no joke!); you must either trade in NFA compliant mode or open an account in a different country, f.i. UK.

Q. My live system does often not open or close trades - and I'm sure that I don't live in the US.
A. There can be many reasons for rejecting orders, but unless you're trading a very illiquid asset, it should not happen often. Otherwise something is wrong. You can normally see the reason of the rejection in the error message from your broker (such as: "No tradeable price"). The two most frequent reasons that you can fix in your script: Sending orders at a wrong time when the market is closed, or sending orders with a too small or too large stop distance. If an open order failed, enterLong / enterShort return 0.

Q. Where is the live chart? How can I visualize the price curve and the trade entries and exits in real time?
A. For live charts use your broker's trading platform. Zorro is purely for automated trading and does not display live charts. The equity curve on the trade status page is normally only updated once per day.

Q. The prices in the Zorro log are different to the prices that I see in the live chart, and also sometimes different to the open/close prices of the trades. 
A. Zorro displays generally ask prices in logs and on charts, while some platforms, f.i. MTR4, display bid prices on charts by default. But you can normally switch the platform chart to also show prices.

Q. How can I change the sounds for entering, winning, or losing trades?
A. In your Zorro folder you'll find sound files with names like "win.wav", "loss.wav", or "open.wav". Replace them with your own sounds in .wav format. Use Mute in Zorro.ini for permanently disabling sounds.

Q. I run the same strategy with the same broker on two different VPS. Both versions open different trades although they should be identical.
A. With the same broker and account you'll normally get rather similar trades. But they are not necessarily identical, especially not with Forex or CFDs since any trade entry and exit is based on a individual price quote. Differences in latency can also contribute to different trade entries and exits.

Q. I'm a Zorro S owner and use two Zorros for trading two strategies on the same real money account. In the moment when the second Zorro logs in to the account, the first one logs off and the server indicator gets red.
A. Your account is limited to a single session by your broker. Contact your broker and ask for activation of multiple sessions for your account.

Q. Sometimes my system opens trades that do not appear in the broker platform.
A. Those are phantom trades, used for equity curve trading or for virtual hedging. You can distinguish them in the log from real trades by their winged brackets {..} as opposed to the rectangular brackets [..] of real trades.

Q. I trade with FXCM, but the equity displayed by Zorro differs from the equity displayed in the Trading Station.
A. This is a known bug of the FXCM trading API. It does not matter for the strategy, but you can let Zorro calculate the equity instead by using the BrokerPatch setting in the Z.ini file.

 

► latest version online