From the archives: Thirteen futures system.

This is the “Thirteen” mechanical trading system for trading a diverse portfolio of COMMODITY FUTURES.
Mark Johnson 02 June 2001

Introducing the classics of system building for a futures portfolio — the simplest Thirteen system. The system is always on the market, that is, reversible — from long goes to short and vice versa. The entry is carried out when the MACD indicator crosses the parameters 13 And 130 zero line. This, in fact, the same as the system, plotted at the intersection of two moving averages, which proves that, at least until 2001 year could easily be made at the intersection of two moving averages.

As we see, for the period from 1980 to 2000 the system has been earning steadily. Test on major US futures with one contract:

Nose 2001 of the year, when it was published, she began to feel feverish and stability was lost.

And here is the simplest code for Omega, confirming the thesis that the code of a robust system should be placed on a matchbox:

—————————————
vars: mysignal(0);

mysignal = MACD(Close, 13, 130);

if (mysignal > 0.0) then buy tomorrow at the market;

if (mysignal < 0.0) then sell tomorrow at the market;
—————————————

And this is for WL4:

—————————————
{$I ‘MACDEx’}
was MPane, MEx, MHist, MPane1, MEx1, MHist1, MPane2, MEx2, MHist2, MPane3, MEx3, MHist3: integer;
was Bar, p: integer;
var bLongSAR: boolean;
MEx := MACDExSeries( #Close, 13, 130 );
MHist := SubtractSeries( MEx, EMASeries( MEx, 9 ) );
MEx1 := MACDExSeries( #Close, 13, 130 );
MHist1 := SubtractSeries( MEx1, EMASeries( MEx1, 9 ) );
MEx2 := MACDExSeries( #Close, 13, 130 );
MHist2 := SubtractSeries( MEx2, EMASeries( MEx2, 9 ) );
MEx3 := MACDExSeries( #Close, 13, 130 );
MHist3 := SubtractSeries( MEx3, EMASeries( MEx3, 9 ) );
MPane := CreatePane( 100, true, true );
PlotSeries( MEx, MPane, #Maroon, #Thick );
PlotSeries( EMASeries( MEx, 9 ), MPane, 111, #Thin );
PlotSeries( MHist, MPane, #Black, #Histogram );
DrawLabel( ‘MACDEx(13,130) and 9 period Signal Line’, MPane );
for Bar := 130 to BarCount – 1 do
begin
if LastPositionActive then
begin
p := LastPosition;
bLongSAR := PositionLong( p );
if PositionLong( p ) then
begin
if CrossUnderValue( Bar, MEx1, 0 ) then
begin
SellAtMarket( Bar + 1, p, ” );
end;
end;
if PositionShort( p ) then
begin
if CrossOverValue( Bar, MEx3, 0 ) then
begin
CoverAtMarket( Bar + 1, p, ” );
end;
end;
end;
if not bLongSAR then
begin
if CrossOverValue( Bar, MEx, 0 ) then
begin
BuyAtMarket( Bar + 1, ‘0’ );
end;
end;
if bLongSAR then
begin
if CrossUnderValue( Bar, MEx2, 0 ) then
begin
ShortAtMarket( Bar + 1, ‘4’ );
end;
end;
end;

—————————————————-

  Sundries....
Scroll to Top