Custom f_nDecimals() function returns precision of decimal numbers of the following forms: const, input, simple, and series of the following types: float, integer, and string. Error checking is performed for valid numbers and invalid values return NaN. NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any...
Function - Number of digits before and after the decimal point Detect the number of digits in integers and floats, before the decimal and after it. It also works for negative numbers. There are some rounding issues, but the currently maximum supported number can have safely up to 3 digits after the decimal point.
Function to convert floating numeric price to its *integral* value, ex: 1.2345 --> 12345. integral might not be the right name, so pardon my engrish :p.
Function to return number of digits in a integer up to 10 digits. can be easily altered to support higher numbers if needed.