Create non-standard timeframes in MQL4

 
Hi all,

I am programming an indicator and I wonder if it is possible to use non-standard timeframes in MQL4. Basically, I am thinking of using M10, H2, H6, H8 and H12 which are all available in MT5.
Is this somehow possible to use them in MQL4? Currently, I was trying something like iHigh(_Symbol, 480, 1).

Thanks!
 
MT4 End Of Life - End of active support for MT4 with no active support and updates; "What the future holds formt4 and the vast array of
MT4 End Of Life - End of active support for MT4 with no active support and updates; "What the future holds formt4 and the vast array of
  • 2023.09.19
  • www.mql5.com
I have heard reports that mt4 is soon to become 'end of life' with no active support or updates. Can anyone explain what the future holds for mt4 and the vast array of millions of ex4 indicators, scripts and ea's. Com/ru/forum/447913/page6#comment_47273082
 
Hello Carl,

thanks for your reply.
Does this mean that MT4/MQL4 will soon have its end of life? To be honest, there is a lot of talks since years, but it was never official...

Besides that, this does not answer my question: Is it possible to use other (custom) timeframes in MQL4? Like in the example above with iHigh(_Symbol, 480, 1) which should calculate the High of the last H8 timeframe.
 
Trader_RM #:
Does this mean that MT4/MQL4 will soon have its end of life

What do you mean by soon? When is it soon?

The CEO said that they would announce the end of life of MT4 for brokers (for the management of brokerage companies). Perhaps they have already done this, we don't know.

Sooner or later, MT4 will go down in history through evolution. Right now no one can tell you when that will happen. Perhaps in a couple of months, or maybe MT4 will be in demand for several more years.

 
Trader_RM #:
Is it possible to use other (custom) timeframes in MQL4?

To be honest, it is technically possible, but it makes no sense. Because such a solution would be indecently complex, crooked and hung with crutches. I have come across a similar solution, there are 10,000+ lines of source code, the author has been developing this for several months. A customer I know told me about this case. It was a freelance order that both the customer and the developer regretted (because it was expensive, time-consuming and difficult).

So if you need non-standard timeframes, use MT5.

Trader_RM #:
Like in the example above with iHigh(_Symbol, 480, 1)

No, it definitely won't work that way.

 
Trader_RM #:
Is it possible to use other (custom) timeframes in MQL4?

Imagine that you need a spoon.

MT5 is a cookware store where you can buy a set of cookware at a discount for a couple of dollars.

MT4 means taking a pickaxe, going to mine metal ore, and then independently building a furnace for smelting metal and smelting a spoon. And this spoon is worse than the one you could get in the store.

 
Trader_RM:
Hi all,

I am programming an indicator and I wonder if it is possible to use non-standard timeframes in MQL4. Basically, I am thinking of using M10, H2, H6, H8 and H12 which are all available in MT5.
Is this somehow possible to use them in MQL4? Currently, I was trying something like iHigh(_Symbol, 480, 1).

Thanks!

A primitive example of a dynamic timeframe


Files:
DinTF.mq4  10 kb
iCanvas_CB.mqh  46 kb
 
Vladislav Boyko #:

What do you mean by soon? When is it soon?

The CEO said that they would announce the end of life of MT4 for brokers (for the management of brokerage companies). Perhaps they have already done this, we don't know.

Sooner or later, MT4 will go down in history through evolution. Right now no one can tell you when that will happen. Perhaps in a couple of months, or maybe MT4 will be in demand for several more years.


Hello Vladislav,

to point #1: Thanks a lot for your comment on that. And yes, MT4 will sooner or later go down through evolution, that's clear. I am wondering that MT4 is still available since MT5 is on the market since a couple of years already. I think it's due to the fact that a lot of traders (and therefore brokers) are still using MT4. Let's see what happens!

 
Vladislav Boyko #:

To be honest, it is technically possible, but it makes no sense. Because such a solution would be indecently complex, crooked and hung with crutches. I have come across a similar solution, there are 10,000+ lines of source code, the author has been developing this for several months. A customer I know told me about this case. It was a freelance order that both the customer and the developer regretted (because it was expensive, time-consuming and difficult).

So if you need non-standard timeframes, use MT5.

No, it definitely won't work that way.

Thanks a lot for this helpful comment and information. I thought it would be easier (probably not as easy as stated above with the iHigh example), but if not, I won't try.

Thanks again!

Reason: