I have created an EA that enters at market if either the long or short conditions are met. The problem I have noticed in backtesting is that if I get stopped out it will enter again if the long or short condition is valid. I want to stop it from entering in the same direction again until x amount of bars or x amount of time since the last order in that direction was closed.
I have tried a number of different ways by adding the condition BarsSinceOrderClosed(relevant magic number) > Defined Variable or number which is a defined variable or time (which bars is a defined variable) but when I backtest it I don’t get it entering any trades.
Any help would be much appreciated.
You must be logged in to reply to this topic.