Questions from Beginners MQL4 MT4 MetaTrader 4 - page 178
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
the task became more difficult... it didn't add up in my head overnight... I guess I'm not Mendeleev, so I can't do complex problems in my sleep )))
how to find the penultimate digit in the whole number!
101 --> 0
267 --> 6
?
Will it work or am I missing something?
Dividethe remainder of division by 100 by 10, rounding to the nearest lower number.
the task became more difficult... it didn't add up in my head overnight... I guess I'm not Mendeleev, so I can't do complex problems in my sleep )))
how to find the penultimate digit in the whole number!
101 --> 0
267 --> 6
?
will it work or am i missing something?
print all digits
The remainder of division by 100 is divided by 10, rounded to the nearest lower one.
I know, but I don't want to leave int, floor() returns double
print all digits
it's logical, i need last but one digit of integer to be guaranteed, i'm working with magik numbers, i need "tens" (last but one digit) to calculate statistics for orders,
I checked my version, there shouldn't be any errors
I have doubts about the type conversion:
we have int x = 119 ---> x % 100 = 19 ---> x /10 = 1 - there should be no errors here
and here int x = 199 ---> x % 100 = 99 ---> x /10 = 9 - I doubt it, I checked it randomly, most likely it will work correctly
Well, if only a second degree is needed, then I think this
Well, if only the second digit is needed, I think so
Yes, probably your version is more reliable than my int y = (x%100 )/10;
letint y = (x/10)%10 be better;
OK. Thanks!
SZY: this would probably be a guaranteed type conversion, int(x/10) %10 ... I don't like working with type conversions in MQL, there were cases when I couldn't correctly guess which type the compiler would convert the result into
Hello. Trying to understand the capabilities of a neural network.
I have read the description of using Fann2mql library.
But all attached sample EAs (NeuroMACD, OlegOlegovFANNv1) do not compile.
Error is the same :
'path' - parameter conversion not allowed NeuroMACD-fixed.mq4 88 29
'path' - parameter conversion not allowed OlegOlegovFANNv1.mq4 148 29
Obviously 'path' is a neural network name in string format.
Then it's not clear why the conversion is prohibited and what for is it anyway?
Judging by the comments to these programs, all of them compile without errors.
How do I contact tech support? Help?
Ask here (or create a new topic)
How do I contact technical support? Help?