Click here for more information

APS Automatic Pattern Search - Program Use FAQ

Click here to get to the main FAQ page

What is the difference between the search, the scan and system tracking functions?

The search function is used to discover price patterns that fulfill the performance criteria specified on a search workspace, including the minimum number of past trades, the minimum percent profitability and the maximum number of consecutive losers. This function is suitable for building trading systems and saving them in System Tracking for signal generation.

The scan function determines if there are patterns formed as of the close of the last trading day that fulfill  the performance criteria specified on the scan workspace. This function is useful especially to equity traders in scanning a universe of securities like the S&P 500, for instance.

System Tracking determines which patterns in a saved trading system generate a signal as of the last day in the data file, on the close or open of next day. In case the close was used as the trade input, system tracking determines the conditions that must be met on the following day's bar to have a signal at the next close.

The main difference between system tracking and the scan function is that patterns may show up during a scan which may not be present in a trading system saved after running a search. Also, the scan uses only the open of next day for trade input.

back to top

How to determine the minimum % profitability to use?

The formula for the minimum profitability P (for a derivation see Michael Harris' book ) is:  P = 100/(1+ Rwl)

where Rwl is the ratio of average winner to average loser and can be approximated by the ratio of profit target to stop loss, for fixed dollar size trades. P is the ratio of winning trades to total trades times 100.

To account for slippage, commissions and other things it is better to use the following adjusted formula: P > 100/(1+ 0.6*Rwl)

(also given in the book)

Example 1: for profit target to stop-loss ratio of 2:1 the minimum P is 33%. The recommended value is: P > 45%
Example 2: for profit target to stop-loss ratio of 1:1 the minimum P is 50%. The recommended value is: P > 62.5%

For a desired profit factor PF value, the above formula becomes:

P = (100xPF)/(PF+Rwl)

One can solve the above formula for the minimum profit factor required as a function of profitability P and ratio of avg. win to avg. loss Rwl:

PF = (P x Rwl) / (100 - P)

Starting with version 4.9 APS includes a Profitability Calculator in the Tools of the main menu. The calculattor can be used to get an estimate of the minimum profitability P to use on a search workspace when an estimate of Rwl is available along with the derired profit factor.

back to top

How to select the proper profit target and stop-loss values?

APS discovers patterns formed by market price action, not some patterns one would like to see formed. Profit targets and stop-loss levels should be set at reasonable levels and outside of the daily or intraday volatility range. If the exits are set too low, then stops are hit very frequently and the program cannot find profitable patterns.  It takes some parameter adjusting to get to the point of identifying patterns successfully. That's exactly the reason the APS program was developed in the first place: to facilitate the search process.

Try setting exits with a ratio of profit target to stop-loss of one. In the same T/S file you may include smaller and higher ratios and notice the results. For example, in the case of T-Bond futures, set the profit target and stop-loss both equal to 1.00 ($1,000 per contract) but also include the sets (1.5 , 1) and (1, 0.5). This is easily done in the same T/S file. In the case of stocks, you may want to try sets like (7%, 7%), (5%, 4%) and (10%, 6%) as examples. When the search completes, select those patterns that better reflect your trading style.

In the case where increments are used instead of percentage, for long positions, a constant number of added to the entry price to determine the profit target exit price and a constant number is subtracted from the entry price to determine the stop-loss exit price.

Case 1: The entries in the T/S file are determined based on a number of ticks:

The formula in this case for the calculation of the correct entries in the T/S file is:  T/S = (number of ticks x tick value) / Full point value

Examples: In the case of bond futures a full point is $1000, the tick value is $31.25 and  for 3 ticks target and stop the formula gives T/S = (3 x 31.25)/1000 = 0.09375. If the stop must be set to 4 ticks then the value to input in the T/S file is: S = (4 x 31.25)/1000 = 0.1250

In the case of the ES minin, a  full point is $50, the tick value is $12.50 and  for 5 ticks target and stop the formula gives T//S = (5 x 12.50)/50 = 1.25.

Case 2: The entries in the T/S are determined based on a fixed dollar amount

The formula in this case is: T/S = (profit or loss)/(full point value)

If in the ES mini case the target/stop is $62.50 then the formula gives:  T/S = 62.5/50 = 1.25. For the bond futures for $250 target and $125 stop the formula gives: T = 250/1000 = 0.25 and S = 125/1000 = 0.125.

The formulas in both cases (1) and  (2) assume that the prices used correspond to the full point values definition, i.e. that an increment of 1.00 in the price corresponds to a full point.
 

back to top

What does the option "Search the last 500 records" mean?

The "Search the ___ past records" field is set to a default value of 500. This means that APS will find patterns having at least one occurrence in the most recent 500 bars in the historical data file. The idea behind this is to avoid patterns that are sort of "inactive" and have not occurred during the set period and also to make the search faster. If, for example, the user wants to find those patterns that meet the search criteria but have also formed during the course of the last 12 months, then the number should be set to a value around 250.  In the case of intraday data, the value of the parameter must be selected based on the intraday time frame (ex. 5-min, 30-min, etc.) and the number of most recent bars in which all patterns found must have at least one trade.

This setting does not affect  the number of price bars, or data file records, used when calculating the performance of patterns. APS uses all the available records in a data file to back-test patterns during a search and determine whether they fulfill the criteria specified on the workspace.

back to top

What is the "Include Patterns with Equal Values" option mean?

The "Include Pattern with Equal values" option when checked  instructs the program to search for patterns having equal parameters in their logic (for example:  High of yesterday = high of today). Checking this option  just increases the potential candidates for patterns. Some traders do not like patterns with equal parameters and we included that as an option.

back to top

What is the best way to filter the search results?

The general idea is based on selecting patterns having high profitability, low consecutive losers and a sufficient number of past trades. Thirty trades is good enough for significance. A good number of patterns can increase the probability of multiple signals on a given day and thus a better indication for the probability of a profitable trade. Multiple entry signals can then be used to adjust stops and targets accordingly and ride the market waves. More information can be found in the program manual under the topic "Tips for advanced users"

back to top

Does APS interface with Tradestation or Metastock?

APS generates EasyLanguage® code for Tradestation and  Metastock formula code. The code can be easily imported into these popular programs using "copy and paste".

back to top

Is APS a neural net program?

APS is not a neural net program. It is more of a "data mining" program based on algorithms and the theory for discovering price patterns developed by Michael Harris, which is described in detailed in his books.

back to top

If everyone uses APS will that affect the pattern performance?

There are so many different markets, so many different patterns and so many different ways traders can approach pattern trading (in terms of profit targets, stop-loss, profitability, risk management, etc.) that makes this question a philosophical one rather than practical. Of course, trading very liquid markets reduces the risk of being part of a hypothetical "herd" using the same system.

back to top

Where can I read about the theory of APS?

The theory of APS is described in chapters 8 and 9 of the book "Short-term Trading with Price Patterns" and in more detail in the book "Stock Trading Techniques Based on Price Patterns", both by Michael Harris. But it should suffice reading the introduction of the manual to understand how APS works, in general. The full manual is also included with the demo. Please keep in mind that although a general description of APS is offered in the book and in the manual, the details of the program are kept proprietary. The algorithms running in the background of APS are very complex and the process not easy to understand unless one is familiar with data mining techniques. But for most users the details are of no interest as long as they get the patterns they are looking for.

back to top

How to forward test patterns in APS?

Forward testing the patterns generated by a search (or even scan) is achieved by using two separate data files, one for the search (or scan) and the other for the forward test. You can run a search using the first file with data from 1995 to 2003, for example. The file can be in the default directory c:\Program Files\APS\Data or in any other directory. Then, you can forward test each pattern in the results by right-clicking mouse to get to the back-test function and changing the directory for the data file to use. The data for the forward  must be in a different directory, for example in c:\Forward Test. The two data file names in the two different directories must be identical. This procedure is valid for both the demo and full version.

back to top

Are the pattern discovered by APS particular to a certain market?

Although with APS you can discover pattern particular to a certain stock or futures contract, it turns out that many of those patterns work for a group of stocks or even future contracts

Are long stock patterns more profitable because of the extended bull market of the late 90's

No, this is a misconception. Long patterns work better because bull markets are fueled by technical trading mostly where bear markets are dominated by fear and mass psychology.

back to top

Are commissions and slippage included in the search for price patterns?

Commissions and slippage are not included since the program deals only with pattern formations and their number of occurrences rather than with equity performance, which is something that depends on many factors some controllable and other totally random.. Also, including commissions and slippage can result in some form of undesirable optimization. If the profit factor is sufficiently high (see the help file section on the Profitability Calculator), the impact of commissions and slippage on profitability is minimal. Note that the price patterns will form whether or not commission or slippage is considered. These parameters have more to do with the equity performance of the patterns rather than with their presence in historical data. APS can generate code for popular trading software like Tradestation, Metastock and Wealth-lab and you can test the performance of the price patterns with commission and slippage added.

back to top

Can I find out from System Tracking results which  pattern generated each signal?

Yes you can when you create one model for each pattern. This requires some additional work to be done but in this way you can see which patterns generates the signals in System Tracking results. With version 4..9 more information was added to System Tracking output to assist in identifying the specific patterns that generate the signals. Specifically, Index and Index Date information was added so that so that  patterns can be identified using the VIEW function. Then the performance of a pattern that has generated a signal can be tested with the help of the Back test option..

back to top

How can I delete a file from the Database?

In order to delete a file from the database (ex. MFST.txt or SP.txt) click Results from the main menu and then Database. Highlight any file in the database list and click OK. Then, click File on the top main menu and then Delete File. Now, highlight the file you want to delete and then click OK.

To delete all files in the database, click File on the top main menu and then Delete All Files.

back to top

After running a search/scan I get the message "No patterns found"

There are several reasons for not getting any patterns:

1. There are no patterns in the specific samples
2. The target/stop levels are unrealistic for the price volatility of the samples
3. No sufficient data (number of records)

Short  trading time frames do  not always give rise to patterns in random samples. As the trading time frame is increased,  more patterns appear in randomly selected data samples.  Furthermore, If there is very low volatility in the given sample no patterns will be found. Since patterns are required to have at least 20 past showings in the given data sample, depending on the target/stop, a lower limit on the number of records in the data file can be estimated. For example, in the case of intraday data if  the target/stop are within the 10-bar volatility range but outside the 5-bar volatility range then for 20 historical trades the theoretical mean  number of records required is about 700. Now given that a specific pattern formation will not appear constantly but it may exhibit a mean frequency N, then at least 700 x N records are required in the data file. Now, N can be as large as 100. In this example, at least 70,000 records are required.

Note that the trade-off comes from trying to lower the target/stop to decrease the requirement for a bigger sample. But this results in more patterns turning unprofitable. As a consequence, it is  suggested using a small profit target and a larger stop in the beginning in order to get a feel of the market. For example, a target/stop ratio of about 3. The resulting minimum required profitability determined by the profitability calculator in Tools menu depends only on the ratio of target/stop and can be found to have an approximate value of 86% in this case. This level of  % min profitability must be used on the search/scan  workspace. After getting some patterns to show up the target/stop levels can be fine tuned by running more searches/scans.

back to top

Are the  patterns found by APS preprogrammed in a database?

There are no hard coded patterns in APS. Instead, APS uses algorithmic "data mining" guided by a set of up to 88 (extended search) predefined general pattern groups. These 88 groups are not exact patterns but correspond to thousands of exact pattern formations. APS does not look for traditional chart patterns but for price patterns. Some of the price patterns the program finds may look similar to traditional chart patterns. All price patterns have up to six price bars in their formation. That does not include the delay bars used in delay patterns. The program finds price patterns dynamically as it goes through a data file of historical prices and they are specific to the data used although it may turn out that some of the patterns work for a group of securities.

back to top

Can APS consider volume or other indicators in the search for patterns?

APS discovers price patterns that fulfill user-defined risk/reward and performance criteria. The patterns do not consider volume information, only the open, high, low and close of price bars. The user can add volume information to the logic of the discovered patterns and test their performance in Tradestation, Metastock or Wealth-lab, as well as, combine the patterns with other indicators and technical analysis methods.

back to top

How to use the code generated by APS in Metactock?

1. Copy and paste the generated formula code (just the formula part) in a new System Tester strategy (Go to Metastock Tools and then System Tester and click New)
2. If this is a long pattern click the Enter Long tab and paste the formula there. If this is a short pattern click the Enter Short tab and paste the formula there. Do not enter anything in the Close Long or Close Short tabs.
3. Click Stops and input you profit target and Max Loss (stop-loss) values. Mark the appropriate Positions box and the box Exit at Stop Price. Also mark the appropriate box indicating whether this is a percent or point stop. Do not forget to keep all other stop tabs (breakeven inactivity, Trailing) unmarked.
4. Click OK and then OK again and then click Options on the main System Tester screen while your strategy is highlighted. Select the Entry Price (open or close). The exit price can be set to High. The delay is 1 in the case of no delay signals.
5. All the necessary values one must input in the strategy Stops and System Tester Option tabs are listed above the formula code generated by APS, such as the profita target and stop-loss values, value of the delay, entry price, etc.

back to top

The trade Exits parameter (inc or %) is different in the results than what I selected

This probably happened because the Exits parameter (inc or %) was marked first and after that an empty search line was selected. The correct way to do it is to first click on an empty search line and then select the parameters parameters. After a search line is created the choice of parameters can be seen in the appropriate column.

back to top

 

Please contact us  with any questions or comments.
© Copyright 2000-2008 Tradingpatterns.com  All rights reserved.
Disclaimer and Privacy policy