MT5 - custom periods/timeframes

 

Hello!

In MT5, I would like to trade on an alternative timeframe that's not natively supported, let's say M23 for example. Is this possible in any way?

I have found this: https://www.mql5.com/en/forum/219849. In that post, user Fernando Carreiro says, that "You can already create your own Custom charts, to be what ever you want, be it Ticks, Seconds, Renko, Kase, Constant Range, etc.". I've read through all the documentation available for custom symbols, but I just couldn't find anything usable for that. How would one create a M23 chart, preferably so that an EA could use that chart to trade?


Thanks for any suggestions! 
Please add "Custom Time Period" in next update
Please add "Custom Time Period" in next update
  • 2017.11.15
  • www.mql5.com
Could MT4/5 offer "Custom Time Period" in the next update...
 
Trader856:

Hello!

In MT5, I would like to trade on an alternative timeframe that's not natively supported, let's say M23 for example. Is this possible in any way?

I have found this: https://www.mql5.com/en/forum/219849. In that post, user Fernando Carreiro says, that "You can already create your own Custom charts, to be what ever you want, be it Ticks, Seconds, Renko, Kase, Constant Range, etc.". I've read through all the documentation available for custom symbols, but I just couldn't find anything usable for that. How would one create a M23 chart, preferably so that an EA could use that chart to trade?


Thanks for any suggestions! 
It's custom symbol so you can't trade it directly. Beside that you create your data as you want, so up to you to create bars which are M23. What have you tried and what is the problem ?
 
Trader856:

Hello!

In MT5, I would like to trade on an alternative timeframe that's not natively supported, let's say M23 for example. Is this possible in any way?

I have found this: https://www.mql5.com/en/forum/219849. In that post, user Fernando Carreiro says, that "You can already create your own Custom charts, to be what ever you want, be it Ticks, Seconds, Renko, Kase, Constant Range, etc.". I've read through all the documentation available for custom symbols, but I just couldn't find anything usable for that. How would one create a M23 chart, preferably so that an EA could use that chart to trade?


Thanks for any suggestions! 

https://www.mql5.com/en/forum/229521/page3#comment_13261028


 

Thanks for your answer!

I just wanted to make sure, that there isn't any recommended way to do it. My first instinct is to create a period converter as an indicator. After launching, it would create an offline chart of the desired period. Not really a nice solution performance-wise (I am using a multi-instrument multi-timeframe EA), but I guess in MT5, there's nothing better.

 
Looks cool, I'll check it out. Thanks!
 
Alain Verleyen #:
It's custom symbol so you can't trade it directly. Beside that you create your data as you want, so up to you to create bars which are M23. What have you tried and what is the problem ?

Hi, my data1 in on 5min. but the strategy signal is triggered when 5min and 45 min are in same direction. is 45min a valid setting ? could u pls kindly clarify as u said "u cant trade it directly"

thanks so much

 
@lin310 #: could u pls kindly clarify as u said "u cant trade it directly"

Custom Symbols are "artificial" and cannot be traded. Your EA would need to read the data of the custom symbol, but trade against the real symbol.

For example, consider a 10 second based custom symbol called "c.EURUSD.10s" derived from tick data of the real symbol "EURUSD".

Your EA would read the bar close data with "c.EURUSD.10s" ...

iClose( "c.EURUSD.10s", ... )

But you would have to open a position with "EURUSD", not "c.EURUSD.10s" ...

CTRade::PositionOpen( "EURUSD", ... )

So, you read from the custom symbol, but trade the real symbol.

 
there is also a way to "hack" time in the indicator by means of updating the indicator buffers after a specified time of seconds, minutes or ticks, so while the official timeframe might be one the software recognizes, the buffers can be outputting data on your own unique time period