Hi,
I'm writing a basic EA that initiates a trade based on the 8 and 13 EMA crossing on H1.
When I backtest this I see that during certain periods, the lines crossover and re-crossover giving false signals...basically price is trading up and down in a tight range and causing the crossover signals to fire.
As you know, the MA crossover works best in a trending market, not when it's bobbling up and down and not going anywhere.
See attached chart for an example of what I mean...between the blue vertical lines I have marked 5 'X' spots where the lines crossover.
Is there any indicator I can use to add to the existing EA MA crossover signals system to prevent entering a trade during times when price is whipsawing up and down. How can I 'programmatically' tell when not to enter a trade during these conditions?
Cheers,
Jenks.
