Filter to wait 1 bar after a trade has closed before opening a new trade?
-
Hello,
I have several conditions in my EA and one of them is a simple MA cross. My problem is that sometimes when the price straddles the MA, I have a lot of bad trades. Can I create a filter to wait at least 1 bar before opening a new trade after another trade has closed on the same pair?
I have searched around and see time filters (e.g. wait x minutes) but none based on current bar time. Here is a simple project - can anyone suggest an additional block or custom code as a solution?
https://fxdreema.com/shared/7svbKLf1d
Thank you so much you smart people!

#skipabar
-
@jjtrader You can add this blocks immediately above your 'buy now' block:

Then you will have to mirror it for your sells trades. In this example I requested the EA to search for the last closed trade and then chack that it cas closed at least 120 seconds ago. You can adjust that time as required.
-
How aboud using Candle ID = 2, to skip 1 candle after the signal.
-
@l-andorrĂ Thanks! I will try this setting the time to be equal to the chart timeframe. (so it = 1 bar). I was just hoping to be able to use "# bars" rather than time since I work with Renko charts as well and they are not time based.
Thanks again, I always appreciate your help.

JJ
-
@biztet Hi! Thank you for your suggestion. I thought about that, but I don't want to delay all entries, only those triggered right after a previous close.
Thanks for the suggestion though

-
@jjtrader You're welcome.