@royal

Does the original strategy intend that pending long and short orders are hit within the hour, or does it intend that only long or only short orders are hit? If the latter then you need a function to cancel the pending opposite orders if one is hit. I think you will need a trade management function for that as it will have to be executed at each tick and cannot be done at the end of each hour.

I also think that you need a TimeWait = 1; so that the pending orders don't hang around forever and are only entered between 8 & 9.

Also what 8 o'clock do you want the strategy to run is it 8am CET,GMT,UTC?

@jcl

For clarification:

When you set Barperiod = 60 does that default to ending the bars at 00 minutes 00 seconds or does this need to be explicitly specified?

The manual states that:

Code:
hour (int offset): int
Closing UTC hour of the given bar, 0..23. hour(0) gives the current hour and can be used to apply different trade tactics in the New York, European, or Asia-Pacific session.



so hour(0) gives the current closing hour in UTC, so at a few milliseconds past 8am (when zorro runs after the close of the 7am - 8am bar) does this return 9 as the closing hour (end of the bar just started at 8am) or 8 as the closing hour of the bar just finished bar 0, that started at 7am but closed at 8?

Does hour() return the same as hour(0)?