Argh... Timeframe references at H1 or higher in MQL5 are not the same as in MQL4. My previous fix in version 3 blew up the middle timeframes. My bad. Fixed in version 4 which organically calculates the current timeframe from seconds:
Re: Convert MT4 indicators to MT5
391ā[A]s we know, there are known knownsāthere are things we know we know. We also know there are known unknownsāthat is to say we know there are some things we do not know. But there are also unknown unknownsāthe ones we donāt know we donāt know.āāDonald Rumsfeld, 2002