Rounding numbers in MT4 via NormalizeDouble - page 7

 
No code?
 
Vasyl Nosal:
No code?
Which one?
 

Dmitry Fedoseev:
Какого?

extern ushort Characters_delete = 1;

///////////////////////////////////////////
string data=DoubleToString(Bid,Digits); 
string resoult=StringSubstr(data,0,StringLen(data)-Characters_delete);

 
Vasyl Nosal:
There... great!
 

It's much simpler again.

You have to subtract half of the required digit, then normalise:

NormalizeDouble(1.15-0.05,1);
 
Event:

It's much simpler again.

You have to subtract half of the required digit, then normalise:

How do you know the digit?

how do you know the length of the string?:))))))))))))))))))))))))))))

 
Event:

It's much simpler again.

You have to subtract half of the required digit, then normalise:

Well, that's wrong.

Subtract, normalise to two digits, then normalise to one.

 
Vasyl Nosal:

How do I know the digit?

need to know the length of the string?:))))))))))))))))))))))))))))

What string? There is no string, and when a number is converted to a string, the size is set independently. You are like a kitten trying to catch your tail.
 
Dmitry Fedoseev:
What kind of stock? There is no string, and when a number is converted to a string, the size is set independently. You are like a kitten trying to catch your tail.

:))))

This is a Q&A with the last speaker.

 
Vasyl Nosal:

How do I know the digit?

how do I know the length of the string?:))))))))))))))))))))))))))))

Which one do you need?

what do you need to know the length ofthe string? - are you sure you have the right branches?