Appendix C. EasyLanguage Programs

for Filtered, Two Moving-Average Crossover Systems

Buys and Sells if Fast Average Crosses Over Slow Average Plus a Percentage Filter With Delay.

inputs: FLen(86), SLen(35),Filter(0.07), delay(1);variables: FMA(0),SMA(0),Btime(0),Stime(0);FMA = average(Close of data2,FLen) of data2;SMA = average(Close of data2,SLen) of data2;If Currentbar > SLen and FMA crosses aboveSMA*(1+Filter) then       Begin               Btime=currentbar+delay;               Stime=0;       End;If Currentbar = Btime then Buy this bar at close;If Currentbar > SLen and FMA crosses below SMA*(1-Filter) then       Begin               Stime=currentbar+delay;               Btime=0;       End;If Currentbar = Stime ...

Get Time the Markets: Using Technical Analysis to Interpret Economic Data, Revised Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.