How to Create Custom Time Frames in Metatrader 4

Free Video Trading Course
Have you ever wanted to create your own custom time frames in Metatrader 4?  I’m going to show you how to do just that with a cool, easy-to-use period converter.  Creating custom chart periods is easy with the free Metatrader 4 platform.

Metatrader 4 is an award winning Forex trading platform, and is the most popular trading platform on the market today.  With Metatrader 4 (MT4), you can create custom trading robots called Expert Advisors (EAs), and you can even backtest trading strategies.

Users of Metatrader 4 also enjoy a community of traders that program and share their own EAs.  In fact, most of the custom indicators, scripts, and expert advisors are built and distributed by this tech savvy user community.  Almost anything can be found, and any trading strategy can be programmed.

Even with all its flexibility, Metatrader 4 does have its limitations.  For one, tick charts aren’t available for MT4.  Tick charts can be invaluable when trading news and other high volatility market situations, but the only tick chart solutions for MT4 so far are crude and frustrating to use.

I’ve yet to find a single tick chart solution that doesn’t have to be reset each time the custom tick chart is closed.  If you switch between profiles often, like I do, then something like that is simply not practical.

That being said, there are some features that Metaquotes (creators of MT4) overlooked that can be implemented fairly easily, and without a big headache from a practical standpoint.

One such feature that we can add is custom time frames, using a simple customer indicator for Mt4 called a period converter.

Create Custom Chart Times in MT4 with this Period Converter Indicator

All you have to do is download the Period_Converter_Opt file, and extract it or copy it into the custom indicators folder of your MT4 installation (Metatrader 4 > Experts > Indicators).  The next time you start MT4, you can drag your period converter onto any chart.

Note:  In the Common tab check ‘Allow DLL imports’ and clear the ‘Confirm DLL function calls’ checkbox, or this indicator will not work.

In the picture above, the PeriodMultiplier is set to 2.  This number can be changed to whatever you like.  The time frame to which you apply the indicator will be multiplied by this number.

Example:  If I applied the indicator with the setting of 2 (above) to a 5 minute chart, this would produce a 10 minute chart.  If I changed the PeriodMultiplier to 4, that same 5 minute chart would produce a 20 minute chart.

It is also possible to add multiple instances of the indicator to one chart.  In other words, you could create your 10 minute and 20 minute chart from the same 5 minute chart.  You would just have to add two of the period converter indicators to your original 5 minute chart.

In order to use these custom time frames in Metatrader 4, you must find and open them.  All of your custom time frames can be found in your offline charts (File > Open Offline). See the picture below.

Navigate to and open your new custom time frames for Metatrader 4 (see the picture below).  The new custom charts will stay active, as long as the original chart(s) stays open.  Setting these custom chart times up in separate profiles can save you some headaches.

Here’s an example of how I use this tool in my trading:  I open a GBP/USD chart and select the 1 minute default time frame in Metatrader 4.  Then I apply the period converter to my 1 minute time frame with the PeriodMultiplier set to 2.  This creates a 2 minute custom time chart.

I then apply the period converter to my new 2 minute chart.  Only this time, I change the PeriodMultiplier to 3.  This creates a 6 minute custom chart.  I repeat the process on the 6 minute to produce a custom 18 minute chart.

Now, I have a short, medium, and long time frame for short term trading.  I would then save this setup as a separate profile for this currency, and call it something like GBPUSD Short or GBPUSD Pound Dollar 2-6-18.

This way you can open other charts and profiles, but you can always come back to your custom GBPUSD profile without having to go through these steps again.  I personally use a separate profile for each currency and relative time frame (i.e. short GBP, medium GBP, long GBP, swing GBP, etc…).

Multiple time frame trading is a popular technique.  It’s great for triggers and fractal energy observations.  I typically trade with 3 relatively close time frames, according to the Top Dog Trading method.

I use this everyday, so I figured you guys might find it helpful.  I’m not sure who originally contributed this custom indicator, but it has been crucial to my trading system.  If you would also like to create your own custom time frames, download this free period converter for Metatrader 4.

