Script repository

The following scripts are included as examples and can be started from the [Script] scrollbox. Please note that not all scripts will start right away! Some will need training, some will need additional historical data, and some will need R or modules like DeepNet or RQuantlib. Please check out the description in the source code.

Analysis

Calculates mean, standard deviation, skew, and kurtosis of the price curve of the selected asset.

Benchmark

Simple RSI strategy with 10-year backtest in TICKS resolution for speed tests.

Binary

Example strategy for binary options with 5-minute bets.

BrokerArb

Broker arbitrage example. Exploits price differences between two brokers. Requires Zorro S, an asset list, and an account list with entries for the two brokers. 

CalculatePi

Example script that calculates the first 1000 digits of Pi

Chart

Opens a t1, t6, or t8 historical data file and displays its content in a chart.

CSVtoHistory

Small script for converting price history in some .csv formats to Zorro's .t6 format, optionally split into separate year files. The input/output file names and the format definition can be edited in the script.

CurrencyStrength

Strategy that exploits the relative strength of currencies and invests in the strongest forex pair.

Deeplearn

Short-term machine learning strategy from the article on Financial Hacker. Requires R with Caret and a deep learning package. Can switch between libraries Deepnet, H2O, MxNet, and Keras/Tensorflow. 

Distribution

Price distribution chart, comparing the distributions of two assets.

Download

Script for adding new assets or downloading the price history of single assets or asset lists; details under History.

DownloadEOD

Script for downloading end-of-day data in Zorro .t6 format from any online source. The source URL and the format definition can be entered as strings. 

DTree

Decision tree example. In-sample backtest, so don't use this for trading!

Ehlers

The system from the paper "Predictive Indicators for Effective Trading Strategies" by John Ehlers, converted to lite-C by DdlV. With and without crossover prediction.

Filter

Test Zorro's spectral filter functions.

Gap

A simple gap trading system based on a book by David Bean as an example of time dependent trading (not really profitable).

Grid

For your grid trading experiments. Better do not trade this system with real money!

History

Displays the content of .t8, .t6, and .t1 historical data files in a spreadsheet. Uses the panel funcion and thus requires Zorro S; a separate history viewer for the free Zorro version is available on the Download page..

Keystrokes

Demonstrates controlling another application by sending key strokes or mouse clicks. Opens Notepad™, writes something in it, saves the text, and closes Notepad.

Indicatortest

Displays the curves of some indicators as described in the Indicators chapter.

Luxor

System from a (otherwise good) trading book by Jaeckle and Tomasini. Huge profits in the backtest period used in the book, but better don't trade it outside that period...

Mandelbrot

Example of a script using the Windows API.

Martingale

For your martingale experiments. Better do not trade this one with real money!

MinWinRate

Scalping debunker. Plots a histogram of the required win rates for a given asset and trading cost dependent on trade duration in minutes. 

OpenGL

Demonstrates implementing external libraries, in this case the OpenGL 3D graphics library.

Payoff

For calculating profit diagrams of option combinations. R and the RQuantLib package must be installed.

Perceptron

Simple machine learning system with walk forward analysis.

Predict

Predicts peaks, valleys, and crossovers in a price curve several bars in advance.

PriceDist

Compares the price ranges and price distributions of two assets (EUR/CHF and EUR/USD) for finding grid-trading-worth inefficiencies.

PythonTest

Short script for testing the correct installation of Python.

RandomPrice

Compares a price curve with a random curve. Let fellow traders guess which one is which.

RandomWalk

Displays the statistics of short-term price movements in the same direction.

RecordT1

Records prices of the current asset to a .t1 file in [Trade] mode. A click on [Save] stores the file.

Regime

Script for testing the response of indicators to a market regime change from cycles to trending.

Rtest

Short script for testing the correct installation of R.

Sentiment

Connects to the Interactive Brokers TWS, downloads the SPY options chain, and plots today's market sentiment histogram.

SpecialBars

Script illustrating the use of Range, Renko, Haiken Ashi, or Point-and-Figure bars for single-asset and multiple-asset strategies.

Spectrum

Spectral analysis chart example.

TradeCosts

Lists the ratio of spread to daily volatility of the main assets. Find out which assests are least expensive to trade.

TradeTest

A script that opens a panel with buttons for manually opening and closing positions in different modes. Useful for testing broker/account features, f.i. if it's a NFA account, if it is FIFO compliant or if partial closing is supported. Description under Broker Plugin.

TradeOptions

A script that opens a panel with buttons for manually opening and closing SPY options.

Workshop1 .. Workshop8

Scripts containing the code examples from the workshops. Additional price / options historical data for workshops 6 and 8 available on the download page.

Z1 ... Z12

Zorro's included trade systems. Executable systems only (no source code). Additional price history needed for backtesting.

See also:

Workshops

► latest version online