How to separate the last 2 real digits
-
Hello community!
I would love to know how to separate the last 2 real digits of a 5 digit broker.
For example, i got 1.41267 and I want somehow to track the number 26Thanks in advance!
-
This equals to 26
(1.4126100 - MathFloor(1.4126100))*100
Maybe it can be simplified.. I'm not that good in mathematics

I tried to use the % operator, but I gor error in MQL4
-
or you can play with strings, like:
double Price1 = 1.12345; string PrepareX=StringSubstr(DoubleToStr(Price1,4),5,2); double PriceX = StrToDouble(PrepareX); // PriceX value is "34" // beware of probably change position in StringSubstr when pairs are like 96.1234, 10000.1, etc. -
Thank you both for your replies!