Thread: Help with an EA
View Single Post
  #6 (permalink)  
Old 12-08-2008, 05:01 PM
jimven's Avatar
jimven jimven is online now
Senior Member
 
Join Date: Mar 2007
Location: Upstate New York
Posts: 139
jimven is on a distinguished road
Quote:
Originally Posted by icepeak View Post
It places a trade when it should not, but only after several hours. For example, last night on the EURUSD it went short when it should have been looking for buys. The MAs crossed over and instead of changing the direction for sell to buy, it continued looking for shorts.
This could have something to do with how you're detecting the MA crossovers. For example, if you buy when the fast MA crosses up over the slow MA and sell when the fast MA crosses back down over the slow MA, and you don't filter it any more than that, you're going to get into trouble, especially if you're judging the result based on the most recent bar (shift = 0).

When the two MAs are really close together and then start crossing, they might cross both up and down repeatedly, giving you false trading signals, possibly in both directions in a short period of time.

You've got to program some kind of threshold to cross before you accept a cross up or a cross down so it doesn't whipsaw.
__________________
Success is more perspiration than inspiration . . .
Reply With Quote