Indicators: Period Converter Optimized

 

Period Converter Optimized:

Improved period converter support real-time refreshing, low CPU cost and other features.

Author: wfy05

 

I am sorry to say, the author of this indicator is wrong when he says created charts will update automatically, just like built in charts, so long as you leave the " breeder" chart also active.  It does not work.   When MT4 is closed and reopened with the "breeder" chart intact, the created timeframe charts are as dead as a doornail!

Can the author of this indicator fix this?

 

My apologies to wfy05, the author of this fantastic custom indicator.  Now it is working.  What did I do differently?  I do not know.  This time, during life market hours, I used the 1 minute chart to generate a 3 minute chart (as experiment).  The 3 minute chart continued working as I clicked around to other charts and came back to it.  I even turned MT4 off and reopened it and found the 3 minute chart still working whenever I clicked on it. 

Thank you, wfy05, for a greatly appreciated indicator.

Now, if you could just make another indicator that would enable conversion of MT4 time to user time in the Data Window.........

 

Off again, on again, off again.   This is my third post on this indicator.  At the time of the second post, all was looking good, and the problems referred to in the first post were not occurring.  But now they are.....

After experimenting wilth this indicator, it seems the bottom line is that it works if you use just one chart to breed just one custom timeframe.   Contrary to what the author is saying about this indicator, I cannot get more than one custom timeframe from any "breeder" chart.   Additional timeframes do not refresh.  In fact, once one custome timeframe is running off of a "breeder" chart, this indicator does not work again on that same "breeder" chart, nor on ANY OTHER chart......for the same or ANY OTHER currency pair.

In other words. I can get the indicator to work ONCE, and it does great!  But I cannot get it to work AGAIN on the same, or on ANY other chart.  If I want another custom timeframe, I must first close the only one that is successfully running!

This is a great indicator!   It would be truely great if it did all the author says it will do!  I, for one, would like to have a couple of special timeframes open and running on a couple of currency pairs at the same time.  But even if that is not possible, I would at least like to have more than one custom timeframe running on one pair.

 

Thanks for your work, but I'd rather use the original one...

 

works for me perfect I recommend this one vs original one

 

Thanx a lot was very useful for me

 

I encountered some problems with this indicator... so I created a new derivative version called "P4L PeriodCon.mq4" (v1.6) that is posted on ForexFactory.com (http://www.forexfactory.com/showthread.php?t=206301). (If such links are unwelcome here, I apologize; please remove it).

See my post on ForexFactory for complete details...

One problem fixed is that if you create an offline chart, e.g. EURUSD,M20 and open up more than one chart, the 2nd-Nth charts do NOT live-update! Only the first chart does -- but my version fixes that.

A new feature added is to support a user-defined timeshift of any value (so long as it's a multiple of the source chart). Any offline chart can be timeshifted, not just Daily charts. Furthermore, you can generate any number of timeshifted charts from a single source chart just by adding additional instances of the indicator. (I'm sure the more you add it will affect CPU performance, but like v1.4, my indicator is tick-based and has the ability to delay by msec, so performance should not be as big a problem as the earlier script version(s) ). About timeshifted charts, please note the "Symbol()" name is changed, e.g. "EURUSD+2H". Most indicators, EA's, and scripts should work but some may need modification if either Symbol() name is critical, or, if they don't understand how to deal with the relative time-shift between the offline chart and other data sources). I created a new "P4L CandleTime.mq4" script (also on FF) that properly accounts for the timeshift when it reports the bar-remaining-time.

So, yes, one can generate timeshifted charts that display local timezone instead of the broker timezone. One can also generate Daily charts (or H4's) shifted by any number of hours. If you want to align with NY close, 17:00:00 ET, for many broker feeds this will result in a 5-day-per-week Daily chart rather than the more common 6-per-week which have very short Sunday (or Sat) bars.

I have been able to add several instances of the indicator to a source chart, generate multiple offline charts (either unique timeframes and/or timeshifted ones) and then open all those offline charts at once, including multiple of the same offline chart. All of them update with incoming ticks. The live updates also work after quitting and restarting MT4, so long as the source chart remains open. I can't say whether every broker feed is the same, but... it works for me.

The original authors (and "rangebound" of FF who provided some key tips) are graciously acknowledged for their earlier contributions.

 
frederick:

When MT4 is closed and reopened with the "breeder" chart intact, the created timeframe charts are as dead as a doornail!

I read something similar on another site/thread concerning an indicator generating constant range bars. The cure was to put it in the experts folder, not the indicator folder.
 

This indicator works, but took too much processor power to run. Can you change that?

 

This does not work for me. When i add the indicator, no window opens and when i compile the indicator in the MetaEditor, getting "not all control paths return a value" for the following section:

 int reinit()

{

   deinit();

   init();

   LastStartTime = Time[Bars-1];

   LastEndTime = Time[0];

   LastBarCount = Bars;

} (the error is here)


bool IsDataChanged()

{

Reason: