Maybe its unclear what you want to adjust. Bar zone and market time are already set, so what is still the problem?

If there is a bar or not at a certain hour has nothing to do with your code, but with the historical data.