Weekend Reading – Some Quant Fin

Matlab and Rapid Miner Videos

  1. Neural Market Trends Rapid Miner video tutorials have resumed.
  2. Pairs trading with Matlab.
  3. Basic pair’s trading in Matlab youtube video.
  4. Short video on GUI creation in Matlab.
  5. Monte Carlo methods in Matlab video.
  6. Interactively create plots in Matlab video.
  7. Importing Excel data files into  Matlab video.
  8. Curve fitting in Matlab video.

Random Quant Finance Articles

  1. Open Source FIX engine, QuickFix.
  2. Mathematician on Wall Street PDF Part I, Part II, Part III.
  3. Stat Arb in the U.S equity market [PDF, Technical paper] .

Blog Post’s

Popularity: 1% [?]

 

Building an Automated FOREX System: Expert Advisors & Indicators

IndThis is article number two in our tutorial series Building an Automated Currency Trading System from Scratch. If you have not read the introduction to this tutorial series I recommend you read building an ATS before reading this article.

MetaTrader 4

The current version that is most widely used and supported is MetaTrader 4 however beta versions of MetaTrader 5 are currently in testing. In order to build an automated trading system using MetaTrader 4 we will need to write a program that will run inside MetaTrader. There are three types of programs that run inside MetaTrader, these are Custom Indicators, Expert Advisors and Scripts. The screen shot on the right shows the built in indicators that ship with MetaTrader.

MetaTrader- MetaQuotes Language

Custom Indicators, Expert Advisors and scripts are all written in a programming language called MetaQuotes Language, often abbreviated MQL.  Although all three application types are written in MQL there are slight differences between program types.

MetaTrader- Indicators and Custom Indicators

Custom indicators are written in MQL the client terminal will execute the indicator every time a tick is received. The main use of indicators is to graphically display some user defined or built in data relationship. The most common use for indicators is for Technical Analysis. Below are some screenshots which show a built-in indicator being applied to the daily AUD/USD currency chart.

  1. With AUD/USD chart open double click on desired indicator.
  2. Enter parameter settings and execute.

Indicator Setting MetaTrader

MACD Indicator

MetaTrader- Expert Advisors

An Expert Advisor or EA for short share similar properties to Indicators. Expert Advisors or EA’s are written in MQL and are executed on tick data. Expert Advisors or EA’s have trade logic written into them. Basically an EA does everything an indicator can do, however an EA will also open, close and modify trades programmatically. To attach an EA to a currency pair the process is exactly the same as it is for an indicator. There are two sample EA’s that ship with MetaTrader 4 these are the MACD Sample and Moving Average.

MetaTrader- Scripts

Scripts are the final type of application that are available in MetaTrader. A script is designed to be executed only once. Scripts are usually used to automate client side non-trading actions, like modifying data. They can however be used to perform simple trade logic tasks.

MetaTrader – MetaEditor

All the code we write for our automated trading system will be done MetaTrader’s Integrated Development Environment called MetaEditor. MetaEditor allows you to store and manage source code for all projects in an easy to use way. If you are used to Visual Studio or X-Code IDE’s then you will be disappointed with the functionality of MetaEditor. MedEditor does offer syntax highlighting and code completion which is very handy. There is also a built in on-line library that covers most topics. Below is a screenshot of the IDE:

MetaEditor

To open MetaEditor from MetaTrader simply press F4 or from the menu bar:

Tools –> MetaQuotes Language Editor

Home Work

Before next article make sure you understand the three different program types that are used in MetaTrader. Also try attaching and using some of the built in indicators in MetaTrader. Before moving on I would also recommend downloading the MQL4 book from MetaQuotes. This is a free book that covers the basics of programming in MQL and in later articles I will assume you are up to speed with the concepts presented in the book.

In the next article we will discuss designing a simple trading strategy and pseudo code.

Popularity: 2% [?]

Tagged with:
 

Building an automated currency trading system from scratch

In the next few weeks we are going to explore the basics of designing an automated currency trading system. We are going to use MetaTrader as the basis for the trading system. The actual strategy we design will be for illustrative purposes only and NOT tradable. That being said the tips and techniques you learn over the course of this series will give you skills needed to develop your own trading strategy.

Before you start

Before we start designing the automated trading system I will assume you are familiar with some basic FOREX or currency market concepts. If you are new to the finance world you may like to read the following articles.

To get you quickly up to speed with MetaTrader you can download the software from MetaQuotes. You may also benefit from reading the following basic articles.

So now you have a basic understanding of the FOREX or currency market and have MetaTrader installed on your computer we are ready to get started. Below is a roadmap for next few articles.

  • What is an automated Trading System and how can we build one in MetaTrader?
  • Expert Advisors and Indicators in MetaTrader.
  • Designing a simple strategy and pseudo code.
  • From pseudo code to a basic trading system.
  • Garbage in garbage out: improving modeling quality.
  • Testing, Testing, Optimization and more testing.
  • Forward testing and performance evaluation.
  • Automated Trading System version 2.0.
  • So you are ready to go live: Choosing a broker.
  • So you are ready to go live: Setting up a Virtual Private Server.

As you can see there is a lot of content that needs to be covered and I am sure as this series progresses there will be content added or removed depending on your input. If there is any materiel you want covered please send me an email or comment below.

Popularity: 1% [?]

Tagged with: