I am not sure what you mean with "skipping" bars, but if you want to restrict your trading to market hours, use the hour() or lhour() function for this. You can normally get the market hours for your asset from the broker's website.

Bars are skipped when the asset is not traded and there are no price quotes. This depends on the asset, not on your script.