2 Candels Pause after Trade?

 
I'm a beginner coder.
The strategy is working so far.
and In back test I only have one trade at a time now.
but there are several trades in a row where sl is triggered each time, these could be bypassed by introducing 2 candels break.
How could this be implemented?
Can someone write the code?
 
Tarsock:
I'm a beginner coder.
The strategy is working so far.
and In back test I only have one trade at a time now.
but there are several trades in a row where sl is triggered each time, these could be bypassed by introducing 2 candels break.
How could this be implemented?
Can someone write the code?
Save the bar time of the trade in a variable. Don't enter a new trade if the ( current time - last trade time ) is less than ( 2 x PeriodSeconds() ).
 
Tarsock: Can someone write the code?

Lots of people can. Why can't you? Show us your attempt (using the CODE button) and state the nature of your difficulty.
          No free help (2017)