How To Use Flex Scan Conditions

A Flex Condition, as the name implies, is a flexible condition that combines multiple criteria. Simply pick a time span in which you want the multiple criteria to occur, and the Flex Condition will filter stocks to those for which the criteria is true. The criteria can be random or required to happen in order. The key is they have to occur within the time span selected. Flex condition can also be combined with other standard conditions within a condition set. They also can be applied in any timeframe and to any WatchList.  Flex conditions can be used in Sorts, Filters, Data Grids, Alerts--anywhere conditions are used. Below is an example of a Flex Condition looking for a "W" shape in Stochastics during a 30-bar period. This article will walk through the steps for creating this sample filter. (Stochastics is only an example, any indicators can be used in Flex Conditions.)

*Gold or Platinum service levels required

Here’s an easy way to think of the difference between conventional and flex conditions:

  • Conventional conditions must pass at specific points in time, making them “rigid”.
  • Flex conditions can pass within a window of time, making them “flexible”. Also, flex conditions can be set to pass in a specific order through this window of time, which we call the “flex period”.

1. Click the EasyScan menu button to begin building the scan

Select New Condition to get a blank condition window

Click Add condition

Select Flex Branch and click Choose Condition. (Note: you can alternatively use the PCF language to write your flex condition branch.)

Type part of the word "Stochastics" in the search field and select Stochastics (indicator) from the list).

2. Build the Flex Condition

The default mode is for the conditions to pass in order (e.g. step 1, 2, 3, 4, etc). Uncheck the tickbox if you do not want them to pass in order.

Select the Flex Period (the timespan in which you want all your criteria to be true). This is done in number of bars so that it can be applied in any timeframe. In this example, we use 30 bars.

Select the Stochastics indicator from the Flex condition field.

In the edit Condition Menu:

  1. Select "Greater than" in the Condition field
  2. Type 80 in the Value Box for Stochastics.

As you are building conditions, you can click the Save button to add the criteria to your Condition library to use again later.

Next, copy and paste (4 times) the Stochastics condition you've just created. Right Click on the Stochastics Condition and choose Copy.

Right click on the Stochastics condition and choose Paste Below (paste 4 times for this example)

You'll now have 4 additional (identical) Stochastics conditions which you can now edit to the following criteria:

  1. Stochastics less than 20
  2. Stochastics between 40 and 60
  3. Stochastics less than 20
  4. Stochastics greater than 60

Your complete Flex Condition will reflect all 5 Stochastics conditions, which must pass in order during the 30-bar Flex period.

IMPORTANT: Do not confuse a flex condition as being a condition set. Remember that a flex condition is ultimately a “single” condition. At first this may not make sense since it is made up of multiple conditions. You can think of these multiple conditions as making up a single “pattern” within a window of time.

Your Flex Condition is ready to use as the Filter. Click Copy to...

Note: The last condition of a flex condition must always be passing on the last bar of the flex period to be true.

3. Run the Filter to see the results

Select from the Apply To menu the way you want to apply the Flex condition:

  1. Window in Current Layout (opens target mode with option to choose any window)
  2. New Filtered WatchList (Opens new window with default WatchList and sorts by condition set)
  3. New Market Gauge (summary of scan results over time)
  4. New Market Indicator (historical scan plot)
  5. New True/False Column in WatchList (sortable T/F column in current active WatchList)
  6. New Data Grid (creates new Data Grid with the condition set as an entry)
  7. Clipboard (copy conditions to computer clipboard for reuse)

In this example, select New Filtered WatchList.

A WatchList is created containing the Filtered results. These will be stocks which reflect the pattern of the Flex Condition in the filter.

In this example, the pattern can be seen in the Stochastics indicator. (Note: Not every chart in the list showed a well-formed W like this example. Some were skewed to the right or left, but each met the series of conditions in order as shown here.)

Within 30 bars:

  1. Greater than 80
  2. Less than 20
  3. Between 40 & 60
  4. Less than 20
  5. Greater than 60

Name and save the Flex Condition to add it to your Condition library to use later.

Note: the condition criteria in this article are only examples. Any indicators, fundamentals, PCFs, etc., within TC2000 can be used in Flex Conditions. 

The conditions and results of the Scan example should not be construed as a recommendation to buy or sell any security. They are presented solely for educational purposes.