Here is a strategy that I programmed with the help of great individuals on the TS forums, Origional programming was found on TS forums and posted on this thread already.
This uses a color change of a smaller HMA and a larger HMA as a filter for direction, also, times are included so you can set start and end times for day trading.
Jim
inputs: price(Close), jthmaLength( 21), jthmaLength2(84),
startTime(0500), endTime(1600), EnterTradeEndTime(1600);
variables: Avg( 0 ), Avg2( 0 ), Avg2Up( false ),
Avg2Dn( false ),MP( 0 ),AvgUp( false ), AvgDn( false );
MP = MarketPosition;
Avg = jthma( price, jthmaLength ) ;
Avg2 = jthma( price, jthmaLength2 );
Avg2Up = Avg2 > Avg2[1];
Avg2Dn = Avg2 < Avg2[1];
AvgUp = Avg[2]> Avg[1] and Avg > Avg[1];
AvgDn = Avg[2]< Avg[1] and Avg < Avg[1];
{buy, sell short Criteria}
If Time > startTime and Time < EnterTradeEndTime then begin
if AvgUp and Avg2Up then
Buy ( "jup" ) next bar at market ;
if AvgDn and Avg2Dn then
sell short ( "jdn" ) next bar at market ;
end;
{sell, buy to cover Criteria}
If MP = 1 and AvgDn then sell next bar at market;
If MP = -1 and AvgUp then buy to cover next bar at market;
if time = endtime and MP > 0 then sell this bar on close;
if time = endtime and MP < 0 then buy to cover this bar on close;
+JTHMA STRATEGY+FILTER.ELD