There is no way to do that. The market doesn't know the price a candle will be closed at. This is why no bot will ever be able to do it either.