New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

TKO scan

Dave Landry has mentioned that, in time, his indicators and scans will be available on StockCharts.
In the meantime, it would be handy to have a scan narrowing down candidates for his favorite pattern, the TKO (Trend Knock Out). I've found one on TC2000, written by Bruce, their chief advisor, but my attempts to write an equivalent in the StockCharts scan language have foundered on getting the "Max" function to count back from successive days.

Here is the TC2000 version - any suggestions would be much appreciated:

A formula for a 20-bar high happening during one of the prior 8-bars with all of the highs since being below this high could be written as:

(H < H1 AND H1 = MAXH20.1) OR (MAXH2 < H2 AND H2 = MAXH20.2) OR (MAXH3 < H3 AND H3 = MAXH20.3) OR (MAXH4 < H4 AND H4 = MAXH20.4) OR (MAXH5 < H5 AND H5 = MAXH20.5) OR (MAXH6 < H6 AND H6 = MAXH20.6) OR (MAXH7 < H7 AND H7 = MAXH20.7) OR (MAXH8 < H8 AND H8 = MAXH20.8)

Best Answer

  • Options
    markdmarkd mod
    Answer ✓
    I think you would start with

    and [8 days ago high = 8 days ago max(20, high)]

    and [8 days ago high > max(7, high)]

    Then adjust the parameters for each of the subsequent days, and wrap it all in an "or" statement.


Sign In or Register to comment.