The Condition Builder is a very powerful feature that allows you to define complex conditions for your automated trading systems without having to know how to program. Most if not all automated trading system code wizards are limited in scope in that they provide canned pre-defined expressions and only allow you to change a few parameters on those expressions. The NinjaTrader Condition Builder is advanced in that you can develop powerful expressions without limitations. Due to it's power and flexibility, it is extremely important that you read through and understand it's capabilities.
The Condition Builder is also a very powerful aid for those of you learning NinjaScript or learning how to program. You can build your conditions within the Condition Builder and instantly see NinjaScript code generated by having the NinjaScript Editor open (pressing the "View Code..." button in the wizard screen). You can also use the Condition Builder from within the NinjaScript Editor directly. By doing so, NinjaScript code is automatically generated and inserted into your code.
The Condition Builder can be accessed via the "Conditions and Actions" wizard screen or the right mouse button click menu of the NinjaScript Editor.
Basic Operation
The general concept of the Condition Builder to generate a Boolean expression also known as comparison expressions or conditional expressions. What does that mean? It is simply an expression that results in a value of either TRUE or FALSE. For example, the expression
2 < 7 (2 is less than 7)
is a Boolean expression because the result is TRUE. All expressions that contain relational operators are Boolean. Boolean expressions or "Conditions" as they are known in NinjaTrader is used to determine when to take a specified action such as submitting an order or drawing on the chart.
Looking at the image below, you can instantly see that the Condition Builder is set up like a Boolean expression. Select an item from the left window, select the relational operator (2) and compare it to a selected item in the right window.
1. Available items such as indicators, price data, etc. to use for the comparison
2. List of relational operators
