Improved multi-timeframe/offset/chart period converter, P4L PeriodCon.mq4
Page 1 of 5026 12311 ... LastLast
Results 1 to 10 of 255

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

  1. #1
    Last update: Feb 17, 2014 , uploaded sample templates. (Build 600 harmonious ).
    Last P4L PeriodCon.mq4 upgrade: Feb 14, 2014, uploaded P4L PeriodCon 509. Ex4 (still v1.11)
    Last P4L getPeriodSymbolTimeshiftsecLib.mq4 upgrade: Apr 01, 2011, published first launch v1_0

    There have been a number of variations of period converter progr that were first created in late 2005 and then upgraded into early 2006, but since thenthere have never been any upgrades (to my understanding ) or answers to a number of the limitations -- till now.

    A new version (gt;= v1.6) is supplied which I have renamed to P4L PeriodCon.mq4. (It's a derivative of previous variants called: periodcon.mq4 (v1.5 and v1.4), Period_Converter_Opt. mq4 and Period_Converter. Mq4 Previous authors (if known) are imputed in the origin, and also their earlier contributions are graciously acknowledged).

    New attributes:

    * (Additional in v1.11) Variable InvertChart was added. If set to True, an chart is output using the I as a prefix to the symbol name. (e.g. iEURUSD)
    These external variables also apply:
    InvertedOutputMultiplier = 1.0 The inverted prices are InvertedOutputMultiplier/price.
    InvertedOutputDigits = -1, where -1 is Automatic, or so the user can manually set to gt;= 0
    Example: Invert USDJPY to get iUSDJPY (same as JPYUSD). Establish InvertedOutputMultiplier=1000.0, also set InvertedOutputDigits=3 (or 4). A price of 79.275 would generally invert to 0.012614 but using these overrides, inverted price would be 12.614

    * Multi-chart live-updates work! The old versions could just live-update (tick-by-tick) a *single* offline chart using a specified name. You can generate, e.g. an M20 (offline) chart and open it, but if you opened a 2nd-Nth window(s) of the same M20 (offline) chart, these did not get live-updates! With a few tips from FF user rangebound (Thanks!) , a new approach was invented that updates and finds as several charts of a specific title as you open. (FYI, if you just open ONE of every offline chart and if you want to save CPU, there's an external factor (LiveUpdateMultipleCharts) you can change to false. But in my experience CPU performance hasn't been a problem with the new multi-chart method).

    * Complete support for timeshifts (offsets) for any interval chart. Previous version v1.5 had the capability to generate a single Daily chart with one timeshift, but this new version can open several charts -- and of any timeframe, not only Daily -- in which the user can specify any timeshift cancel desired (plus or minus). HOWEVER: The timeshift *must* be an exact multiple of the origin interval: 90min timeshift is authorized on a supply M30, M15,... or not as, but prohibited on H1(60min) because it is not an exact multiple (i.e. 90/60 equals 1.5 that isn't an exact multiple such as 1,2,3,...).

    * Timeshifts are currently specified either in #bars, or together with the new number structure, H.MM,... or both can be utilized (as of gt;= v1.7).

    Change the external factor TimeShiftAdd_in_HptMM out of 0.0 to a number. Examples:
    1.0 Timeshift 1hour forward (later). If your broker time states 22:45:00, subsequently the timeshifted offline chart time will probably be 23:45:00
    0.9 Timeshift 90 minutes forward.
    1.3 Timeshift 90 minutes forward (like in 1 hour 30 minutes = 90min complete , same as 0.90 )
    -0.20 Timeshift 20 minutes backward (sooner ).
    -5.0 Timeshift 5 hours backward (To get a GMT broker period, the chart would then exhibit NY local time)
    (Reminder, the timeshift must be an exact multiple of the origin interval (in minutes) ).

    Should you prefer setting bars, then use variable TimeShiftAdd_in_Bars (in gt;= v1.7). The timeshift (in minutes) is subsequently the #bars * Stage (of the origin chart).

    NOTE: These two variables for timeshifts are BOTH in effect and the values will combine (transformed to minutes) if you use both variables.

    The very evident appliions of timeshifts would be:
    - Open a chart using a timeshift such the X-axis displays your regional times rather than the broker times.
    - With a single MT4 feed, produce H4 and Daily charts in which the daily 00:00:00 new bar time was shifted by any number of hours, to see the very same candles as are seen on additional broker feeds that have a distinct native broker time (e.g. GMT vs. GMT 2 vs. GMT-17 etc.) You can pick if you would like new Daily candles to happen at London open, NY open, NY close, etc..
    - Produce M45 candles but shift the bar start time as desired, to align using a time such as NY open (8AM ET) or NYSE open (9:30AM ET).
    - Buy a 1minute headstart on a bar close by shing it 0.01. (How? Utilize an M1 chart to generate a higher TF chart timeshifted from 1M)
    - Generate a Daily chart with 5-bars-per-week rather than the common 6-bars-per-week! Example: Imagine your broker time is 00:00:00 exactly the same time as GMT. NewYork is GMT-5 that is 19:00:00. Your broker closes on Friday lt; 17:00:00 NY and reopens on Sunday gt;= 17:00:00 NY. Your Daily chart has. Thus, you can generate an offline xxxxxx 2H,Daily chart which will remove the Sunday bar *! If your broker has just 24*5=120 (or less) bars-per-week, and if you currently have a brief Sunday (or Saturday) Daily bar on your chart, then you can choose a suitable timeshift to eliminate your extra (brief ) Daily bar!
    - Traders who search for candlestick patterns can try unique timeshifts to find out whether a pattern is more (or less) successful for timeshifted vs. standard broker time.

    * As before, one can still add multiple examples of the indior to a single source chart to generate the information for multiple, distinct timeframe-or-timeshifted offline charts.

    * A discreet variety of popup Alerts have been added to notify the user of their offline chart title, and whether there were any issues with generating the desired chart. These happen when you add the indior to the origin chart, or when you restart MT4 using a session that has a chart with this indior attached.

    * A lot of people like to use indiors such as CandleTime.mq4 to display the time remaining for the bar. However, for timeshifted information, a few indiors (such as those ) do not operate unless modified suitably. A new version v1_2 of my P4L CandleTime.mq4 indior was posted that can be used with the timeshifted offline charts. Please get it from the thread: New very trendy CandleTime and session period Clock indiors
    (Note, a new v1_3 (not published yet) will be asked to support charts gt; 1 Month period).

    How to use:
    * Duplicate this indior to C:/Program Files/__your_MT4_broker__/experts/indiors/
    Review the origin together with MetaEditor, Save Compile any adjustments to defaults. Quit and restart MT4.

    * Open a source chart of a lower-timeframe that is a multiple of everything chart that you need to generate. If you'd like a Daily chart with hourly offsets compared to your normal Daily chartyou can open an chart or lower. (Note, you can choose any origin TF but you'll only generate info for just as much information as is on your origin chart. If your M5 has 4 months of information, if you would like to generate Daily charts, you would probably prefer to use H1 as origin as it would probably have several more months/years of information. If you would like to use a timeshift, the value (in minutes) should be an exact multiple of your origin chart interval (in minutes) (e.g. 90min/M30 is lawful but 90min/H1 isn't ).

    * Insert this indior to the origin chart. NOTE: On the frequent tab, you must check the box to permit DLL imports.

    * As desired, change the values for the variables PeriodMultiplier or TimeShiftAdd_in_HptMM (or even TimeShiftAdd_in_Bars), and some other external factor. Example: Open an EURUSD,H1 chart, insert this indior and set PeriodMultipler=24 and a timeshift = -2.0. It will generate the information to get a EURUSD-2H,Daily chart.

    * Next, use the menu command: File Open offline (go down the list to find the exact chart title generated, i.e EURUSD-2H,Daily). Select it and click on Open.

    * FYI, if you would like to output the generated chart data into a CSV file, alter OutputCSVFile from 0 (HST just ) to either 1 (CSV HST) or 2(CSV Just ). The csv file will be output into the folder lt;your_MT4gt;/ / experts/files/ /

    Limitations:
    * If your generated chart has changed the Symbol() title (which comprises all TimeShifted charts! ) ) , you won't be able to use that chart with EA's or alternative indiors that require the original Symbol() title in order to work. Neither will you view live trades displayed on that chart. Why? Your broker just knows about the official Symbol titles (e.g. EURUSD). An EA can set a trade of the Symbol, also MT4 can exhibit the Buy/Sell/SL/TP lines for trades on all charts with the Symbol name. But if you have a TimeShifted chart, the Symbol title may have changed, for example, to EURUSD 7H. Your broker doesn't understand anything about that new Symbol name, so you can't exchange it directly, and MT4 won't exhibit live trades on TimeShifted charts. Assuming you have access to this MQ4 source file, your code can probably be modified to set trades if it understands the initial Symbol() name. File P4L getPeriodSymbolTimeshiftsecLib.mq4 under is supplied for this function, but it is your choice to alter your MQ4 origin code.

    * Because of a MT4 limit, in order to open any offline chart using a bar period of greater than 1 Month (30 days), MT4 must be duped by telling it the period is lt;= 1Month. To inform the user what the true period is, EITHER the symbol name is changed, or the period is changed (FYI, the period is obviously wrong for charts gt; 1 Month; this can be a consequence of the MT4 limits ). For the following discussion, keep in mind that a chartname is emblem,period.

    In gt;= v1.8, variable Over_1MN_alters_Symbol_name Is true by default. This method is a lot easier to determine at a glance what's the actual chart period, but it's less compatible with a few indiors (especially MTF, a.k.a. multi-time-frame) that need the original Symbol() title to be unmodified.

    If Over_1MN_alters_Symbol_name = true:
    An _x# is added to the Symbol title, in which # is the PeriodMultiplier. Case in point:
    EURUSD_x12,Monthly (This is 12 months, i.e. a Annual chart!)
    Due to an MT4 limit of 11-characters for its symbol name, if the user specifies also a timeshift and/or a sizable PeriodMultiplier, the symbol name is hacked in various creative approaches to shorten it so MT4 can manage it. By way of example, a Monthly chart with PeriodMultiplier =12 and TimeShiftAdd_in_bars = 1 could be:
    EURUSD 1Nx12,Monthly (ILLEGAL 12 character name!)
    EU 1N_x12,Monthly (shortened symbol name). (Note 1N is 1 month shift!)

    If Over_1MN_alters_Symbol_name = false:
    rather than altering the Symbol() title, the Period() is altered rather from the formulation Period() - PeriodMultiplier. The Period() in this instance is the *source* chart period, which in common practice when creating charts over 1-month (30 days) will be likely to be either PERIOD_MN1 (43200), or PERIOD_W1 (10080) or even PERIOD_D1(1440). Cases:
    A monthly source chart with PeriodMultiplier=2 will generate: EURUSD,M43198
    A weekly source chart with PeriodMultiplier=5 will generate: EURUSD,M10075

    Note: 4 hour charts are PERIOD_H4(240) but might require a multiplier of at least 180 to exceed 1-month bars. It will work but it will be confusing to try. (FYI, irrespective of timeframe, if Period() - PeriodMultiplier is adverse, an arbitrary value of 101 is used instead).

    Note2: Whatever this setting for Over_1MN_alters_Symbol_name, in the generated chart, the significance of Period() is a lie! If you attempt to utilize indiors that need an accurate value for Period(), it's going to be wrong and your indior origin has to be changed to fix this. If the variable is true, the authentic period is found by decoding the Symbol() title, finding the Number after xray, and multiplying it times the Period() value. If instead the variable is false, the authentic period is found by noting it is slightly less than one of PERIOD_W1, PERIOD_MN1 or even PERIOD_D1, calculating the gap, then multiplying the gap times the PERIOD _ * value. This is complied... sometime in the future, I plan to post a routine to perform this conversion which you can incorporate into your indiors. (UPDATE: See release of P4L getPeriodSymbolTimeshiftsecLib.mq4 below!)

    * As previously, you can't generate a chart that has the same period as an already present normal timeframe: M1, M5, M15, M30, H1, H4, Daily, Weekly, Monthly (and on some brokers like Oanda, M10). But as it exists, there's absolutely no point in doing so. HOWEVER, if you want one of those standard charts but timeshifted by some level.

    * Many indiors are not compatible with those generated charts. Any timeshifted chart informs the user how much the shift is by altering the Symbol() name. In case your origin chart is EURUSD and you timeshift by 15 minutes, then the offline (new) Symbol() title is EURUSD 15M. Many indiors and scripts do not care about what the symbol name is exactly, but some of them perform. (ALL EA's that require transactions DO maintenance, and are not compatible unless altered!) Thus, offline charts may not be compatible with some progr unless they've been properly modified to account for this Symbol() name change (AND also, if needed, account for the fact that the bars are timeshifted relative to the broker time). Also note any indior that's hardcoded the standard timeframe values may need modifiions to work with non-standard timeframes like M10, M45, H2, etc. (UPDATE: Watch release of P4L getPeriodSymbolTimeshiftsecLib.mq4 below!)

    * In MT4 when you open an offline chart, it doesn't utilize your Default chart template (if you have one), however you can just manually load any desired template. (UPDATE: Solved! Save a template then offline charts will open with that default option. A WARNING, however: In your offline saved-template, you MUST check the F8CommonOffline_chart checkbox or else you'll receive blank charts that say Waiting for Update).

    * Version 1.8 created so-called Annual charts, but the starting month was arbitrary (and so somewhat useless). Version 1.9 addressed some of those problems with higher-TF charts.

    Thinking ahead:
    Please note this indior is written for MT4. The new MT5 version (released in 2010) can already generate charts with more or less any time (i.e. M2, M10, M20, M1234, H2, H8, etc.. NOT sure about gt; Monthly(?) ) . I don't have any idea if an ability is already supported by MT5 or not. If you know the solution, please comment. (Thus far, the response was no).

    UPDATES:
    2009-11-13: First release of P4L PeriodCon.mq4 v1.6 (Was downloaded 68 times ).

    2009-12-07: Released v1.7 upgrade of P4L PeriodCon.mq4 (had been downloaded 16 times ).
    Thanks to circlesquare, a method to make charts gt; 1 Month was found. MT4 can be duped by (falsely) marking a chart as Monthly or less even though the information remains gt; 1 Month-per-bar. However, to visually tell the user what's the actual period, the symbol name is altered to add _x# (e.g. EURUSD_x12,Monthly is really a Annual chart! Also added back in the TimeShiftAdd_in_Bars variable which is simpler for timeframes.

    2009-12-10: Released v1.8 upgrade of P4L PeriodCon.mq4 (had been downloaded 1407 times ).
    Added new variable Over_1MN_alters_Symbol_name (true by default). This is actually the more readable format employed in v1.7, but putting it to false will alter the Period() value: Source-Period() - PeriodMultiplier. This later method leaves the Symbol() name unchanged (provided that timeshifts are zero!!) Making generated charts a bit more compatible. (Note, for charts gt; 1-month, the Period() is always a lie -- that was necessary to get around an MT4 limit ).

    2011-03-23: Released v1.9 upgrade of P4L PeriodCon.mq4 (had been downloaded 3828 occasions ).

    Changes:
    * Fixed some of the problems with higher timeframe charts (e.g. per week ) that resulted in the start-of-the-bar to be irregular (i.e. a week should start the start of the week, either Sunday or Monday, not a Thursday for instance ). Some timeframe charts that involve timeshifts might or might not work, because the method to slit the origin bars up and alloe them isn't perfect. This version, however, is far better than v1.8


    2011-04-01: First Release v1_0 of P4L getPeriodSymbolTimeshiftsecLib.mq4

    New:
    * This libary file can be included in your MQ4 indior/script/EA source documents to translate the Symbol() and Period() values as altered by the P4L PeriodCon.mq4 indior. The library routine returns values, symbol, and the period. It's all up to the user to properly incorporate the values.
    * Two use versions are described in the code, possibly to call the routine in a separate library file, or to include the 3 essential routines in your source code.
    * Note: This is brand new code and was tested for a few typically generated charts. It hasn't been tested for each possible chart multiplier/timeshift mix. Report any problems found by submitting to the ribbon.


    2012-10-18: Released v1.11 upgrade of P4L PeriodCon.mq4

    Changes:
    * Variable InvertChart added. If set to True, an chart is output having an I as a prefix to the name. (e.g. iEURUSD,H1)
    * New external factors:
    InvertedOutputMultiplier = 1.0 The inverted prices are InvertedOutputMultiplier/price.
    InvertedOutputDigits = -1, where -1 is Automatic, or so the user can manually set to gt;> 0
    Example: Invert USDJPY to get iUSDJPY (like JPYUSD). Establish InvertedOutputMultiplier=1000.0, and set InvertedOutputDigits=3 (or 4). A price of 79.275 would normally invert to 0.012614 but with those overrides, inverted price will be 12.614
    * Altered the principal preliminary popup message to
    P4L PeriodCon: Do FileOpen_Offline of chart: EURUSD,H12 (offline) (Time shifted 0min) and KEEP this Resource H1 OPEN!

    2014-02-14: Uploaded P4L PeriodCon 509.ex4 (still v1.11)

    Changes: None. (It is the same origin as is posted). It was compiled using build 509, and it appears to be compatible with all the new assembles gt;=600.
    Fyi, the submitted v1.11. Mq4 (source) document isn't compatible with all the new builds. The source file will need code changes for the new build. (I've no plans to do this ). In the event you have to make custom edits, you can use your own (old) backup of 509, or even find the 509 MetaEditor posted everywhere that you can use to edit and then re-compile to make your own. ex4 file.

    2014-02-17: Uploaded sample 509 templates (Construct 600 compatible)

    Changes:
    Two sample templates are offered below. They are identical, except with respect to.
    One supposes use of P4L PeriodCon 509. ex4. The other assumes use of P4L PeriodCon.ex4. (Both based on v1.11).
    I do not care which name you use for the base indior. Your choice.

    Use the Proper template with any H1 chart. It'll generate two offline charts: foundation 7H,H4 and foundation 7H,Daily

    The generated H4 and Daily charts are timeshifted from 7H. Why? These are intended for use with GMT-5 broker feeds (i.e. people who match NewYork U.S. Eastern Time). In case you have such a GMT-5 broker, you can use this template to generate GMT 2 charts. Fyi, GMT 2 Daily charts normally have 5 -Daily-bars-per-week, and 30 -H4-bars-per-week. GMT-5 charts (and most every Other time feed) have 6-Daily-bars-per-week, and 31-H4-bars-per-week. I love to compare the two, since the broker feed impacts, for example, the slopes of trendlines, pitchforks, etc..

    New users: Regardless of your broker GMT ?? , use these templates to get started, simply to show you can generate and start offline charts. Then customize the settings and create your desired template(s) that fit your own needs. If you'd like M10 or H2 charts... then customize. If your broker has a GMT counter, then use a timeshift value to customize as desired.

    Shades:
    The snowy charts are native timeframes, the black ones are generated offline charts. (FYI, it is possible to change the colours of offline charts exactly as with any other chart).
    Notice that the non-standard timeframes generated (M10, M45, H2, H8).
    Notice that the time-shifted Daily charts with 2H and -1H. A Daily chart is involving them. Notice how the new P4L CandleTime.mq4 indior displays different numbers of hours for each Daily chart before the pub closes for each of those charts. The 2H has 17:29:21 remaining, routine has 19:29:21, and -1H has 20:29:21 remaining.

    -----------------------------------------------
    FYI, see also: Collection of progr by
    -----------------------------------------------

    These and other progr I have submitted are *free*, but donations are welcome! PayPal into _at_yahoo_dt_com


    https://forexintuitive.com/attachmen...1219852415.mq4
    https://forexintuitive.com/attachmen...1247275127.mq4
    https://forexintuitive.com/attachmen...3603982864.ex4
    https://forexintuitive.com/attachmen...6881946607.tpl
    https://forexintuitive.com/attachmen...1134254337.tpl

  2. #2
    100964
    Quote Originally Posted by ;
    Edit: I see your point now. For some reason my test was faulty. I think I used my test code on the wrong chart. duh
    Sorry about that.

    It is technically a bug with using timeframes above monthly together with the newer naming scheme.

    ...
    Printing (Symbol());
    Printing (60 tf previous pub open time=,iTime(Symbol(),60,1));
    Printing (240 tf previous bar open time=,iTime(Symbol(),240,1));
    Printing (current tf previous bar open time=,iTime(Symbol(),0,1));
    Yes, Symbol() on a 2-Month chart returns EURUSD_x2, and that's why it won't work on the lower timeframes (60 and 240) which return 0.

    I will see a benefit to leaving the Symbol() title unchanged for the higher timeframes, but you will still be in a position of having to repair your indior code if anything else in it relies upon accuracy from a Period() command, because of these higher timeframe (gt; 1 month) charts, it's likely to lie about the true interval. (e.g. Period() will return 43200 with this chart even though 86400 is the genuine period).

    Do most indiors that use MTF references completely ignore what Period() returns? It all depends upon what's being calculated but it appears to me as if most would need an accurate interval () as well as an accurate Symbol().

    But because of MT4 limitations, a compromise is required (and possibly I made the more difficult choice of changing Symbol() instead of Period()??? Maybe so.)


    My strong solution (not implemented yet), would be to write a process that you use on your indior(s).

    Define top factors before init() and begin ():
    series emblem;
    int period;
    int timeshiftmin;

    In your init() routine, you operate:
    getSymbolPeriodTimeshift( emblem, interval, timeshiftmin); // 3 outputs

    Everywhere else on your app, you replace some Symbol() or NULL reference in the job of Symbol() with emblem (the variable). Also replace any Period() reference with interval.

    The getSymbolPeriodTimeshift process would get for you the genuine symbol name and true period. In most progr long as timeshiftmin = 0, it is possible to make the two substitutions and it'll get the job done. If timeshiftmin is NOT 0, then... the modifiions into account for the timeshiftmin will require more thought the way to alter your own program. Most likely, you would like to use Symbol() (which includes the timeshift) however utilize the interval variable to acquire the genuine period worth.

    Not certain how soon I will write that...


    Do you have examples of indiors that don't rely upon Period() to be accurate but DO rely upon Symbol() to be accurate? If you can share, upload a few examples or provide links. That's the perfect way to ensure compatibility as I make modifications to the P4L PeriodCon.mq4 program.

    Kent

  3. #3
    90691
    Quote Originally Posted by ;
    you'll nonetheless be in a situation of having to fix your indior code if anything in it depends upon precision from a Stage () control, because of these greater interval (gt; 1 month) charts, it's likely to lie about the authentic interval. (e.g. Stage () will return 43200 with this chart even though 86400 is the genuine period).
    That is true with all the latest 1.7 version.

    If you examine this line 588:
    FileWriteInteger(FileHandle, NewPeriodDisplayed, LONG_VALUE);

    I think NewPeriodDisplayed should equivalent PERIOD_MN1 - PeriodMultiplier at that point, but now it's 43200. Consequently, if you can change your code to permit for that, you'll have interval () functioning. Of course it will not reveal the actual 86400 but it would be compatible with time series works.

    I know it works in the version I've uploaded.
    Stage () = PERIOD_MN1 - PeriodMultiplier, that provides the desired effect.

    So change if I am not mistaken should not impact the naming scheme or anything else. It's only a bug fix for Stage ().

    Currently for compatibility, just the Symbol() issue remains and the easiest solution for now is to allow the user the option to turn off or on the naming scheme. When chart is made, they can be notified by the popup .

    Shifting indiors can then be an option if you prefer to have the nicer name of chart, but not a necessity if you don't care about the chart title.

    Seems good?

  4. #4
    90691 recently I saw this in my offline charts various times
    restart MT4 assists
    What shall I do, to avoid this message?

  5. #5
    90691
    Quote Originally Posted by ;
    lately I saw this on my offline charts several times
    restart MT4 helps
    What shall I do, to avoid this message?
    I've seen that message when the generated chart name reported is NOT really the exact same name which MT4 thinks it should be... and in my experience, it can never be opened at the first location.

    Your message suggests that you were able to open the chart at least once, and that it helps to restart MT4, therefore, you ought to be seeing the chart at least some of the time, right?

    In this scenario, I've absolutely no clue what's the situation. Your system is currently running low on memory or CPU cycles and then you get the message. Restarting MT4 would free up some memory (since MT4 grows as you use a session to look at more charts, etc.).

    Maybe you can append specific details: what source chart, what PeriodMultiplier, and also what timeshift used? What broker feed? Pull the Windows Task Manager (cntl-Alt-Delete) and check the memory size of the terminal.exe procedure and CPU% used by the procedure, and how much CPU % is free (System Idle). Give a detailed example...

  6. #6
    90691 The updating problem goes with growth in virtual memory above 2 GB.
    Second picture shows VM prior to the updating problem, first picture shows VM after I shut MT4.
    More info later.
    The problem occurs as well with the older Period_Converter. My computer problem is not associated with a program.

    Switching brokers was without option. Assessing the harddrive was without solution.
    It might be a hardware problem that slows down the system.
    Testing with another PC: same problem.
    Sorry for the annoyance.


  7. #7
    90691Released upgraded v1.8 of P4L PeriodCon.mq4 in Post #1

    This new version has new outside factor Over_1MN_alters_Symbol_name (true by default, very similar to v1.7).

    When creating charts gt; 1-month, the Symbol() name is altered to indie the chart is gt; 1-month having an appended _x#, where # is the PeriodMultiplier. Example:
    EURUSD_x2,Monthly (This is really a 2-month chart)
    EURUSD_x5,Weekly (This is really a 5-week chart)

    If the factor is set to false, then the Symbol() name is unchanged (unless you're ALSO performing a timeshift that should always alter the Symbol() name!) . Instead, the Stage () value is altered as follows:

    generated-Period() = source-Period() - PeriodMultiplier

    Cases:
    EURUSD,M43198 (2 -month chart, where 43198 = PERIOD_MN1 - two )
    EURUSD,M10075 (5-week chart, where 10075 = PERIOD_W1 - 5)

    For easy reference:
    PERIOD_MN1 = 43200 (30 days, in minutes)
    PERIOD_W1 = 10080 (7 times )
    PERIOD_D1 = 1440
    (It isn't anticipated to use some other source-period lt; PERIOD_D1 to generate a chart gt; 1-month; while it could operate, the derived period will likely be extremely confusing, and if negative, driven into an arbitrary value of 101).


    If you're creating a chart gt; 1-month, a popup alert will remind you of this new factor.


    Why this new attribute? Circlesquare has requested this since some indiors need the Symbol() name to be the first name, particularly MTF (multi-time-frame) indiors. But, these very same indiors have to be indicative of an incorrect Period() value in the generated chart, since due to an MT4 limit, this Stage () value has to be forced to become lt;= PERIOD_MN1 (43200). To put it differently, Period() will return a lie, no matter what, for charts gt; 1-month.

    Whatever indiors you use on generated charts must understand how to manage changes to Stage (), Symbol(), and also any timeshift. Those indiors may need modifiions to operate properly which charts.

    I plan to develop a pattern that can convert those complied name adjustments to Symbol() and Stage () for generated charts into their true values, but I'm not Certain when I'll get to it...

    Kent

  8. #8
    You made this item feel complete. The last period converter we would ever want

    Thanks

  9. #9
    Updating problem appears to be solved after conducting a registry cleaner and increasing memory.

  10. #10
    90691Hi really enjoying the indior as a result of your assistance. What I don't seem to be able to do would be get time altered charts functioning.

    I seem to be able to load a H2 chart from the H1 base chart and they both update very well as normal. But when I try to load the following H2 chart shifted by 1 hour to run at the same time as the 2H chart and also the 1H chart I can get 1 of the charts to upgrade in sync with the bottom 1H chart. Quite simply if I am running a 1h chart, a two hour chart and a chart I can make 1 of the 2 hour charts upgrade while another one remains static.

    It's essential to have a seperate 1 hour chart open for every seperate timeshifted chart generated?

    Hope I am making myself clear.

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