Technical Analysis 101: Session 5
Stan Yabroff
Val Alekseyev
Session 5
Creating Conditions Overview
Condition Discovery�
Condition Discovery�
Bearish Price Action
Bullish Price Action
Writing Conditions Using the Formula Toolbox�
Writing Conditions Using the Formula Toolbox�
Using Parameters�
Parameters allow you to better change values in your conditions.
Inserting Parameters into Studies�
Marking Charts with Conditions�
Results of Marking a Chart�
Setting Condition Alerts�
Creating More Complex Conditions�
Examine the chart to see what studies may yield a good buying
or selling opportunity.
Word Condition in English�
Stochastic %K crosses above %D and MACD crosses above MACDA.
Creating a Condition�
Formula:
SSK(@,Per1,Smo,Per2) XABOVE SSD(@,Per1,Smo,Per2,Smo,Per3) AND MACD(@,13.000,26.000) XABOVE MACDA(@,13.000,26.000,9.000)
These two events may not occur on the same exact bar so BarsSince should be used.
BarsSince Function�
Visual Check�
Mark the chart with your condition to see if it meets your criteria.
Set/Reset creates a picture of binary data using two conditions. The first condition is displayed as an up tick on a line graph. The line continues on that level until the second condition is satisfied. The line then returns to its baseline until the first condition occurs again. On a bar graph, the bars change colors to reflect the set and reset conditions.
For example:
SetReset(MACD(@),13,26) XABOVE 0,(MACD(@),13,26-MACDA(@),13,26,9))< (MACD(@),13,26 MACDA(@),13,26,9))[-1]
In this example, on a bar graph, this formula would color bars when MACD crossed above zero and would stop marking the bars when the difference between the MACD and the MACDA trended down.
SetRst Function�
SetRst Function�
View the Results�
IF Statement�
Sample Scenarios�
Advanced Conditions Overview
Creating More Complex Conditions�
Develop your idea by examining a chart and creating sentences.
Word Condition in English�
Buy Side: Stochastic %D goes down and then trends up.�The current close is greater than the previous bar’s close.
Creating a Condition�
These two events may not occur on the same exact bar so you need to evaluate the order they will occur.
Visual Check�
Mark the chart with your condition to see if it meets your criteria.
Using Custom Studies to Troubleshoot Conditions�
Create a custom study that includes a separate curve for each line in the condition.
Add a Custom Study to the Chart�
Create an Opposite Condition�
Create a condition with the opposite side of the trade.
Add a Condition�
Other Examples�
Entry Signal Evaluator Overview
Summary�
The Signal Evaluator can fine-tune entry timing and turn a previously discarded methodology into a profitable one.�
Main functions:
Setting Up the Evaluation�
Evaluation Definitions�
The following terminology is from the Signal Evaluator test:
Evaluation Definitions�
Signal Evaluator Analysis�
The Gen tab:
From the Signal Evaluator window, you will not be able to see which database and time frame have been defined. To check this info, click the Data button.
To better understand the Signal Evaluator results based on the relation of the time frame, commodity, and condition, use a single evaluation (a long entry or a short entry).
Signal Evaluator Analysis�
The Column tab:
Selecting Bar Out in the list will be reflected on the main Signal Evaluator window as a bar
tab. This gives the reference interval of the analysis.
For short-term signals, select the first ten bars. For medium-period signals, select every five bars.
Signal Evaluator Analysis�
The Sum tab:
Select which statistics have to be active.
Signal Evaluator Analysis�
The Commodity list:
View which contracts have been selected. If no contracts have been selected, enter the name of the contract in the Commodity list box.
Signal Evaluator Analysis�
After setting the evaluation parameters, click Start to begin the evaluation. View results in chart or tabular format. The information includes signal analysis that allows you to capture the best bar out to be adopted and the strategy evaluation.
Signal Analysis Definitions�
Specific trade analysis will be displayed below the statistics. Click the data to view the trading results.
Specific trade analysis will be displayed below the statistics. Click the data to view the trading results.
Signal Analysis Definitions�
Draw Down�
To access the Draw Down, select Draw Down from the Sum tab. The chart shows the maximum loss you can have for the specified period.
Accuracy%�
To access Accuracy%, select Accuracy% from the Sum tab. The chart shows the accuracy of trades within a specific trading period. The higher the accuracy, the better the condition for opening a position and closing it after a specific number of bars.
% Remove to Neutral�
To access %Remove to Neutral, select %Remove to Neutral from the Sum tab. The chart details when better profits are most possible, according to this evaluation.
Strategy Evaluation: Profit Curve�
To access the Profit Curve, click the Profit Curve tab. This curve details the historical
behavior and profit of the strategy based on the exit after nineteen bars.
Strategy Evaluation: Distribution�
To access the Distribution chart, click the Distribution tab. This chart shows the number of trades (every blue bar of the histogram), the profit of the trade at the 19th bar (x axis), and the percentage (y axis).
The chart displays a Gaussian curve with the barycenter of the curve in the positive percentage of the axis.
Strategy Evaluation: Summary�
To access the Summary, click the Summary tab or the Sum button. This chart shows the summary of the total profit or loss. The �y axis details what would have been the percentage profit if you had closed the position at a specified bar, displayed on the x axis.
Strategy Evaluation: Charts of Trades�
This chart, reflecting what is also available in the tabular format, shows:
To print the results, right-click the Printer button and select Print Shown entries.
Trade System Optimizer Overview
Summary�
Test results with optimum sets of user-defined parameter values. Trade System Optimizer (TSO) is a module that tests the results of trading systems running different settings and combinations of parameters included in trade signals. All selected parameter combinations are then evaluated. The results of each combination are reported in the TSO window.
TSO allows you to determine which set of user-defined parameter values produced the best result (expressed as the best value for the selected Optimize On statistic). Determine the results on a specific trading system applied to defined historical chart data.
TSO works only with trade systems containing user-defined parameters (parms). These parameters are required to test combinations and return optimal values.
Commonly-Viewed Statistics�
These definitions explain how the TSO results are divided, gauged, and calculated.
Commonly-Viewed Statistics�
Statistics Glossary�
The following is a terminology of profits and losses.
Statistics Glossary�
Opening the TSO�
Optimize the TSO when a trade system is applied. When the trade system is applied to a chart, right-click the trade system and then select Optimize.
Setting Up the TSO�
Specify optimization details and learn the details of a TSO run. When the optimize view is opened from a chart, a new TSO run is created. By default, the run is titled Trade System Optimizer - unknown x, and it is based on information taken from:
The TSO Setup Window:
To specify optimization details,�click the Specify button.
TSO Setup Window�
TSO Setup Window�
Optimizer
Runs
Trade System
Parameters
Statistics
Chart�Information
Data� Information
Trade System Parameters�
The Trade System Parameters window displays all user-defined parameters associated with the selected trade system.
Statistics to be Optimized�
Select a statistic to measure the success of the trade system on the Optimize on drop-down menu.
On the TSO Setup window, the default statistic on the Optimize on drop-down menu is TotalNetProfit.
The Optimize on statistic is always the first statistic column displayed in the summary�result table.
The suggested statistic to choose from the menu is the Profit to Max Draw.
Statistics to be Optimized�
Test parameters based on the following algorithms:
Chart and Data Information�
Select an interval from the chart parameters section of this window. The Bar Range determines the period of time you want to use the trade system and optimize it. Click the Edit button, and then select the number of bars or the period from a specified date to the ending date. When applicable, you can also select all of the sessions.
Chart types:
TSO Results Table Settings�
Customize the display of TSO run results. The Table tab options include:
TSO Results Table Settings�
The Display Chart with drop-down menu options include:
TSO Results Table Settings�
After setting the parameters on the TSO Setup window and the table settings, click the Setup button. The TSO run results are displayed on the main window.
TSO Results Table Settings�
View run results in a chart by double-clicking a cell. The best combination of parameters is shown in the first row. The first row is the current step result, regardless of the table sorting preferences. After the run is completed, the current line is no longer visible. As each step runs, the TSO’s progress is reported on the top section of the window, and rows are added to the table.
To view specific run results in a chart, double-click a cell. The trade system graph at the bottom reflects the values on the results table.
Customize TSO Results�
Order and adjust the parameters and statistic columns. To customize the display by specific columns, right-click the top of one of the columns, and then select Customize Columns….
Customize TSO Results�
Order and adjust the parameters and statistic columns. From the TSO results table, trades can call a chart with optimized parameters to be applied on the active trading system. To set up a trade system with a preferred combination of parameters, right-click a TSO run row and then select Launch Chart with Parameters.
Saving TSO Results�
Save results as a .txt file, or copy them as a clipboard. To save your TSO results, click the Setup button, and then select Save Results to TXT File… or Copy All Grid to Clipboard.
Trading and investment carry a high level of risk, and CQG, Inc. does not make any recommendations for buying or selling any financial instruments. We offer educational information on ways to use our sophisticated CQG trading tools, but it is up to our customers and other readers to make their own trading and investment decisions or to consult with a registered investment advisor.
© 2012 CQG, Inc. All rights reserved worldwide.
CQG®, DOMTrader®, SnapTrader®, TFlow®, TFOBV®, TFOBVO®, TFVOL®, and Data Factory™ are trademarks of CQG, Inc.
Disclaimer�
Val Alekseyev
valekseyev@cqg.com
Stan Yabroff
stan@cqg.com
1 800-525-7082
www.cqg.com