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

 
Artyom Trishkin:

How about a styliser? Ctrl+, (comma in English)

I'm not picking on you. It's just that you're the one who needs help, so it's up to you to give the information in a handy form, not a dump.

You won't believe it, before your comment I didn't know about automatic styling. Thank you. Everything OK with the message now?

 

Hello

Why is it that if I save a new profile in the terminal, it is not reflected in profiles inProgram Files(86) and vice versa?

 
Janer:

Hello

Why is it that if I save a new profile in the terminal, it is not reflected in profiles inProgram Files(86) and vice versa?

Try "save as" and see the path...

 
Alexey Viktorov:

Try "save as" and see the path...

If I make a new profile in the terminal, the only thing there is "Save As".

I go to profiles in ProgramFiles(86) and it is not there

And if I move profile from archive or other terminal toprofiles in ProgramFiles(86), it is not in profiles in the terminal

What do you mean by path?

 
Janer:

If I make a new profile in the terminal, the only thing there is "Save As".

I go to profiles in ProgramFiles(86) and it is not there

And if I move profile from archive or other terminal toprofiles in ProgramFiles(86), it is not in profiles in the terminal

What does it mean to check the path?

In the terminal: File --> Open data directory. Everything should be in the Profiles folder there.

 
Artyom Trishkin:

In the terminal: File --> Open data directory. There in the Profiles folder should be everything.

The point is that if you reinstall your windows system, all the profiles

and anyway these profiles are not inprofiles in ProgramFiles and that's why the archive can't be created for the next reinstallation

I thought it was like this only in Wind10but in the newW7too Uncomfortable

 

I wrote the indicator, ran it - it doesn't work

Started to check the code - everything seems fine

Started to alerts one by one and I don't understand why there is such an error


Here's the code

float j = Low[2] - Low[1]; Alert("float j = "+j);
double k = Low[2] - Low[1]; Alert("double k = "+k);


And here are the displayed values


But at the same time not all candlesticks have the wrong value of double type. I also checked it during subtraction only. If I put plus sign between first and second Low[] then everything works fine


MQL5

 
Alexandr Sokolov:

I wrote the indicator, ran it - it doesn't work

Started to check the code - everything seems fine

Started to alerts one by one and I don't understand why there is such an error


Here's the code


And here are the displayed values


But at the same time not all candlesticks have the wrong value of double type. I also checked it during subtraction only. If I put plus sign between first and second Low[] then everything works fine


MQL5

Why do you think the double value is wrong?
 
Artyom Trishkin:
And why do you think that the double value is wrong?

because the return must be fractional, because for calculations this is important


double is for fractions, and how can subtracting one value from another, assuming both are less than 1, result in a value greater than 1?

 
Alexandr Sokolov:

I wrote the indicator, ran it - it doesn't work

Started to check the code - everything seems fine

Started to alerter everything one by one and I don't understand why there is such an error

Both values are correct.

In the double version, because of the low value (fifth decimal place), the default representation is in scientific form with e-005.

If you want formatted output, use DoubleToString.