|
Navigation: ScanExpert Wizard > Conditions and Alerts > Expression Builder Dialog Expression Builder Dialog |
Top Previous Next |
The Expression Builder dialog is one of two methods that you can use to add conditions (and alerts) to your script. The other method is to use the Add/Edit Conditions dialog. You can use either approach and ultimately they both accomplish the same task. The difference between the two is as follows:
Add/Edit Conditions |
Select the studies to be included in the condition from a list and type the actual condition logic. You are responsible for all formatting. Very complex conditions will need to be created using this method. |
Expression Builder |
Create a condition using a point-and-click approach. Expression Builder takes care of all formatting. This method should be suitable for creating most conditions that you are likely to need. |
You access the Expression Builder dialog by clicking on the Expression Builder button in the Add/Edit Alerts dialog.

Click on the Expression Builder button to launch the Expression Builder dialog
The Expression Builder dialog is comprised of a series of edit boxes and buttons which are used to string together alert conditions based on relational operators.

The Expression Builder dialog
| • | Select Logical Expression Type: A drop-down edit box where you select the relationship to be defined for this particular alert condition. The options are: |
| 1. | ValueA > ValueB |
| 2. | ValueA >= ValueB |
| 3. | ValueA < ValueB |
| 4. | ValueA <= ValueB |
| 5. | ValueA = ValueB |
| • | Select Source for ValueA: A drop-down edit box where you select the study to be used for ValueA in the logical expression type you have selected. All studies defined in your Layout Grid in addition to the standard data points of Open, High, Low, Close, HL/2, HLC/3, OHLC/4, and Volume will be available for selection. |
| • | Select Bar Offset: A spin-edit control where you can select the bar offset to be used for the source assigned to ValueA in the condition. The default value is 0 which means that the current value will be used. Use the spin-edit to select any integer value or just type in any positive integer value. |
| • | Select Source for ValueB: A drop-down edit box where you select the study to be used for ValueB in the logical expression type you have selected. All studies defined in your Layout Grid in addition to the standard data points of Open, High, Low, Close, HL/2, HLC/3, OHLC/4, and Volume will be available for selection. |
| • | Select Bar Offset: A spin-edit control where you can select the bar offset to be used for the source assigned to ValueB in the condition. The default value is 0 which means that the current value will be used. Use the spin-edit to select any integer value or just type in any positive integer value. |
As you complete your selections the condition logic will appear in the edit window.

The condition logic is displayed in the edit window as it is being built
| • | Clear All: Click on the Clear All button to clear all of the conditions in the dialog and start over. |
| • | AND: Click on the AND button to create a new condition that must evaluate to true along with the preceding condition. |
| • | OR: Click on the OR button to create a new condition that will be evaluated in conjunction with the preceding condition. If either condition evaluates to true then the entire condition is satisfied. |
| • | Undo Last: Click on Undo Last to clear just the current level of conditions. So, for example, if you create your first condition, then click on the AND button, and begin creating your second condition you can click on Undo Last to clear just this second condition (the first condition already completed will remain intact. |
Click on the Done button when you have finished and you will be returned to the Add/Edit Conditions dialog where you can (optionally) designate this as an alert condition and type in some alert text.
Click on the Cancel button (or press the ESC key to cancel the operation and return to the Add/Edit Conditions dialog.
See also: