Quantcast
Channel: Forex Forum - World Wide Invest - Forex Indicators
Viewing all articles
Browse latest Browse all 4173

(Share) create Any Time Frame on MetaTrader

$
0
0
How to Get Any Time Frame on MetaTrader

Changing time frames using MetaTrader is not always straightforward. Thanks to Dallas Young for this detailed description of how to do this.

To do this you need a MT4 indicator file. Which means someone wrote it up and released it as a custom indicator. You load this indicator onto a chart the same as you would load something like an RSI or Stoch or MACD or something.

First: You need to know how to load custom indicators and this type of thing. Metatrader 4, basically, has 2 different types of files that you will encounter - .mq4 's and .ex4 's.
The .mq4 's need to be compiled and that's what the "Meta Editor" application is for. They're pretty much just a .txt file. Once you compile a .mq4 the Meta Editor creates an .ex4 - so the .ex4 is what we want anyway. With an .ex4 only, some people don't like that they now can't see the source code.

So, you have the "period converter.ex4" file. We need to put it into our custom indicators folder. Whichever broker you have, that is where you'll need to place the file. Mine for example (back when I used MT4) was C:\Program Files\MetaTrader - Alpari UK\experts\indicators.

In any case, you want the ex4 file to be in your MT4's experts\indicators folder.
When you pull up the navigator in MT4 (CTRL+N) it will show up in the tree at the right place. If it isn't there in the tree, then you may have to restart MT4. If that doesn't work then you probably have the file in the wrong folder. There are 2 different indicator folders for a stock install of MT4 - make sure your period converter file is in the indicators folder that is a sub-folder of "experts".

Okay, now you just have to drag and drop the indicator onto an appropriate chart. How this thing works is that it takes a multiple of the root chart and creates an 'offline' chart of the new time period. For instance. if you applied the period converter to a 5 min chart and you set the multiplier variable for "4" then it would automatically make a 20 min offline chart.

I had my MT4 set up so that it automatically brought up the configuration box for any indicator that I applied to my charts. This is an indicator based method so you have to configure the indicator before you create your new chart. Picture attached [Editor's note: picture not yet available] shows the period multiplier that you have to set. In this case I would be making an 8 hr chart (4hr x 2).

Your new file will be in the offline charts section. Go to "File" -> Open offline.
Your new chart is in this section but you have to look for it and select it. It is all alphabetically listed.

As long as you keep the chart that you applied the indicator to open and on the original timeframe, your new chart will update automatically just like any other chart. You can load the converter more then once and set the multiplier different each time (so that you don't have to open too many charts). For example: you could load the period converter onto a 1 min chart with the multiplier set at '20', then a different one set at '40', '180', and '360'. You will create a 20 min, a 40 min, a 3hr, and a 6 hr - if you were so inclined. Keep the original 1 min open and the others will be fine. If you switch the 1 min to a 5 min the others will stop updating until you bring the original back to 1 min.

One last thing (hopefully), this indicator needs you to have .dll imports enabled - so you'll have to do that. Go to "Tools" -> "Options" -> "Expert Advisors" -> and check the 'allow dll import' box.

That should be good. Play around with it. Make templates and profiles and all that. Have fun!

enjoy
Attached Files

Viewing all articles
Browse latest Browse all 4173

Trending Articles