No trade/orders block doesn't work - EA keeps placing multiple orders
-
Hello,
I have built a pretty simple EA, consisting of 5 conditions based around EMAs and candle stick patterns followed by a pending buy order block but when I test the EA on MT4, it places thousands of orders at the same time when it passes all of the conditions. I have tried using the no trade and no pending orders block separately and have also tried to set an if trade/order block to be zero and only then looks for the conditions but still no luck.
Appreciate any help on this.
Thanks,
Krunal -

-
https://fxdreema.com/shared/U3y2WDrNd
place this before everything .
also use candle ID 1 for condition blocks. as a good standard practice. -
Hi Max,
Thanks for your reply. I had already set the candle ID to 1 as the strategy is all based on the previous candle. I'll try out the once per bar block to see if that helps.
Thanks mate.
-
Hey @max-c
I've put the 'once per bar' block in at the top but it still seems to open multiple orders:

-
@krunal20 can you share link please. share project link left hand corner.
-
@max-c - Here you go mate:
-
@krunal20 have you tried connecting formula block to once per bar aswell.?
and block 5 candle open is greater than median price of itself? may not work -
@max-c No, I haven't tried connecting the formula block to once per bar but i'm struggling to understand why I would need that. Happy to give it a try though.
So blocks 5, 6 & 7 are basically simulating a hammer candle (I wasn't sure how else to specify this), so block 5 is there to ensure the body of the candle is not larger than the range of the candle.
-
@max-c - I've tried to connect the formula block to once per bar but still no luck. I've also tried to connect the buy order to once per bar too but still doesn't work.
Getting pretty frustrated because I thought the no trades/orders block should prevent the conditions from being activated if there's a live trade and/or order.
-
Hi @max-c & for everyone's infomation. I've got it to work by directly linking the formula to the if no trade/order block and then all of the conditions after that. I think it was creating multiple orders because the EA wasn't checking if there were any live trades/orders before the formula and so it was passing straight through to the last condition before the buy order.
Thanks for the effort @max-c