ENUM_TIMEFRAME Personalized Periods

 
In MQL5, there are a series of time periods within the enumeration ENUM_TIMEFRAME (PERIOD_M1, PERIOD_M5, etc).
Is possible to create personalized periods? For example PERIOD_M45
Thanks for your reply!
 

Yes, but you have to code it yourself out of one minute bars - and this takes a bit more than just a few code lines :(

But search so much has already been coded may be this as well.

 
karachiento: In MQL5, there are a series of time periods within the enumeration ENUM_TIMEFRAME (PERIOD_M1, PERIOD_M5, etc). Is possible to create personalized periods? For example PERIOD_M45.

Short answer: No!

Long Answer: You can create Custom Symbols with user-defined time-frames but that will not change the allowable standard time-frames used in many functions. So the answer is still, no!

 
Carl Schreiber:

Yes, but you have to code it yourself out of one minute bars - and this takes a bit more than just a few code lines :(

But search so much has already been coded may be this as well.

Thank you

 
Fernando Carreiro:

Short answer: No!

Long Answer: You can create Custom Symbols with user-defined time-frames but that will not change the allowable standard time-frames used in many functions. So the answer is still, no!


if I can use custom periods in the standard indicators it is valid for me.

That's possible?

 
karachiento: if I can use custom periods in the standard indicators it is valid for me. That's possible?

As I stated, you cannot use custom periods in the standard indicator functions. You would have create your functions or indicators to build up the "custom" periods off of 1 Minute Bars, much like the Custom Symbols would also use that technique.

In other words, you would have to code all your own functionality around the concept of custom time-frames.

 
Fernando Carreiro:

As I stated, you cannot use custom periods in the standard indicator functions. You would have create your functions or indicators to build up the "custom" periods off of 1 Minute Bars, much like the Custom Symbols would also use that technique.

In other words, you would have to code all your own functionality around the concept of custom time-frames.

It sounds extremely laborious and difficult ... :(

Thank you!

 
karachiento: It sounds extremely laborious and difficult ... :(

It depends on your level of coding skill and knowledge.

 
Fernando Carreiro:

It depends on your level of coding skill and knowledge.


Until now, my programming skills and knowledge have always been one step behind my concerns. I think that's why I improve day by day.

At some point I will try, because I'm sure it would improve the strategy I'm optimizing.

It is a good challenge for me.

 

It's always a good challenge.

Just keep trying until you succeed.

 
Marco vd Heijden :

It's always a good challenge.

Just keep trying until you succeed.

Thank you!

Reason: