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