The “Basic Arithmetic (+, -, *, and /)” expression allows you to add, subtract, multiply, or divide two or more numeric expressions together, and includes the ability to use parentheses to ensure that the expressions are added, subtracted, multiplied, or divided in a different order than the standard arithmetic “order of operations”.
For your safety, it is highly advised to use parentheses whenever you are operating on more than two terms in a “Basic Arithmetic (+, -, *, and /)” expression that are being combined with mathematical operators that aren’t either all addition operators or all multiplication operators. This ensures that the order in which the terms are combined together will be exactly what you would expect based on a quick visual inspection of the “Basic Arithmetic (+, -, *, and /)” expression in the Quagensia® Desktop Application’s user interface.
When dividing two numbers together, remember these things:
- On some trading platforms, such as NinjaTrader® 8 and NinjaTrader® Desktop, if both numbers are whole numbers, any decimal portion of the result is truncated. For example, 8 / 5 = 1, not 1.6. This is called “integer division”. On other trading platforms, such as TradeStation® 9.5 and 10, the decimal portion of the division of two whole numbers is maintained, so 8 / 5 = 1.6 in TradeStation® 9.5 and 10.
- On some trading platforms, such as NinjaTrader® 8 and NinjaTrader® Desktop, if either one of the two numbers is a decimal, the result maintains its decimal portion.
- Division by 0 is an invalid operation and will cause an error to occur when you attempt to run your trading strategy in the trading platform.