Making a C++ Interactive Brokers TWS Client with a Custom Socket Implementation

0 comments

I recently worked on an Interactive Brokers TWS API implementation in C++, and I wanted to share some thoughts on it while they are fresh in my mind. Intro The purpose of this post is to prove that IB’s TWS API has a socket implementation that is replaceable.  I made an implementation that retains all …

Adding Exact Fee and Credit Calculations to Zorro

0 comments

Executive Summary I describe a way to add exact fees and credits to any Zorro backtest, using the new enterTrade() function.  I will be needing this capability to detect the minimum capital requirements of my Don System by determining the exact Interactive Brokers commission fees incurred. Motivation Shortly after I published my success story, I …

Success Story 1: Stock Momentum Trading System

3 comment

Executive Summary I wrote a stock trading system. It trades NYSE and NASDAQ stocks long-only, using Zorro and IB. It appears to be profitable in backtests, and it passed a reality test suggested by Johann Christian Lotter.  Licenses for sale. Disclaimers Before we begin, I have some obligatory reminders: Historical backtest performance does not imply …

Continuous Futures Data in Zorro 2: Parsing CSV to T6

2 comment

In this second part of my Continuous Futures mini-series, we will convert our Sierra Chart continuous futures CSV data to Zorro’s T6 format. Analysis of the CSV Data Let’s take a look at the first few lines of the file, to see what we are parsing: Date, Time, Open, High, Low, Close, Volume, NumberOfTrades, BidVolume, …

Get Historical Data from Darwinex REST API Using Zorro Script – Part 2: Parse Any JSON

0 comments

This is part 2 of the Darwinex API series (part 1 is here).  We will parse Darwinex’s historical data, which is in the JSON format.  Normally, we would use Zorro’s dataParseJSON() function for such a task, but the function’s present incarnation does not appear to support the eccentric format that we have downloaded. (Perhaps someone …

Get Historical Data from Darwinex REST API Using Zorro Script – Part 1: HTTP Access

2 comment

In this lesson, we download historical data using Zorro.  Zorro supports several data vendors out of the box, such as FXCM, Oanda, AlphaVantage, and Quandl, but today, we will investigate how to download data from any documented REST API.  To demonstrate this, we will connect to the REST API by Darwinex.  (This API is in beta, so …

Custom Trading System 1: Rapid Prototyping to Live Trading

0 comments

This series of articles is intended as a general guide to designing one’s first trading system, whether from scratch or using some widely available tools. I will place more emphasis on the technical aspects of the implementation rather than the strategy design itself. However, the intended strategy design might affect your final implementation. In this …