ENUM_TIMEFRAME Personalized Periods

To add comments, please log in or register
karachiento
82
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
Thanks for your reply!
Carl Schreiber
Moderator
7067
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.

Fernando Carreiro
4262
Fernando Carreiro  
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!

karachiento
82
karachiento  
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

karachiento
82
karachiento  
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?

Fernando Carreiro
4262
Fernando Carreiro  
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.

karachiento
82
karachiento  
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!

Fernando Carreiro
4262
Fernando Carreiro  
karachiento: It sounds extremely laborious and difficult ... :(

It depends on your level of coding skill and knowledge.

karachiento
82
karachiento  
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.

Marco vd Heijden
Moderator
8148
Marco vd Heijden  

It's always a good challenge.

Just keep trying until you succeed.

karachiento
82
karachiento  
Marco vd Heijden :

It's always a good challenge.

Just keep trying until you succeed.

Thank you!

To add comments, please log in or register