Writing Your Own Alert Definitions
TradingSolutions comes with many built-in alert definitions for you to use. However, there may be many situations in which you want to write your own alert definitions. Creating your own alert definitions is simply a matter of entering the conditions to check for, as well as the message to issue when those conditions are true.
Creating a New Alert Definition
![]()
To begin creating a new alert definition, use the Define Alert Definitions button in the toolbar or select Define Alert Definitions… from the Processing menu. Either of these options will display the Define Alert Definitions Dialog, from which you can view existing alert definitions and create new ones. From this dialog, select the New… button beneath the list of systems. This will display the Create an Alert Definition Wizard.
Ä Tip: TradingSolutions uses groups to separate alert definitions and make them easier to find. When creating a new alert definition, try to place it in an appropriate group to make it easier to find later. This can either be an existing group or a new group that you use just for your own alerts.
The Create an Alert Definition Wizard begins with the Basic Information page. This page allows you to enter the name and description of the new alert definition, as well as assign it to a group.
Ä Tip: Try to name your alert definitions something that will help you to remember what they do. Using a name like "Alert when Position Changes" will probably be more useful than a name like "Dan’s First Alert" when you go back to use it.
The next page in this wizard is the Enter Rules page. This is the page where you actually enter the rules for your new alert definition using combinations of function definitions. Rules are the conditions to check to determine when to issue an alert message. This can be a fairly complex process to get used to, but after writing a few alerts or functions, it should become a very intuitive process.
& For help entering formulas in general, see Formula Entry.
After entering the rules, the next page of this wizard is the Enter Message page. This is the page where you enter the message that is displayed when the conditions specified in the rules are true. This message can be defined to include the values being tested.
The final pages of the Create an Alert Definition Wizard are the Verify Inputs page and, optionally, the Enter Notes page. These pages allow you to verify the order and types of inputs that you will specify when you want to use it. In addition, you can specify any notes about using the alert definition at this time.
& For more help creating alert definitions, see the help for the Create an Alert Definition Wizard.
Modifying an Existing Alert Definition
There are two ways to modify an existing alert definition. The easiest way is to actually modify the definition itself. To modify a definition directly, simply select the alert definition you would like to modify on the Define Alert Definitions Dialog and press Edit…. This will display the Modify Alert Definition Dialog, where you can modify the name, rules, message, input order, or descriptions.
Ä Note: Alert definitions that are provided with TradingSolutions are protected from changes. Instead of modifying these directly, you should make a copy and modify the copy.
If you would like to modify an existing alert definition without changing the original, you can create a copy of the definition and modify it to suit your needs. For example, if a provided alert definition uses one type of moving average and you would like to use another type, you can copy the alert definition and replace the type of moving average that is being used.
To copy an alert definition, begin by creating a new one. As described above, this is done from the Define Alert Definitions Dialog by pressing the New… button beneath the list of alert definitions. Then, from the Create an Alert Definition Wizard: Basic Information page, press the Copy another Alert Definition… button. This will display the Copy Alert Definition Dialog, where you can select which definition to copy.
Once you select an alert definition to copy, your new definition will have copies of the rules, message, descriptions, and notes ready for you to modify. Simply continue through the Create an Alert Definition Wizard as you would when creating a new alert definition.
& For more help with messages and alerts, see Working with Messages and Alerts.
& For help distributing your alert definitions, see Sharing Your Functions with Other Users.