
Reference image, just did a quick back-test, it seems to open on all crossovers correctly and it exits the trade if it goes the opposite way

Reference image, just did a quick back-test, it seems to open on all crossovers correctly and it exits the trade if it goes the opposite way
@jstap said in EA places some trades when Candle closes MA and new candle opens above or below EA. However not all the time?:
@boseiai Your logic is correct but only if it's comparing candle ID1 to ID2.
Aha! I think I may have fixed it, I changed the second conditions Candle to ID 0 and it may have worked now as intended
And when the first condition is not a "Crosses above" action (for a buy deal) but instead set to "Is Above" It starts to open multiple deals for some reason.
So if we take the buys for example. My logic was as follows;
That when the candle crosses above the MA line and closes above it. The first condition has been fulfilled
Next condition, if the opening price of the next candle starts above the MA line. The second condition has been fulfilled
Therefore it will open a buy deal at the opening price of the new candle once the previous candle has crossed and closed above the EA line.
And from the screenshot provided, it worked with one of the trades, but should of worked later on too
Hello everyone, I hope all of you are having a wonderful day.
I seem to have a problem, where I've set my EA to sometimes correctly open a trade once the candle crosses and closes over the MA. And the next candles open must also be above the MA. (This would be a buy deal but for sell deals, opposite conditions need to apply)
However I want my EA to do this EVERY time it does this (I will add another custom indicator later to filter trades)

As you can see the trade that occurs previously crosses downwards and the opening price is below the MA therefore opening a sell deal. However (where the red arrow is pointing) no buy trade is occurring here? The candle clearly crosses over the MA, and the open price is above the MA, however there is no buy deal.
I kindly ask for some insight and help as to why this may be the case?

https://fxdreema.com/shared/Db47TXKWd
This is the current outlook of my EA and I have shared a link just in case I am doing something wrong here.
Thank you very much in advance