Errors, bugs, questions - page 323

 
alexluek:

hmmm... It's back.

probably missing something NormalizeDouble

What does NormalizeDouble have to do with data loss?

Документация по MQL5: Преобразование данных / NormalizeDouble
Документация по MQL5: Преобразование данных / NormalizeDouble
  • www.mql5.com
Преобразование данных / NormalizeDouble - Документация по MQL5
 

Possibly, but it's a fact - I've tried it now - nothing has changed.

HR      0       Prost_Dol-2 (USDCHF,M5) 16:47:53        2011.01.03 18:30:00   1,,,,,,,,,,,Open1[0]=0.93297 Open2[0]=0.9329
IL      0       Prost_Dol-2 (USDCHF,M5) 16:47:53        2011.01.03 18:30:00   1,,,,,,,,,,,ss=6.999999999999999 e-005

As you can see the difference is not the same as in the numbers above, it seems - should I go to servicedesk?

 
alexluek:

Possibly, but it's a fact - I've tried it now - nothing has changed.

As you can see the difference is not the same as the numbers above, I guess - should I go to servicedesk?

6.999999999999999e-005 = 0.00006999999999999999 = 0.00007

all right

read the real numbers as you are advised.

 
AlexSTAL:

6.999999999999999e-005 = 0.00006999999999999999 = 0.00007

all correct

read about real numbers, as you are advised

i.e. in the calculations (in the program) it does not affect the operation of the program!

Got it, thank you!

 
alexluek:

Possibly, but it's a fact - I've tried it now - nothing has changed.

As you can see the difference is not the same as in the numbers above, I guess - should I go to servicedesk?

Once again. Read about the real numbers in the help! Service Desk will not help you here.

It is better to format the output yourself, instead of relying on a pure Print function

Документация по MQL5: Общие функции / PrintFormat
Документация по MQL5: Общие функции / PrintFormat
  • www.mql5.com
Общие функции / PrintFormat - Документация по MQL5
 
alexluek:

Possibly, but it's a fact - I've tried it now - nothing has changed.

As you can see the difference is not the same as in the numbers above, it seems - should you go to servicedesk?

Let's first understand what exactly you think is wrong?

If you have the result in mind.

6.999999999999999 e-005

It is not a mistake. It really is and it is described in the help. This is the reason why 0.93297-0.9329=0.00007 -> 6.999999999999999e-005. You will get the same result if you do

Print(0.00007);

If you want to print the result 0.93297-0.9329=0.00007, use the function DoubleToString.

 
alexvd:

Let's understand first, what exactly do you think is wrong?

If you mean the result

It is not a mistake. It really is and it is described in the help. This is the reason why 0.93297-0.9329=0.00007 -> 6.999999999999999e-005. You will get the same result if you do

If you want to print the result 0.93297-0.9329=0.00007, use the DoubleToString function.

i.e. in the calculations (in the program) it does not affect the operation of the program!

Got it thank you!

 
alexluek:

i.e. in the calculations (in the programme) it does not affect the operation of the programme!

Got it, thanks!

Exactly so
 

Going back to my issue with the tester crash, let me explain more. The standard Moving Average EA does not crash, it works correctly.

However, my EA does not reach the end of its work, the connection is broken:

What actions may lead to a connection failure? What can I do wrong?

It happens not immediately, on a 4-month history only at the end of the 4th month a disconnect occurs, before that the tester works, trades are opened.

 

I didn't clarify this question at the time, and now I'm having doubts.

What's the right way to reserve memory?

like this

ArrayResize(arr,2001,2016);
or like this
ArrayResize(arr,2001,15);

And correct the help, it's very ambiguous.

SZZ in the above variants implies that the size of allocated memory including reservations should be 2016.

Reason: