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.

Breakout From A Base

I would very much appreciate assistance with the criteria for a scan. I am attempting tofind stocks that are breaking out from a long-term base, I need to screen for stocks that have started to trend and are making hew highs. Here is the formula that I developed, but it fails the syntax screen:

[type = stock] AND [crossover of 14 day ADX above 20 within the last 5 trading days] and [Percentage of Price High: 3 months(63 days) (min. 100%)] and [Filter where 2 day moving average of volume is not less than 5000 shares]

Any assistance would be appreciated. Thank you.

Comments

  • It would help you a lot if you used the Scan Builder drop downs on the advanced scan page.

    When you select an item from the drop downs, it is in correct grammatical form. Often you will have to edit the suggested values, but the form will be correct.

    You will have to be somewhat flexible in how you think of the conditions you are looking for. It's sort of like trying to explain an idea to someone, you might have to think of several different ways to say the same thing.

    So, for your first condition,

    AND [crossover of 14 day ADX above 20 within the last 5 trading days]

    ADX is available in the Technical Indicator drop down.

    To get a crossover, you would state the condition today (and ADX greater than 20) and then state the condition 5 days ago (and 5 days ago ADX less than 20)

    For the second condition

    and [Percentage of Price High: 3 months(63 days) (min. 100%)]

    I don't know what this is looking for. Maybe you can put it another way. It looks like you want to compare two prices - price today to price some time ago. To compare prices, one side of the condition is the current value, then the other side of the condition is the previous value, and then the comparison operator (>, <, =) states what their relationship is. Let's say I want to know if today's close is at least 50 per cent more than price ten days ago:

    close > 10 days ago close * 1.5

    Third condition

    [Filter where 2 day moving average of volume is not less than 5000 shares]

    Again, you can use the drop down. Condition statements are just comparisons of two values, just like basic arithmetic. You don't need to say "Filter", because that's what the scan does anyway. Just list a series of comparisons that you want to be true.

    Use the Technical Indicator again to get "SMA" and edit for your values.
  • Mark,

    Thank you for your attempt to help. When you ask "I don't know what this is looking for?" I am attempting to find stocks that are breaking out from a long-term base, I need to screen for stocks that have started to trend and are making hew highs. Basically I am trying to identify stocks that are breaking out from a long base.

    Thank you again for your help.

  • markdmarkd mod
    edited July 2016
    Well, you have to define "long term base" more specifically, in terms the scan engine can understand, which means, in terms of indicators or overlays or prices.

    So, you need to find some chart examples of "long term base", and then think of ways to describe those channels to the scan engine. All the possibilities are in the Scan Builder drop downs under Technical Indicators.

    You could redraw those charts with some of those various indicators (maybe changing the default parameters) to see if there is a behavior that is common to the different examples. Price channels of different lengths might work. Or maybe you could describe a maximum difference between the maximum high and the minimum low over some period of time. Maybe the maximum high is not more than 1.2 times the minimum low. Or, you could use a combination - the MA is higher than it was, say 20 days ago but lower than 60 days ago - in other words, the MA is turning up, and then also scan for a channel breakout - the close is greater than 1 day ago Upper Price Chan(63) for example.

    It's very hard to write a scan that will capture chart behaviors that develop over extended periods of time. The scan engine language can't allow for the random differences in price behavior that the eye knows to adjust for.

    Instead of trying to write one perfect scan, you might write one scan to catch stocks trading in a narrow range, put them in a list, then day to day scan that list with a breakout scan.

    You could also consider using the Candleglance view. If you are interested in certain industries, put those stocks in a list (upload them by industry on the Create a list page), create a Candleglance style, maybe 1 year weekly, and look for the pattern you want that way. It might actually be easier than scanning.
  • Thank you for your suggestions. I will work on it!
Sign In or Register to comment.