One trade only using every tick method

 

Hi,

I have made a very simple EA. The problem I am having is that when I use the Every Tick method while testing lets say on the 1 hour chart, if the triggers are set and the EA opens the trade and takes profit, if the current candle still meets the criteria, it will immediately open another trade!

Is there a way I can flag it so that lets say, once a trade is opened and closed on the current candle, then the EA will not trade again until the current candle is closed or the next one is started. ( Using the every tick method for testing ) I hope this question makes sense. Any advice is welcomed

DojiSan

Reason: