Skip to content

πŸ”§ Normalize Price (Alias)ΒΆ

Alias method: normalizes price to symbol's digit count. Identical to normalizePrice().

API Information:

  • Sugar method: MT5Sugar.normalizePriceDigits(String symbol, double price)
  • Returns: double - Normalized price
  • Underlying: normalizePrice() - internally calls normalizePrice()

πŸ”½ InputΒΆ

Parameter Type Required Description
symbol String βœ… Symbol name
price double βœ… Price to normalize

⬆️ OutputΒΆ

Returns: double - Normalized price


πŸ”— Usage ExampleΒΆ

double price = sugar.normalizePriceDigits("EURUSD", 1.123456789);
System.out.printf("Normalized: %.5f%n", price); // 1.12346

See alsoΒΆ