Using Math in Parameters and Constants

Parameters and constants are text replacements in a formula and can be defined using simple math and numbers that are known.  For more information on parameters and constants please see this article

The following are valid examples:

param #Valid = 52 /// <desc>This is a valid parameter</desc>

#Valid
Click to copy

52 is a known value so it works as a valid parameter

param #Valid = C /// <desc>C is also valid, so are O, H, L and V system functions</desc>
Click to copy

The values O, H, L, C and V are also valid as they are system functions and considered a known value

param #Valid = C-52 /// <desc>Simple math can be used with known values</desc>
Click to copy

Simple mathematical operators can be used with known values, these include +, -, *, /

param #X = C /// <desc></desc>
param #Y = 52 /// <desc></desc>
const #Valid = #X - #Y /// <desc>This is valid because #X and #Y are valid variables and we are using simple math</desc>
Click to copy

In this example the constant is valid because both the #X and #Y parameters are valid and you can perform simple math with valid parameters or constants

The following examples are not valid:

param #X = 52 /// <desc></desc>
param #NotValid = #X \ C /// <desc>Not simple math i.e. +,-,*,/</desc>

Click to copy

In this example parameter #X is valid but parameter #NotValid will not work because integer divide "\" is not considered simple math