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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good evening,
Somewhere I came across an article where all the code for a "test" EA was written/deciphered. I forgot to save it and I can't find it. Maybe someone knows, has seen this article?
Virtually every article has a test EA code in it. How can anyone know what you are asking about?
Afternoon!
Is it possible for an EA for MT4 to work with prices with 5 decimal places? If yes, how should I do it? I am working via Forex Club.
The Digits function return "5", but the Bid price returns "1.1094" instead of "1.10943", i.e. without the 5th sign.
Also, the Point function outputs a value of 0 instead of 0.00001. Why does this happen and how do I get the correct value?How can I get the full price to work with the 5th decimal place?
Of course you can. By default.
No code, no answer.
How do I take a single digit out of a number? Let's say there is a number 1.2568. How do I take the last digit "8"? I can use DoubleToStr() to convert it to a string and then StringSubstr() to get the last number and convert it to int. Any other options?
There are always other options.
If it is a normalised value, it must be multiplied, in this case by 10000 or divided by 0.0001 to get the integer 12568 and takethe remainder of the division by 10.
12568%10=8
There are always other options.
If it is a normalised value, it must be multiplied, in this case by 10000 or divided by 0.0001 to get the integer 12568 and take the remainder of the division by 10.
12568%10=8
Great option! Thank you, Victor!
When I was younger my name was Alexey. But I like Victor too:)))
Of course you can. By default.
No code, no answer.
When I was younger my name was Alexey. But I like Victor too :)))
Oops, something's gone wrong ))))
Sorry, Alexei)))
The DoubleToString() function is used to print out real numbers
The DoubleToString() function is used to print real numbers