Trader Tech Talk 003: Getting Started With Trading System Development

In Episode 3, John gives an overview of the process of developing a trading system.  Each step along the process is discussed, including:

  • The Basics of Trading (for those who have never traded before)
  • A description of a simple trading strategy
  • A quick overview of currency trading
  • Using Metatrader 4 as a platform for developing a trading system
  • Backtesting your strategy to see if the concept is profitable

Here’s an example of a candlestick chart:

chart-example

Here’s a look at the rising price and falling price candles:

candle-types

Here is the sample program that John discusses.  Note that this program will do anything useful; it is just a sample for you to see how Metatrader code looks.

//+------------------------------------------------------------------
 //|                                                       Sample.mq4
 //|                                   Copyright 2013, John Verbrugge
 //|                                    http://www.tradertechtalk.com
 //+------------------------------------------------------------------
 #property copyright "Copyright 2013, John Verbrugge"
 #property link      "http://www.tradertechtalk.com"
extern int HighMAPeriod = 20;
extern int LowMAPeriod = 5;
// Module Variables
bool MovingAvgLinesHaveCrossed = false;
//expert initialization function
int init()
{
 return(0);
}
// expert deinitialization function
int deinit()
{
 return(0);
}
// expert start function
int start()
{
 // set up moving averages
 double HighMA = iMA(NULL,0,HighMAPeriod,0,0,PRICE_HIGH,0);
 double LowMA = iMA(NULL,0,LowMAPeriod,0,0,PRICE_LOW,0);
// Set of moving averages to use for detecting a cross
 double PrevHighMA = iMA(NULL,0,HighMAPeriod,0,0,PRICE_HIGH,0);
 double PrevLowMA = iMA(NULL,0,LowMAPeriod,0,0,PRICE_LOW,0);
// Check to see if the lines have crossed
if ((PrevHighMA > PrevLowMA) && (HighMA < LowMA))
{
   MovingAvgLinesHaveCrossed = true;
}
if ((PrevHighMA < PrevLowMA) && (HighMA > LowMA))
{
    MovingAvgLinesHaveCrossed = true;
}
if (MovingAvgLinesHaveCrossed)
{
    OrderSend("EURUSD",OP_BUY,1.0,MarketInfo("EURUSD",MODE_ASK),0,0,0,"Just a test",99999,0,Green);
}
return(0);
}

 

Trader Tech Talk 002: Talent is Overrated and The New Third Way

In Episode 2, John discusses the book “Talent Is Overrated: What Really Separates World-Class Performers from Everybody Else” by Geoffrey Colvin.  John relates the concepts of talent and becoming and expert to both trading and programming.

In the second half of the podcast, John reviews an article in Futures magazine titled “New Approach in Analyzing Forex Markets“, by Abe Cofnas.  John discusses ways that sentiment analysis could be done automatically by software.