is it a bug or not? If using criteria like this ctime = opentime >= 153000 and time < 160000 // entry if ctime then it still can open a trade sometimes at 000000 (assuming the rest of the code is good.)(on a 30s timeframe tested) Changing opentime to time fixes it.