Quote:
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.


Afaik only one direction should be traded, this is missing in the code. Also the entries and stoploss should not be fixed at 15,20,25 / 50 but pending on the 8-9 o'clock volatility of the last 22 trading days.

Quote:
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.


The pending orders are cancelled after 9 o'clock, this is working as I see in the Logfile.

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


It's 8 o'clock German time, so CET i think