Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

How to Plot Any Timeframe in Metatrader using Period Converter MQL4

1 min read

Some strategies work better in a timeframe which is not provided by default in MT4. And I do have a specific requirement to plot 90 min charts in metatrader which is not available by default in metatrader. Iam using 90 min charts for Ichimoku Shorter term Trading system. Moreover, this method will update your custom chart in real-time, so it really is just as good as the default timeframes of the platform.

Step to Plot 90 min timeframe

1)Download the indicator (Period_Converter_OPT.mq4) and extract the file into your /experts/indicators/ metatrader directory, double click on it to bring it up in the Meta Editor, and hit F5 to compile it. (By the way, this is an indicator file, NOT to be confused with the script file period_converter, which is provided in your platform.) It will then show up under “Custom Indicators” in your Navigator box.

[wp_ad_camp_5]

 
2) If you want 90min (M90) timeframe charts , for example, open a normal M30 chart, and apply the Period_Converter_OPT indicator to it (drag/drop it into your chart). In the indicator’s properties box, choose the desired PeriodMultiplier (e.g. 3 i.e 3×30 for M90). IMPORTANT: In the “Common” tab, check the “Allow DLL inputs” box. Also, keep the UpdateInterval “0″ to allow the updates to be in real-time. Sample Axis Bank 30 min charts is shown below.

Axis Bank 30 min chart

3)On the main MT4 platform, go to File>Open Offline and your new chart will be listed, so simply choose it (e.g.AXISBANK , M90). This will bring up the new chart. Any indicators you apply to this new chart (e.g. MAs, Stochs, RSI, etc.) will be based on on the custom time-frame.

Converted Axis Bank 90 min chart

4)IMPORTANT: You must keep the original chart (onto which you had originally applied the Period_Converter_Opt.mq4 indicator in Step 2 above) always open if you want the new non-standard time-frame chart to automatically update with current ticks. If you close that chart or remove the indicator from it, the custom chart will not update. The bid line will automatically move on the custom chart to verify that the chart is being updated with new data.

That’s basically it. All multiples will work. So, if you want H12, for example, use PeriodMultiplier=12 on an H1 chart, keeping that H1 chart open if you want the new chart to be continuously updated. (Remember to always check “Allow DLL inputs”, too.)
Just another thought:

Someone asked me if an H2.5 chart was possible. Not if you use H1 as the timeframe for the base chart. But acceptable equivalents would be M150 obtained in any of the following ways:

PeriodMultiplier
=150 on an M1 chart
= 30 on an M5 chart
= 10 on an M15 chart
= 5 on an M30 chart

All will give you the equivalent of an H2.5 chart

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

Algomojo Button Trading Expert Advisor for Metatrader 4 Platform

Here is a video tutorial and button trading expert advisor code for MetaTrader 4 platform. You can use the expert advisor to send automated...
Rajandran R
4 min read

Metatrader 4 – Simple Expert Advisor for Algomojo Platform

f writing a simple expert advisor for Metatrader 4 to send automated orders from MT4 to Algomojo - Cloud-Based Trading Platform. This tutorial provides...
Rajandran R
1 min read

How to Send Orders from Metatrader 4 Expert Advisor…

This tutorial helps you to convert your Metatrader 4 expert advisor to send automated orders to the Algomojo Platform. Currently, Algomojo supported brokers are...
Rajandran R
2 min read

16 Replies to “How to Plot Any Timeframe in Metatrader using Period…”

  1. if i put 1min chart – y cany i have 7-8-9 as a muliple!!
    y cnt i have a 3-7-12min chart!!
    is it possible

  2. Hi Rajandran.

    Thanks for your custom time frame in metatrader article. This one is i want.

    Please tell me,
    Is the forex control demo account provide nifty and banknifty current month futures? How long the demo period is Valid.

    Please post a article about how to import the nifty futures ieod one month data in meta trader manually?

    In amibroker using import wizard its possible? How to do in metatrader? so I request you please post a article about that for backtesting purpose in metatrader?

    Thanks
    Krish

  3. yah irt works. but you need to keep open 2 charts. nt a problem though.
    i was wonderin if we can get tick count charts…on 1min chart can i apply the multiple of 0.5 or 0.1…

    or

    do you have any other way 2 get the tick charts on MT4

  4. Have tried several period converters in my 64-bit computer and none will open. Tried all in MetaEditor and get 32-bit error. any ideas?

  5. though this application works, it seriously hampers the speed of the metatrader platform. iam using 8mbps net, i5 processor, 4 gb ram – still it takes ages to open a new chart or maneuver between the charts or change indicators.

    something is wrong in this indicator.

  6. you wont believe the moment i delete that chart, i am relieved. instantaneously it speeds up the work. no hanging of teh platform.

  7. Hi Rajandran,
    I am able to creating a custom chart on demo account.but it is showing the chart offline.How can I resolve this problem?

  8. The period converter MQL takes a multiplier but the script can be modified in 2 secs with an absolute number of minutes instead of a multiplier. For example you can create a PeriodConverterH7 and a PeriodConverterM90 and apply whichever you want now. That way it can be attached to any timeframe of the same symbol. Why would you add a constraint in your system to only watch one given timeframe or change the multiplier for each different timeframe?
    Also it’s a script, not an expert.

  9. Hello Rajandran,
    is it possibile to use period converter for backtesting strategies on MT4? For example: if I have M1 data, is it possibile to use period converter to backtest a strategy on H4 or D1 tick by tick, using M1 data and keeping quality above 90%?

    Thank you and wish you a good trading!

  10. Simply wish to say your article is as amazing.

    The clearness in your put up is just nice and i can think you are knowledgeable in this subject.

    Fine along with your permission allow me to clutch your RSS feed to keep up to date with impending post.
    Thanks a million and please continue the gratifying work.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More