This page contains a Flash digital edition of a book.
FX TRADING SYSTEMS MARNEY VOLUME INDICATOR™


input: avgLen(10), mins. in.session(1440), autobars(True), upcolor(cyan), dncolor(red); var: start(0), end1(0), end2(0), x(0), p(-1), count(0), avg(0), barsinday(0), DayNumber(0); array: xv[199,1440](0);


if bartype 2 then begin


start= (Sessionstarttime(1,1)); end1= (sessionendtime(1,1)); end2= (sessionendtime(1,2));


value1 = timetominutes(start); value2 = timetominutes(end2); if start > end2 then value3 = 1440+(value2-value1);


if start end2 then value3 = -(value1-


value2); if autobars = false then value3 = mins.in.session;


barsinday = ceiling(value3/ barinterval);


if d<>d[1] then begin if count=barsInDay then begin p=iff(pfor x=1 to barsInDay


begin


xv[p,x]=ticks[barsInDay+1-x]; end;


end; count=1;


end else count=count+1;


if xv[avgLen-1,count]>0 then begin


avg=0; for x=0 to avgLen-1 begin avg=avg+xv[x,count];


end; avg=avg/avgLen; plot2(ticks,”ticks”,default


,1); plot1(avg,”avg”,yellow,defau


lt,1); end;


if close > open then setplotcolor (2,upcolor); if close open then setplotcolor (2,dncolor);


end;


if bartype > 1 then begin avg =


averagefc(v,avglen); plot2(v,”ticks”,default


,1); default,1);


if close > open then setplotcolor (2,upcolor); if close open then setplotcolor (2,dncolor);


end; Copyright Caspar Marney 2010 © Copyright Caspar Marney 2010 ©


if close > open then setplotcolor (2,upcolor); if close open then setplotcolor (2,dncolor);


end;


if bartype > 1 then begin avg = averagefc(trueran


ge,avglen); ,default,1);


plot1(avg,”avg”,yellow, default,1);


plot2(truerange,”range” plot1(avg,”avg”,yellow,


MARNEY RANGE INDICATOR™


input: avgLen(10), mins. in.session(1440), autobars(True), upcolor(cyan), dncolor(red); var: start(0), end1(0), end2(0), x(0), p(-1), count(0), avg(0), barsinday(0); array: xr[50,1440](0);


if bartype 2 then begin


start= (Sessionstarttime(1,1)); end1= (sessionendtime(1,1)); end2= (sessionendtime(1,2));


value1 = timetominutes(start); value2 = timetominutes(end2); if start > end2 then value3 = 1440+(value2-value1);


if start end2 then value3 = -(value1-


value2); if autobars = false then value3 = mins.in.session;


barsinday = ceiling(value3/ barinterval);


if d<>d[1] then begin if count=barsInDay then begin p=iff(pfor x=1 to barsInDay begin xr[p,x]=truerange[bar


sInDay+1-x]; end;


end; count=1;


end else count=count+1;


if xr[avgLen-1,count]>0 then begin avg=0; for x=0 to avgLen-1 begin avg=avg+xr[x,count];


end; avg=avg/avgLen; plot2(truerange,”range”,defau


lt,1); plot1(avg,”avg”,yellow,


default,1); end;


if close > open then setplotcolor (2,upcolor); if close open then setplotcolor (2,dncolor);


end; Conclusion


This series of articles has been the result of years of research, learning many expensive mistakes along the way, such as identif ying arbitrary mathematical algorithms that appeared to be the Holy Grail, finding systems that worked particularly well on some markets but not others and systems that appeared to work well both in and ‘out of sample’.


Almost all of these ideas and discoveries were flawed.


I have learnt that each mistake was, in some way, a result of either over optimisation, or curve- fitting , even if inadvertently. I hope that these articles help others to avoid many of the pitfalls of building trading systems that it has taken me years to learn; with no doubt many lessons still to be learnt.


To summarise, in a few simple rules :


Keep it simple – if a system looks too good to be true, it probably is. There is no ‘Holy Grail’ – only applying a small robust edge with consistency and discipline, over a portfolio of instruments, with good risk management.


Avoid arbitrary formula – if you test enough parameters, you will always find some that work, both in and out of sample, or on some markets. That doesn’t mean they’re robust parameters, nor even robust ideas.


Do base systems on market behaviour that can be explained and understood.


Remember that nothing in the world can take the place of persistence.


Caspar Marney 16 FX TRADER MAGAZINE July - September 2010


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48  |  Page 49  |  Page 50  |  Page 51  |  Page 52  |  Page 53  |  Page 54  |  Page 55  |  Page 56  |  Page 57  |  Page 58  |  Page 59  |  Page 60  |  Page 61  |  Page 62  |  Page 63  |  Page 64  |  Page 65  |  Page 66  |  Page 67