Using both the stochastic and the 200 MA trend as filters wasn’t working as no trades met the entry condition.
So I used the Stochastic as that goes into overbought and oversold a lot more. Over the 5 year test period we had only 7 trades and ended in the red.
function run()
{
//// set(TICKS);
StartDate = 2008; // Date to start trading from
BarPeriod = 60; // 1 Hour bars
LookBack = 250;
//Price Series to be used
vars Price = series(priceClose()); // Price based on the close of the daily bar
vars FastEMA = series(EMA(Price,10)); // 10 period EMA
vars SlowEMA = series(EMA(Price,20)); // 20 period EMA
vars FilterEMA = series(EMA(Price,200)); // Using the 200 daily EMA as a price filter
Stoch(13,3,MAType_SMA,3,MAType_SMA); // Stochastic Indicator
vars FilterRSI = series(RSI(Price,0));
//Entry Conditions
if(crossOver(FastEMA,SlowEMA) && Price[0]>FilterEMA[0]
&& FastEMA[0]>FilterEMA[0] && SlowEMA[0]>FilterEMA[0]
&& rSlowK<30 && rSlowD<30){
enterLong();
}
if(crossUnder(FastEMA,SlowEMA) && Price[0]<FilterEMA[0]
&& FastEMA[0]<FilterEMA[0] && SlowEMA[0]<FilterEMA[0]
&& rSlowK>70 && rSlowD>70){
enterShort();
}
}
Agree, a high trending pair such as the various yen pairs over the last year wont be very good candidates for testing trending systems. They will definitely give biased results based unless we detrend the price series before testing the system on it.
Thanks liftof for doing this I wanted to see the results from first hand…can you give me the numericals for the GBPUSD in % for your previous post…I’m wondering if the percentage is higher than 40%
Well atleast most of the ones I have tested have really low win rates but their average pips per win can be high enough to tilt the scales in your favor.