Errors, bugs, questions - page 750

 
On multi-timeframe live chart indicators, the tester of course goes crazy... Everything is tighter and tighter.
 
x100intraday:
On multi-timeframe live chart indicators, the tester of course goes crazy... Everything is tapered.
Can I give you an example? I wonder what it looks like, because nothing is clear from the explanation.
 
tol64:
Can I give you an example? I wonder how it looks like, because from the explanation nothing is clear.

Of course you can. As soon as I finish it, I'll make it freely available... but in the meantime...

The thing is that according to my suspicions the tester has never thought to work flawlessly on all preset timeframes, it adequately tracks only the selected timeframe for testing. But this is just a feeling, I have no idea how it works in reality.

By the way, I will have to spend a lot of time fixing it without a proper run in the tester because I will have to test everything in real time without any speedup.

 

To the developers

I do not understand the ChartIndicatorDelete logic. What is the trick of working with short names?

Add by handle and delete by short name, is it logical?

I guess I should either change the parameter from name to handle, or add a duplicate of the function with handle.

 

To the developers of

Can someone explain why this code works in the terminal without errors, but in the tester with errors?

  if((FirstStart)&&(Handle_JRSX==INVALID_HANDLE))
  {
  Handle_JRSX = iCustom(NULL,PERIOD_D1,"3c_JRSX_H",20,240);
  
    if(Handle_JRSX==INVALID_HANDLE)ChartIndicatorAdd(0,1,Handle_JRSX);
  
  }

In the testerChartIndicatorAdd returns false and error 4014 is displayed.

Atthe same time the visual mode in the tester shows that the indicator is on the chart and is normally rendered.

 
victorg:

Please help me understand!

In the process of my calculations I get numbers whose meaning is not clear to me.

I assign such a number to variable a and print it out:

Result:

But according to the documentation, the type double cannot have powers below -308. Who knows what kind of numbers they are?

It's a dark forest...

I'm trying to powers

     double x,z;
     int y;
     x=-7.56414503782948460000;
     y=MathPow(
     10,         // основание 
     321      // показатель степени
     );
     z=x*y;
     Print("z = ",z);

I get

2012.06.11 09:55:30     dbl (EURUSD,M4) z = 16243877779.83916

but

     double a=-7.56414503782948460000 e-321;
     int b=a;
     Print("b = ",b);

seems right, overflow and

2012.06.11 09:55:30     dbl (EURUSD,M4) b = 0

joining the question.

 

Is there any functionality that allows you to set/change the height of the graph?

If there is no such functionality, I would like to get it.

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков - Документация по MQL5
 
Silent:

Dark forest...

As far as I understood the IEEE 754 standard, the smallest value of positive number for double is about 2.3-10-308. But this value corresponds to normalized numbers, i.e. the numbers which have mantissa at least equal to one. However, there are also non-normalised numbers, numbers whose mantissa value is less than one. For these numbers the smallest positive number for double is approximately 5.0-10-324. Support of non-normalized numbers always raises a lot of questions. It seems that MQL5 supports operations withnon-normalized numbers, although the manual doesn't say anything about it. So the question arises, how should function MathIsValidNumber() react to such numbers?

We can make sure that MQL5 does not consider non-normalized numbers equal to zero

double a=-7.56414503782948460000 e-321;
PrintFormat("a = %.18e",a);
if(a==0.0)Print("a == 0.0");
else Print("a != 0.0");

get

  a != 0.0
  a = -7.564145037829484600 e-321
As foryour example

     double a=-7.56414503782948460000 e-321;
     int b=a;
     Print("b = ",b);

The number a is much smaller than one in absolute value, so the inte ger b is also equal to zero. That's probably correct.

 
Interesting:

To the developers

I do not understand the ChartIndicatorDelete logic. What is the trick of working with short names?

Add by handle and delete by short name, is it logical?

I guess I should either change the parameter from name to handle, or add a duplicate of the function with handle.

All the necessary functionality is already there, see example for IndicatorParameters()
 
Interesting:

Is there any functionality that allows you to set/change the height of the graph?

If there is no such functionality, I would like to get it.

See EA_OBJPROP_CHART_ID
Reason: