Systematic Trading research and development, with a flavour of Trend Following
Au.Tra.Sy blog – Automated trading System header image 2

Free Code

Code Library

System trading code is disseminated in multiple posts, it might be a good idea to consolidate them all in one place (here) before it all becomes a bit too messy!

I also write monthly for Technical Analysis of Stocks and Commodities (TASC) magazine in their Trader’s Tips section (mostly Trading Blox code).

Please find it all below for your perusal:

— TASC magazine Traders’ Tips — 

 
TASC Traders Tips (April 2010): Modified Volume Price Trend Indicator in Excel
In the article “Modified Volume-Price Trend Indicator” in this issue, author David Hawkins discusses a modification of the volume-price trend indicator (VPT), already based on the on-balance volume indicator originally developed by Joseph Granville.
link to traders’ tips | link to Excel file
 
TASC Traders Tips (May 2010): Smoothing %b in Trading Blox
In “Smoothing the Bollinger %b” article, author Sylvain Vervoort explains how to remove noise from the traditional %b indicator, used to identify clear turning points and divergences.
link to traders’ tips | link to tbx file
 
TASC Traders Tips (December 2010): Hull Moving Average
In “Trading Indexes With The Hull Moving Average” in that issue, author Max Gardner explains how to use the Hull moving average for long-term market timing.
link to traders’ tips | link to tbx file

— MISC — 

 
Bootstrap Test for back-testing statistical signifcance computation
Implementation of the bootstrap test as described in David Aronson’s book: Evidence-Based Technical Analysis (amazon link)
link to book review | link to bootstrap post 1 | link to bootstrap post 2 | link to exe

— CSI Unfair Advantage API — 

 
RetrieveBackAdjustedContract2 API function documentation
Reference guide on this essential function taken from CSI API document.
link to original post | link to RTF document

Retrieve back-adjusted futures contract
Some sample code in C# using the API to access one of the most important function to retrieve any futures contract with any type of back-adjustment offered by CSI.
link to original post | link to C# source file

CSI Individual Contracts Extractor
A utility to extract individual contracts from CSI’s Unfair Advantage Database in plain text files.
link to original post | link to zip file containing EXE

— Trading Blox — 

 
MMDI Portfolio Filter
Variation on the classic MACD Portfolio Filter, using the Moving Median indicator in lieu of the standard Moving Average for the fast average.
link to original post | link to block file (tbx)

Original Vortex Indicator
Implementation of the Vortex Indicator
link to original post | link to block file (tbx) | link to sample Entry Exit block (tbx)

Improved Vortex and AVX Indicators and AVX system
The original Vortex Indicator had a flaw (gap handling for non-Forex markets) and did not use an exponential moving average for smoothing. This is my improved version with a basic reversal system using it for entries/exits
link to original post | link to zip file (containing: Vortex Indicator & AVX auxiliary block file (tbx), AVX Entry Exit block (tbx), AVX System (tbs))

Volatility Filter
Implements a filter allowing to reject/accept trades based on level of volatility compared to historical levels
link to original post | link to tbx file (volatility ranking indicator) | link to tbx file (Portfolio Manager block)

— R Code — 

Walk-Forward implementation of Vince’s Leverage Space Model
Utilises the LSPM R package (by Josh Ulrich) in a walk-forward approach to allow for an adaptive testing testing methodology.
link to original post with necessary explanations | R code file

— AmiBroker — 

 
e-ratio calculation
The e-ratio is a practical way of evaluating the edge of a specific component of a system without having to test the system as a whole (ie edge of the entry signal only).
link to original post (includes all necessary code snippets and logic)

— TradersStudio — 

 
e-ratio calculation for Donchian Channel Breakout system
This code contains the necessary generic code to calculate the e-ratio as well as an implementation to apply the calculation to a Donchian Channel Breakout entry signal.
link to original post | link to zip file (containing Donchian Channel Indicator TS code, Custom trade Report TS code, Buy System TS code, Sell System TS code, Excel e-ratio macro (text file), Excel example workbook)