Convert to Number

The Convert to Number rule converts various numeric field types into standard decimal numbers. This ensures compatibility when connecting outputs from specialised rules (such as currency amounts, pip values, or quantities) to rules that expect plain numeric inputs.

How It Works

Different rules in Arconomy work with specialised numeric formats such as currency amounts, pip values, quote prices, and quantities. These formats carry additional context about their units and precision. The Convert to Number rule strips away this specialised formatting and outputs a plain decimal number that can be used in arithmetic operations, comparisons, or any rule that accepts a generic numeric input.

This conversion is lossless in terms of numeric precision. The resulting decimal number retains the full precision of the original value. Use this rule whenever you need to bridge between a specialised output and a generic numeric input, such as feeding a currency amount into a Simple Calculator expression or comparing a pip value against a plain threshold.

Inputs

Input Type Required Description
Value Number Yes The numeric value to convert. Accepts currency amounts, pip values, quote prices, quantities, or any other numeric output from the canvas.

Outputs

Output Type Description
Decimal Number Number The converted plain decimal number, stripped of any specialised formatting or unit context.

Tips

Use Convert to Number as a bridge between specialised and generic rules. For example, if you need to perform custom arithmetic on a currency amount using the Simple Calculator, first pass it through Convert to Number to obtain a plain decimal, perform your calculation, and then use Convert to Currency to format the result back into a currency amount. This keeps your data pipeline clean and avoids compatibility issues between different value formats.

Was this helpful? Let us know