Determine 50, 100, 200 etc. prices

 

Hello, 

I want to find prices like 1.25100, 1.14000. prices that is rounded to 100, 1000, 10000, 200, 2000, 20000 etc. How can I do that? Can someone help me? Thanks! 

 

This isn't what I am asking, Please read my question carefully. Thanks!

 
Buba Akhrakhadze:This isn't what I am asking, Please read my question carefully. Thanks!

The links were exactly what you were asking, Please read the provided code carefully.

 
William Roeder:

The links were exactly what you were asking, Please read the provided code carefully.

For sure what I want is different from normalizedouble, because it rounds numbers after decimal. I need for price 1.23812 to show 1.23, with normalizedouble and other normalizing functions the number is 1.24 because it rounds. 

 
Totally irrevalent. NormalizedDouble is irrevalent. Call the appropriate function provided.
Buba Akhrakhadze: I want to find prices like 1.25100, 1.14000. prices that is rounded to 100,
  1. You said “rounded.” I provided three; up, down and rounded.

  2. double market    = Bid;                             // 1.012345 122.012
    double lower100  = MathRoundDown(market, 100*pip);  // 1.01200

    Is 1.012345 rounded down to next 1000 points not equal to 1.012000? Exactly what you asked for.

 
William Roeder:
Totally irrevalent. NormalizedDouble is irrevalent. Call the appropriate function provided.
  1. You said “rounded.” I provided three; up, down and rounded.

  2. Is 1.012345 rounded down to next 1000 points not equal to 1.012000? Exactly what you asked for.

I found best way by multiplying and dividing double to integer that is in your link indicated above, Thanks!

Reason: