Improved multi-timeframe/offset/chart period converter, P4L PeriodCon.mq4 - Page 12
Page 12 of 5026 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 255

Thread: Improved multi-timeframe/offset/chart period converter, P4L PeriodCon.mq4

  1. #111
    90691
    Quote Originally Posted by ;
    Is it posible to have 2 days bar/candle or 3 days bar/candle from the MT4??
    The answer is YES

    next....






  2. #112
    90691Hi pips4life

    I had an idea that I might utilize your Indior to create an offline chart depending on the chart being replayed in the Strategy Tester. The idea was that I'd have the ability to see 2 or more timeframes being replayed synchronously. By way of example, place the ST to M5, add the indior for this M5 chart twice, once giving a H1 offline chart along with the 2nd giving a M15 offline chart...

    once I add the indior and configure it I get an Alert and then MT4 locks up...

    I am on Build 409, any ideas what is happening?

  3. #113
    90691
    Quote Originally Posted by ;
    Hello

    I had a notion that I might use your Indior to make an offline chart depending on the chart being replayed from the Strategy Tester. The thought was that I'd be able to see 2 or more timeframes being replayed synchronously. By way of example, place the ST to M5, add the indior to the M5 chart twice, once giving a H1 offline chart and the 2nd giving a M15 offline chart...

    When I add the indior and configure it I get an Alert and then MT4 locks up...

    I'm on Build 409, any ideas what is going on?
    I have not tried using it together with all the Strategy Tester in MT4 but as that instrument is pretty limited, I'm not surprised if there are problems. Nonetheless, if you get lucky and find it out, post what your solution/experience is.

    If you desire to conduct a egy utilizing custom indiors or EA's, I guess you are fairly limited in what you can do with only MT4. However, if you only need fairly standard indiors and mean to check your egy utilizing manual style backtesting (maybe not an EA in other words), then consider using ForexTester2. It is a decent tool with a UI like MT4, and it may display multiple charts (any timeframe, and several currency pairs) as you can manual/visual backtesting. As said -- why it is not a comprehensive solution, and that is -- EAs or habit MT4 indiors can't run. If one is extremely good at programming, then I suppose you could write an equal indior/EA for it, but that is a lot of work (and I have never tried writing any custom instrument for ForexTester2 myself).

  4. #114
    90691
    Quote Originally Posted by ;
    I haven't tried using it together with the Strategy Tester in MT4 but as that instrument is pretty limited, I am not surprised if there are problems. If you get lucky and figure it out, post what your solution/experience is.

    snip.
    Thank you for the reply.

    I used ForexTester for a while a few years ago, I even tried coding inside but found it somewhat restrictive and feature poor compared to MT4.

    Basically I am trying to replie a few of the functionality that Ninja provides, I have a few tools I've created for MT4 and the last bit is multi-timeframe synchronised PA Replay. I'd utilize Ninja but Ninja script provides almost zero functionality to utilize Fibs...

    I will have a look at your code and see if I could find what's causing my issue.

  5. #115
    90691A little update...

    I sort of got it working, I was using M5 from the Strategy Tester and I generated an M15 chart... it ran for a minute or so before cleanup. I needed to set a upgrade interval of 10 secs. Because the ST is operating faster than actual time I feel the Indior struggles to maintain and can not slow down the ST down as it's running from the interface ribbon.

    One solution is to build similar functionality into an EA and run that in the ST.

  6. #116
    90691
    Quote Originally Posted by ;
    One alternative would be to build similar functionality into an EA and operate that in the ST.
    Decided to go this path, used period_converter code with reference and built a small script to sit down the offline charts so that they can update themselves. Works well even with 4 offline timeframes below the interval running in the egy tester, e.g. ST H1 offline M30, M15, M5 and M1

  7. #117
    90691
    Quote Originally Posted by ;
    Interesting! I found. I sent it to Period_inverter, to avoid confusion.
    But it do not allow real time update. Without programming background, I am trying to follow along with guideline to modified your indior, but please let us know whether you have done it
    I have read this thread and looks theres a lot I have to know to grasp whatever where the start of all this and how to use the indior from the 1st page? /

  8. #118
    104035Hi Pips4life,

    1st, I want to say Thank you for sharing this great indior! This indior is fantastic, but your kindness to share is even better!

    2nd, I want to ask about the usability IndiorCounted from the offline chart. Like I use this, the command will not returned the actual value as from the online chart. It keeps returning . Is this understood? If this is understood, have you try to make the indior counted work?

    Thanks! and
    Regards

  9. #119
    90691
    Quote Originally Posted by ;
    Hello Pips4life,

    1st, I want to say thanks for sharing this excellent indior! Your kindness to discuss is even better, although this indior is excellent!

    2nd, I want to ask about the usability IndiorCounted in the offline chart. Like I use it, the control will not returned the actual value as in the online chart. It keeps returning . Is this known or it should have worked? Have you attempt to make the indior counted work, if this is known?

    Thanks! And
    Regards
    Alvseek, and everybody else with my P4L PeriodCon.mq4 indior:

    Re #1, you're welcome and thanks for the match.

    Re #2,
    Thank you for that interesting observation. I wasn't conscious of it, however it does seem like a restriction with MT4, and it might very well be in charge of a degradation of performance if a person adds several indiors to offline charts, specifically those indiors that make use of IndiorCounted to stop excessive calculations (e.g. Moving Average, all Oscillators, many standard and custom indiors, EA's, etc.).


    Some posts that mention this MT4 limit can be found by searching Google for keywords like: indiorCounted offline chart

    This is one (but unfortunately it just supports -- and doesn't fix -- the problem):
    http://forum.mql4.com/43049

    I did not read through many others, but those posts affirm there is an MT4 limitation. So, to get round the issue, I have put together a possible replacement for your IndiorCounted() function which I've called myIndiorCounted(). It ought to work for either offline or routine charts, but I haven't yet tested it extensively. Use it and report back any problems in this thread. I put it in place # 1, if it works.

    The attached file is simply a test indior that can be added to any chart, offline or normal. A popup alert will tell you exactly what the standard IndiorCounted() will return, and also exactly what my replacement function will come back, together with a count of the #bars in the chart.

    If you add this to an offline chart, you will* notice there is a difference! Whereas the routine IndiorCounted() always returns 0 (which is the MT4 bug/limitation), you will see the myIndiorCounted() will return what it needs to, which is 0 the first time , then with the pitches that follow, it yields the value of Bars-1. For your 1st tick of each new bar, it yields Bars-2. If ever there is a situation where 2-or-more new pubs are observed on an offline chart, my purpose produces a safe assumption to return to force the recalculation of your other indior values. It should not impact your CPU loading as this shouldn't occur frequently.

    Assuming all is well with my purpose, simply grab the bottom portion of the attached code. Catch only the int myIndiorCounted() section. Put that into your own indior-or-EA code, and change all existing references to IndiorCounted() to state rather myIndiorCounted(). Compile your code and it must work equally for ordinary charts as well as offline charts. If you're currently trying to utilize a indior, you will either have to find the source code for it, or you need to find an equal replacement with source code that you could edit.

    For offline charts, there is one known difference in behavior, which is that if you perform a manual chart Refresh control, it will not force your entire indiors to recalculate all pubs. On a normal chart, a Refresh will work the same. This difference is not a major concern, but if you want to force a whole Refresh of offline charts, you should probably restart MT4 which will do it.


    Good luck. Please report back with your experiences with this new function.
    Kent ()
    https://forexintuitive.com/attachmen...1627138650.mq4

  10. #120
    90691
    Quote Originally Posted by ;
    Alvseek, and everybody else with my P4L PeriodCon.mq4 indior:

    Re #1, you're welcome and thanks for the complement.

    Re #2,
    Thank you for that interesting observation. I was not conscious of it, but it does seem to be a restriction with MT4, and it could very well be responsible for a lack of performance if one adds many indiors to offline charts, specifically those indiors which make use of IndiorCounted to prevent excess calculations (e.g. Moving Average, all Oscillators, many standard and custom indiors,...
    Hello, thanks for the response

    really I have use my own process to make things operate. What I am afraid of is when there's indior that the source is not available. But well, seems like we do not have any choice with this restriction that is MT4. Hope the MT5 will have better features.

    Because of its myIndiorCounted. I will test and see how it functions. Will report when there's bug or errors.

    Thanks! and
    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information