Moving Average Crossovers Aren't Working?
-
I tried a couple different things.
When MA(closed) is crosses below MA(open), sell order.Also this,
https://fxdreema.com/shared/eSIEFwG2However, it doesn't execute the buy/sell whenever the crossover happens.
Is there a bug? -
@yoloyacht Its just the logic: both sides of the condition are exactly identical here. When they are identical, they cannot be "above" or "below" each other.
I guess you want to compare to current time, so set the other candle ID to 0 (or 1) and leave the other as 2 (in this example):

-
@roar aren’t they different? One MA is based off close price and the other on open. Here’s what I’m trying to do btw

-
@yoloyacht oh, didnt notice that... Well I tested the EA and it did open trades
-
@roar for that EA it’s opening trades but not where it’s supposed to. I want it to trade at the position like the pic, but it’s off a lot and misses some
-
@yoloyacht That is the problem with all candle ID 0 values. Candle 0 is the current candle that is still moving. Because its moving, the moving average can also cross multiple times during the candle, and it can also create "fake" crossings where the MA returns back from the cross..