How to not trade till x amount of bars/candles have passes


I appreciate any help on this, been trying to find the answer for days.

how to make not trade during let’s say 5 candles. So if the ea sends buy order, then it won’t trade again till 5 candles pass.

I’ve only found how to not trade on the same candle (eg. trade only once per candle) but this is too short for some reasons. 

Any help super appreciated, or even point me into the right directions... eg, functions that might do this. 

Many thanks.

Remember the current candle's datetime. Count how many candles have passed since then using iBarShift.