Alerts for Backtesting and Explanation of Alerts Prop Window

You can also search for 'back test' on the ensign web site HELP page.

 

Try this as well.

http://www.ensignsoftware.com/tips/tradingtips42.htm

The Study Alert feature is very powerful. This tool can be used to set-up simple and complex Alerts and Trading Systems on a chart. To place a Study Alert on a chart click the Study Alert button on the Drawing Toolbar. The cursor will change to a pencil while placing the alert on the chart. Click the mouse on the chart to place the alert on the chart. The Alert Properties window will then be displayed. Fill-in the Properties window to set-up your custom Alert or Trading System. Click the Delete button in the properties window to remove the Study Alert from the chart. If more than one Study Alert is placed on a chart, click Delete All to remove all of them.

Many check boxes and drop-down list boxes are shown in the Properties window. These are used to specify the Alert colors, sounds, messages, and to specify Conditions that must be met in order to trigger an Alert. The Study Alert will test one or more values, and trigger a Study Alert when the conditions are met.

Panel 'A' and Panel 'B' are used to specify what chart or study values should be tested (to see if an Alert condition exists). The 'Conditions' panel specifies the relationship between the 'A' value and the 'B' value. For example, if the Study Value in Panel 'A' is greater than the Study Value specified in Panel 'B' then a Study Alert will be triggered and the appropriate action or Trade will take place.

Panel A
Panel 'A' is used to specify a Data Point to test for the Study Alert. The available Data selections include Bar Value, Bar Flag, Study Value, Study Flag, Number, Always True, Trade Value, and Trade Flag. The following explains what each of these mean.

Bar Value - The following Bar Values can be selected for the Test
Last High Low Open
(H+L)/2 (H+L+C)/3 (H+L+O+C)/4
Volume Open Interest Time Date
Net Range True Range Color

Acc Dist Chaikin Percent

Bar Flag - The following Bar Flags can be selected for the Test
Higher High Lower Low High High&Low Lower Low&High
Outside Bar Inside Bar Volume Increase OpenInterest Increase
New Date New Time Net Up Net Unchanged
Gap Up Gap Down Gap Open Up Gap Open Down
Key Reversal Color Normal Color Bullish Color Bearish
Color Volume Color Open Interest Color Big Cross
Color Grid Above Daily Open Close above Open

Set Daily High Set Daily Low
Above 60 Minute High – True if High of bar is higher than the High of the first 60 minutes
Below 60 Minute Low – True if Low of bar is lower than the Low of first 60 minutes
Above 30 Minute High – True if High of bar is higher than the High of the first 30 minutes
Below 30 Minute Low – True if Low of bar is lower than the Low of the first 30 minutes
Above 15 Minute High - True if High of bar is higher than the High of the first 15 minutes

Below 15 Minute Low - True if Low of bar is lower than the Low of the first 15 minutes
First 15 Minutes – True if bar is in first 15 minutes of the day's trading
Last 15 Minutes – True if bar is in the last 15 minutes of the day's trading
Lower High
Higher Low

Study Value - Study values that are present on a chart can be tested against other values. Select the Study from the 2nd drop-down list. Select the particular study's value from the 3rd drop-down list. For example, you could select the 'Stochastic' study from the 2nd list, and then select the '%D Value' from the 3rd list.

Study Flag - Studies that are placed on the chart will report a variety of conditions. You can test these conditions to trigger Alerts. Select the Study from the 2nd drop-down list. Select the desired Study Flag from the 3rd drop-down list. For example, you could select 'Stochastic' from the 2nd list, and select '%D Rising' from the 3rd list.

Number - A fixed numeric value can be entered. The Study Alert can be tested against this number. For example, you could enter the number 80 and test to see if the RSI study is greater than 80.

Always True - Panel 'A' can be set to always be True. This allows a portion of the test to never fail.

Trade Value - Several different Trade Values can be tested. Example: Entry Price, Exit Price, etc.

Trade Flag - Several different Trade Flag values can be tested. Example: Position Long, Position Short.

Bar Offset: An optional 'Bar Offset' can be specified in the panel. For example, a 'Bar Offset' value of -1 would specify the selected value for the previous bar. A value of -5 would indicate 5 bars back. Alerts are often setup to test if a value in the current bar (0) is greater or less than the previous bar's value (-1).

Conditions Panel
The 'Conditions' panel is used to specify the Study Alert Test. The 'Condition' specifies a condition that must exist between Panel 'A' and Panel 'B' in order for the Alert to be triggered. For example, to test if the current High Price (in Panel 'A') is greater than or equal to the previous bar's High (in Panel 'B'), check the 1st and 3rd boxes in the 'Conditions' panel. All the chart bars that meet the condition of 'A > B' and 'A = B' will trigger an Alert.

Panel B
Panel 'B' is used to specify the second value to use in the Study Alert test. The possible values are the same as those in Panel 'A' documented above.
Marker
The 'Marker' panel is used to place an optional marker on the chart to mark where Alert Conditions have occurred. The 'Location' and 'Position' of the marker can be selected from the drop-down lists. Place a check in the 'Show' boxes if you want to plot the Marker when the condition is True or False. Click the square color boxes to select the Marker colors.


The 'Location' of the Markers can be directly on the Chart or in a study sub-window:

Chart - Draw the markers directly on the chart.
1 - 8 - Draw the markers in study sub-windows 1 through 8.
Volume - Draw the markers in the Volume sub-window.

The 'Position' of the Marker on the Chart can be one of the following:

