Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 747

 
Fast528:

cool)

the handle is set to Digits????

there's no reason to normalize the handle itself, because it returns 1.

I tried to normalize the array where I copied the data from the handle. it didn't work, it left the same 8 digits

 
Sergey Lobzankin:

Hello, could you please tell me how to make an array of MA handles return normal prices, I mean the way they should, 5 digits after the decimal point and not 8

mt5 language

DoubleToStr in mt5, there is noDoubleToString(); but it doesn't help.

You don't have to (bleep) the whole forum with your single question. You have to be patient and you will get an answer. There are a lot of friendly people here.

 
Sergey Lobzankin:

the handle to Digits????

There's no reason to normalize the handle itself, because it returns 1.

I tried to normalize the array where I copied the data from the handle. it didn't work, the old 8 digits remained

    string ima1_massiv_str0 = DoubleToString (ima1_massiv[0],_Digits);
    string ima1_massiv_str1 = DoubleToString (ima1_massiv[1],_Digits);

It's like this.

 
Alekseu Fedotov:

That's the way it is.

so it turns out that Digist = 8 by default
stupid put 5 and all is well))))
thank you so much)))


 
Sergey Lobzankin:

so it turns out that by default Digist = 8
I just put 5 and everything is fine))))
thank you very much)))

If you need to output a value in Print, or Comment then normalizeDoubleToString. If you don't need to output the value, which is most likely the case, then you don't need to normalize it, it's a costly and useless thing to do.

 
Vitaly Muzichenko:

If you need to output value to Print or Comment then normalizeDoubleToString. If you don't want to output the value, which is probably the case, then you don't need to normalise it, it's a costly and useless thing to do.

I need these numbers for further calculations.
I just put them in the log so I can see what I'm going to calculate with what.

If I didn't display them, I'd get 50 000 pips instead of 50 pips, because 8 signs are 8 signs.
and 5 digits is...

 
Sergey Lobzankin:

I need these numbers to calculate further.
I put them in the log so that I can see what I am going to calculate with what.

if i didn't do it, i would get 50 000 pips instead of 50 pips, because 8 pips is 8
and 5 digits is...

Wrong opinion

 
Vitaly Muzichenko:

Wrong opinion.

maybe I don't know how the process will go all the way through, and because of that I check myself after every operation.
like now, I see that the advisor is correctly aware of how far apart the muwings are

 
Sergey Lobzankin:

maybe I don't know how the process will go all the way through, and because of that I check myself after every operation.
Like now, I see that the EA is correctly aware of how far apart the muvings are from each other

Add up simple dubs in a calculator and you will see. If you normalise each MA, the result will be skewed, but that's half the trouble, the trouble is that you are deliberately underestimating the speed of the program

 
Vitaly Muzichenko:

Add up simple dubs in a calculator and you will see. If you normalise each MA, the result will be skewed, but that's half the trouble, the trouble is that you are deliberately underestimating the speed of the program

I will definitely try to subtract the array from the array without normalizing, but the result, whatever it is, I will still log the result,
I'm not arguing, I'm just sitting on the floor after work and learning how to program, without the institute. There's a terminal and an editor on it, and thank god there are forum users on the site. that's nice))) i don't understand anything... but i have faith that i'll still be able to do something)))