Filtering out the whipsaws
Whipsaws in pricing is the archilles’ heel in trend following system. As demonstrated by the previous 3 trading strategies, once the price is in a narrow trading range, trend following systems would trigger many erraneous trades to eat away the account.
An idea I’m having is to use ADX to filter out some of these trades. Either by comparing ADX to EMA(ADX)[1] or use DMI by ensuring + index > – index for long, for examples.
I tested a Momentum(ADX) idea by using MyADX > MyADX[10] as a condition on the 3-EMA crossovers strategy as discussed today. It doesn’t seem to be doing much as the DMI values jump around. Perhaps employing the MACD concept on ADX would yield some result.
read moreComparing data point to EMA note
I have been using EMA comparison a lot lately. For example, if MyRSI > XAverage(MyRSI, MALength) then … as a breakout indicator. However, there might be a small problem.
A better form might be to use “MyRSI > XAverage(MyRSI, MALength)[1]” Such that the current MyRSI isn’t included in the XAverage calculation. This would yield more difference since the EMA isn’t “pulled” closer by the current value to itself, as the latest data point has the most significance in an EMA calculation.
read more3EMA High Low Close crossover long strategy
Based on yesterday’s trading strategy, I developed my own 3EMA crossover strategy. Instead of only using the Close data. The high and low are also used. Here’s the idea.
Condition1 = EmaLow crosses above EmaMedClose and EmaMedClose > EmaSlowClose;
Condition2 = EmaMedClose crosses above EmaSlowClose and EmaLow > EmaSlowClose;
Buy if Condition1 OR Condition2 is true.
Sell if EmaHigh crosses below EmaMedClose OR EmaMedClose crosses below EmaSlowClose OR EmaLow crosses below EmaSlowClose.
EMA length are set to: FastHighLength(7), FastLowLength(7), MedCloseLength(18), SlowCloseLength(30).
The system does well to catch big breakouts. The 2 problems though is that it is very laggy and the whipsaws in pricing are eating it alive. See figure below.

Also, notice that I’m using a 100 contracts / bar chart.
3-MA crossovers, claimed 1.84 profit factor
Saw a forum post on TS claiming 1.84 proft factor. The concept seems interesting. Here is the code for later study. Here is the link to the post.
[ IntraBarOrderGeneration = False ]
Inputs:
EMAFastLength(4),
EMAMedLength(5),
EMASlowLength(22),
ValidBars(2);
Variables:
EMAFast(0),
EMAMed(0),
EMASlow(0),
BuyHighAmt(0),
LSetUp(False),
LSetCount(0);
{ Calculation Section }
EMAFast = XAverage(Close,EMAFastLength);
EMAMed = XAverage(Close,EMAMedLength);
EMASlow = XAverage(Close,EMASlowLength);
{ Define Entry SetUp Conditions }
If EMAFast crosses above EMAMed and EMAMed > EMASlow then
begin
BuyHighAmt = High+ 1 point;
LSetUp = True;
LSetCount = 1;
end;
If EMAMed crosses above EMASlow and EMAFast > EMASlow then
begin
BuyHighAmt = High + 1 point;
LSetUp = True;
LSetCount = 1;
end;
{ Entry SetUp is Valid – Make Long Entry if BuyHighAmt is reached }
If LSetUp and (TradesToday(Date) = 0 or (MarketPosition = 1 and PositionProfit > CurrentContracts*45))
Buy next bar at BuyHighAmt stop;
{ SetUp Failed or Long Entry Was Made – Reset Entry Conditions }
LSetCount = LSetCount + 1 ;
//If LSetCount > ValidBars or MarketPosition = 1 then {allows only one entry}
If LSetCount > ValidBars or BarsSinceEntry <= ValidBars then {replace this line with above line to allows only one entries in the same direction} begin BuyHighAmt = 9999; LSetUp = False; LSetCount = 0; end; // end of code //
Bollinger with multi-MACD system
This system for ZGG08 uses a Bollinger upper band breakout as the first condition. Other conditions are data1 MACD (positive fast slope) and data2 MACD (fast above slow) for bullish trend confirmation. It is used on a 5 min and a 45 min chart.
The long position is covered on 45 min MACD cross-below signal.
Stop is set arbitrarily at $180. Trailing stop is ($400, 63%).
The problem this Bollinger breakout system is that there is a likely chance that the breakout is a sign of exhaustion. The accuracy of the entry is merely ~44%. Although the multi-time frame MACD could confirm the existing trend. Something needs to be done to identify possible trend reversal at the Bollinger upper-band breakout.
Although profit seems good for the 60 days back-test, the system performance is not consistent as you can see from the graph below.


Recent Comments