Last - The marker will be located at the Last price of each bar
Above High 1 - The marker will be located Above the High of each bar
Below Low 1 - The marker will be located Below the Low of each bar
High or Low - The marker will be Above the High or Below the Low (based on study)
Open - The marker will be located at the Open price of each bar
MidPoint - The marker will be located at the Midpoint of each bar = (H+L)/2
Top Row 1 - The marker will be located on the top row of the chart screen

Top Row 2 - The marker will be located on the 2nd row of the chart screen
Top Row 3 - The marker will be located on the 3rd row of the chart screen
Top Row 4 - The marker will be located on the 4th row of the chart screen
Bottom Row 1 - The marker will be located on the 1st bottom row of the chart screen
Bottom Row 2 - The marker will be located on the 2nd bottom row
Bottom Row 3 - The marker will be located on the 3rd bottom row
Bottom Row 4 - The marker will be located on the 4th bottom row

Above High 2 - The marker will be located Above the High of each bar (slightly higher than 1)
Above High 3 - The marker will be located Above the High of each bar (slightly higher than 2)
Above High 4 - The marker will be located Above the High of each bar (slightly higher than 3)
Below Low 2 - The marker will be located Below the Low of each bar (slightly lower than 1)
Below Low 3 - The marker will be located Below the Low of each bar (slightly lower than 2)
Below Low 4 - The marker will be located Below the Low of each bar (slightly lower than 3)

'A' Value - The marker will be located at the price of A.
'B' Value - The marker will be located at the price of B.
'A' Number - The marker will be located at the 'A' Number.
'B' Number - The marker will be located at the 'B' Number.


Message
The 'Message' panel allows you to display an optional Message on the chart when an Alert is triggered. Place a check mark in the 'Show' box to activate alert messages. The Alert message can be automatically removed by placing a check the 'Auto Remove' box. The message will be auto removed when the alert condition is no longer true. Enter a text message in the entry box (no longer than 36 characters). The alert message will be printed on the top row of the chart. The color of the Alert text and background panel can be changed by clicking on the square color boxes. Alert Messages can be manually removed from the chart by clicking on the 'X' at the left edge of the message panel.

Sound
The 'Sound' panel is used to specify sounds when an alert occurs. Select either 'Silent', ' Beep', 'WAV', or 'Copy to Clipboard'. If 'WAV' is selected, then the indicated Windows .WAV file will be played when the alert condition triggers. Use the Browse button if necessary to locate a .WAV file on the computer. Note: The maximum length for the .WAV path and filename is 36 characters. If 'Copy to Clipboard' is select, then the text in the 'Message' box will be pasted to the windows clipboard. This feature can be used in conjunction with 'Speakonia' (or other Speech software) so that your alert Message text will be spoken by the computer when the Clipboard is changed.

Trading System
The 'Trading System' panel is used to specify trading system actions when an alert is triggered. The trades will be logged and can be viewed. Select the trade 'Action' that each condition should trigger. Multiple Study Alerts may be necessary to enter and exit positions.

None - No Trades will be logged
Stop and Reverse - Trades will reverse position on each trade
Exit any Position - Any current Position will be exited
Exit Long Position - If Long, then the Position will be exited

Exit Short Position - If Short, then the Position will be exited
Buy - Will buy a new Position Long
Buy Reverse Long - Will reverse to a Long Position
Buy if Out - Will buy if current Position is Out (flat)
Buy if Long - Will buy a new Long if already Long
Buy if Short - Will buy if already Short
Sell - Will Sell a new Position
Sell Reverse Short - Will reverse to a Short Position
Sell if Out - Will sell if current Position is Out
Sell if Long - Will sell if current Position is Long

Sell if Short - Will sell a new Short if already Short
Do Not Trade Now - Causes all Trading to Stop

Specify the 'Price' to use for the trade value. Select the 'Quantity' of shares or contracts for each trade. Enter a 'Commission' value for each round turn trade. To view the trade results, select Charts | Trade Detail from the menu.

Check the 'Close Only' box to specify that the 'Test' for the alert condition will only occur at the completion of a bar. The condition will not be tested until the bar has completed its time frame and moved to the next bar. Uncheck the box to test for the condition on every tick. Check the 'Use as Default' button to specify that all Study Alerts use the current settings as the default.

Tabs

There are 15 Tabs at the bottom of the Properties window. These Tabs allow you to save 15 different settings. Click a Tab to load a previously saved setting. To copy a Tab setting to a different Tab, display the Tab setting that you want to copy, then click the Copy Tab button. Then click the Tab that you want to copy to. This will copy the original Tab to the new Tab.

Trade Alert Example
Stochastics Crossing: The following example demonstrates how to trigger a Trade and Alert each time the 'Stochastics' study lines cross. First open a chart and place a 'Stochastics' study on the chart. Next, place the Study Alert on the chart using the Drawing Toolbar. The Properties window will appear.

Set Panel 'A' to the following: 1) Select Data = Study Value, 2) Study Value = STO, 3) bottom box = %K Value, 4) Bar Offset = 0. Set the 'Conditions' panel by checking the 4th and 5th boxes. This will trigger an alert each time the Stochastic lines cross in either direction. Set Panel 'B" to the following: 1) Select Data = Study Value, 2) Study Value = STO, 3) bottom box = %D Value, 4) Bar Offset = 0. Set the 'Location' to 'Chart'. Set the 'Position' to 'Above High 1'. Enter the 'Message' text as "Stochastics Crossing". Set the 'Trading System' panel to the following: 1) Action = Stop and Reverse, 2) Price = Last, 3) Quantity = 1. Enter a .WAV file name in the 'Alert Sound' panel to hear an alert sound when the trigger occurs. Click OK. Select Charts | Trade Detail from the Ensign menu to view the detail of each trade.