Download the Period_Converter_Opt Indicator
Free Video Trading Course
  • http://whyismycomputersoslow.net/ Samantha

    Hi Chris I liked your informative article on Custom Time Frames for Metatrader 4. This really solved my problem, thank you!

  • Chris

    Glad you liked it. I should do more how to articles in the future.

  • http://www.hello1234.com tara smith

    Very interesting info! Perfect just what I was searching for!

  • Aham8

    will it convert to a seconds chart ? and how please let me know .

    • http://www.fxdayjob.com/ Chris

      Actually, Metatrader will only go as low as 1 minute. As far as I know, Oanda has a proprietary charting software that goes as low as 5 seconds, and I think they’re the only broker who offers such a thing. Google “oanda seconds chart,” and you’ll see what I mean.

  • winston

    hi Chris thanks so much. But i would like to ask. Can an EA run on the offline chartS?

    • http://www.fxdayjob.com/ Chris

      I’ve used them on offline charts before, but I’ve heard it both ways. I guess it depends on the EA. If it’s an EA that just needs to be run on the chart you are using, you could always just open another regular chart for your pair to run the EA on. 

      Also, the reason people usually say that EA’s don’t work on offline charts is because the offline charts don’t receive tick data, but this period converter gives the offline charts that you create tick data, so… I think most EA’s should work.

      Do you see what I’m saying? You are essentially creating active, custom charts out of offline charts using the period converter. My guess is that any EA should work on these.

  • Fdsalkf

    Thank you for this man!

    • http://www.fxdayjob.com/ Chris

      You’re welcome. Glad I can help you.

  • Charmy

    Hi Chris,
    Thanks, this indicator is really useful.

    Do you know if there is an indicator where you can pick the time you want the period to start? e.g. I would like to set up a 12 hour period and have it starting at 9am and 9pm, instead of 0:00 and 12:00

    • http://www.fxdayjob.com/ Chris

      Not that I know of. Unfortunately, those periods are based on your Metatrader version. I’d like something like that as well, so that I could use NY based Forex charts for accounts abroad. I’ve never found anything like that, though. Let me know if you do.

  • dlombard

    thanks for the converter. does the offline chart need to be continually refreshed or will it update just like a regular chart? I can’t seem to get it to give me real time data without refreshing.

    • http://www.fxdayjob.com/ Chris

      It’s always given me real time data, but you have to keep the base chart open. In other words, if you’re multiplying a 5M chart by 4 to get a 20M chart, you have to keep the 5M chart open (with the converter attached).

  • Damien

    Go to scripts in mt4 and there is exactly the same period converter that you can drag on to your chart , then open offline chart with converted time.

    YOU CAN HAVE TICK CHARTS ON MT4

    • http://www.fxdayjob.com/ Chris

      Damien, it’s not exactly the same, but it works the same way. That’s a new addition. Thanks for bringing it to my attention.

      As for your second statement, I never said you couldn’t have tick charts in Metatrader 4. I said it was not practical. Every time you close MT4, you have to wait for the tick chart to rebuild itself.

      I stand by my statement, and most traders who actually trade live with MT4 will agree with me. Tick charts aren’t practical in MT4 just yet. For that you need to use Ninja Trader, Trade Station, proprietary platforms, etc. Hopefully that will change in the near future.

  • Jerry

    Hi Chris: I have download the period converter and for some reason my platform is stuck. I can not click other window. How do I get rid off the offline window? Thanks

    • http://www.fxdayjob.com/ Chris

      Jerry, that sounds like a software conflict, or possibly a memory problem on your computer.

      • Bright

        Hi Chris i just tried the period converter, i checked the common tab but did not see what you said should be cleard before the converter works, i mean the confirm DLL fuction calls

        • http://www.fxdayjob.com/ Chris

          I hope you got it working. I recently downloaded it again, and everything worked fine for me.

  • Dave

    This period indicator does not seem to work on the new build 604. Any advice to make it operational? I want to activate my Renko Charts on a 2 minute offline chart.

    • http://www.fxdayjob.com/ Chris

      Dave, sorry for the late response. I’ve had a lot going on lately, and I’ve been falling behind on the site duties a bit.

      I’m not sure why it’s not working for you, but all the new builds of Metatrader 4 that I have used have included a period converter script of their own that works just like the one I originally uploaded to this site.

      You should find what you’re looking for in your “Scripts” folder.

  • Jon Sigal

    Hi I am having problems with getting this indicator to work on my MT4 I put it in the experts/ indicator file close and reopen my MT4 see it on the customized list of indicators put when I click on it or drag it nothing happens? please help?

  • Jon Sigal

    I found the answer on a different blog: Because of the new mt4 upgrade to 600+ i think thats why its not working.. But the period converter thats in the code base of your mt4 platform work .. Its under the scripts section .. I just tried it out and works ..

    • http://www.fxdayjob.com/ Chris

      Yes… that was mentioned a few times above your first comment, but I’m glad you got it working for you. I need to update this article, now that MT4 includes this ability (and, like you said, the old indicator doesn’t work in the new MT4 builds).