New MetaTrader 4 build 1160 - page 9

 
shoxie:

OK, I've attached an indicator which provides the testcase. I wrote the code long time ago specifically to do a thorough evaluation of the bugs in ObjectGetValueByTime or ObjectGetTimeByValue. (Please excuse the verbosity in the commenting. I was trying to figure out what was going on at the time and make a thorough record of it.)

Here are the instructions for usage:

  1. Attach the indicator in a fresh chart without anything else on it. The indicator will draw a vertical and horizontal line which will represent the time and price values at which values will be calculated for the channel's lines. These lines can be moved about.
  2. Draw a channel on the chart. Rename it "Sample_Channel". MAKE SURE YOU DISABLE THE RAY FEATURE.
  3. Move the channel about the chart so that its lines intersect with the horizontal and vertical lines in various different ways. The indicator will identify the intersection points with markers and arrows on the chart. If no intersection points are shown even though a line intersects the VLine or HLine, this means ObjectGetValueByTime or ObjectGetTimeByValue are returning invalid values.
  4. The values of the intersection points of the channel's second line, as given by ObjectGetValueByTime or ObjectGetTimeByValue, will be printed out in the terminal once every second.
  5. (The code will also work for a trendline named "Sample_Trendline". It will calculate the intersection points on the trendline and identify them with a marker or arrow.)
Refer to the screenshots below.



Nice testcase.

Ok I confirm the problem and I reported it (without any guarantee of the result of course).

By the way he also gives answer when there is no intersection :


 
Alain Verleyen:

Nice testcase.

Ok I confirm the problem and I reported it (without any guarantee of the result of course).

By the way he also gives answer when there is no intersection :


Yeah, I made a note of that in my comments in the code somewhere - even though the Ray feature is turned off, ObjectGetValueByTime acts as if it is turned on and gives an intersection value. As long as the time falls between time1 and time2, it will produce a price value for Line 1 of the channel. It doesn't seem to take account of Line 1's own time range.
 

Hi,

I have noticed two little things in 1160:

chat-overview-umlautstranslation of new title bar buttons

 
signalfollower:

Hi,

I have noticed two little things in 1160:


Last build is 1170, can you please check and confirm it's still not well translated ?
 

Thank you very much!

Both is the same with 1170.

I could not get the new 1170 from my broker and had to open a demo account on metaquotes. Is 1170 final or beta?

 
signalfollower:

Thank you very much!

Both is the same with 1170.

I could not get the new 1170 from my broker and had to open a demo account on metaquotes. Is 1170 final or beta?

Not sure that makes a difference ;-)
 
signalfollower:

Thank you very much!

Both is the same with 1170.

I could not get the new 1170 from my broker and had to open a demo account on metaquotes. Is 1170 final or beta?

It will be final for the moment.

I'm pretty sure that beta updates are not notified here and you do not see

"The update will be available through the Live Update system."

Note that just because Metaquotes give a date for the update, it doesn't mean that your broker will apply that update on the stated release date. I often find that my brokers update the following weekend.

 
Keith Watford:
 

[...] I often find that my brokers update the following weekend.

Thank you very much!

I also think it will be so.

 

After upgrading to MetaEditor build 1961 some code not compile with following error:

'operator=' - expression of 'void' type is illegal    T.mq4    28    10
'operator=' - object required    T.mq4    28    5

Here is sample code that produce this error:

//+------------------------------------------------------------------+
//|                                                            T.mq4 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window

struct  _coordinats_t {
        double          price;
        datetime        time;
};

_coordinats_t   def_coordinats = { 1.0, D'1970.01.01' };

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   
//---
        _coordinats_t   c1, c2;
        c1 = c2 = def_coordinats;  // Error
        c1 = def_coordinats;
        c2 = def_coordinats;

   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+

Error is appeared only when have double = operator, and at next rows when we use only one by row operator = all is just fine. All this at previous version is compiled fine.

 
signalfollower:

Thank you very much!

Both is the same with 1170.

I could not get the new 1170 from my broker and had to open a demo account on metaquotes. Is 1170 final or beta?