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.
im not familiar with how to write scans in stockcharts.com and I'm hoping someone could lead me on the right tracks what i would like to do is find stocks that have recently broken out to either a recent new high or a recent new low ...but what I'm looking for are the false breakouts the stocks that start sink back down after making a new high, or stocks that have started going back up in price after making a new low......basically how would i scan for false breakouts both to the upside and to the down side?
0
Answers
So for your scan, what do you think of as a breakout? When you look at a chart, how would you describe it in plain english (we can get to scan language later)? In other words, how would you define it in terms of an overlay or indicator that you've put on a chart? You'll probably find many different kinds of breakouts, but choose just one to start. Once you have that, then we can start writing a scan for the first part.
Best of luck,
Hayden
NOTE: the price channel you want should go straight back to the past high or low that price is now breaking - if too much time goes by, the price channel line will rise or drop so it is no longer at the same level of a past high or low.
@hayden1059 's suggestions are worthwhile also, although I think it's good that you have focused on breakouts. It helps to concentrate on getting one thing down.
But now I realize breakout could also mean a close beyond an MA envelope or as you suggested, a Keltner channel.
Any of those is fine if it fits your needs. For writing the scan, you just have to decide which kind of breakout you want to capture - which overlay do you want to use (Price Channel, Keltner, MA envelope) and what are the parameters you want to plug in. If the default parameters work well enough, we can use those.
2 peaks with the second peak higher then the first at the same time I would like to see macd histogram make a lower high then the previous rally causing a bullish divergence............I would like for the opposite in down trends..i hope that explanation helps
I want to fade the false breakout of the second peak
you were correct about your assumption. I did mean a close beyond a previous top or bottom..ive never used price channels I just use keltner channels with default settings
So the upside breakout scan would be something like
// begin upside breakout scan
// define universe
[group is sp500] // change this to your preference
// Check for flat Upper Price Channel line for the last 10 (or some number) of days
and [ 1 day ago Upper Price Chan(21) = 10 days ago Upper Price Chan(21)]
// today breaks above the Upper Price Channel
and [close > 1 day ago Upper Price Chan(21)]
// end breakout scan
The downside breakout scan would be similar, but you would change Upper to Lower, and ">" to "<".
Put these results in a list and name it.
*****
Now the MACD Hist scan for drop after upside breakout:
// begin MACD Hist drop scan
// to define universe:
// from the "Chart lists" drop down in the Scan Builder section
// of the advanced scan page
// choose your results list from the scan above and insert it.
// It goes to the bottom of the scan window.
// Cut this next line and paste in your list name:
[favorites list is ??] // your list name here
// check for current MACD Hist bar less than prior Hist bar
and [MACD Hist(12,26,9) < 1 day ago MACD Hist(12,26,9)]
// end MACD Hist drop scan
Now you need a second MACD scan for the downside breakouts.
It will be the same as this one, except you will run it against your list for down side breakouts, and change the "<" to ">" (because when the Hist is negative, smaller negative number values of shorter bars are mathematically greater, e.g. -2 is greater than -3).
*****
Note: you can play with any of the parameters or number of days ago to see what happens.
You can remove any line that begins "//" without hurting anything.
Hope that helps.
what if i wanted to change the universe how do i go about doing that lets say i wanted to use the russell2000 ,nasdaq, or wilshire 5000
thanks for your help in advanced
You can also combine several individual groups to cover a larger group. Say you wanted the S&P 1500, just use an "OR" condition with an extra set of brackets to contain the OR's just to this line.
and [ [ group is SP500 ] or [ group is SP400 ] or [ group is SP600 ] ]
Now for exchanges these are listed under Ticker properties, again these are all listed in the documentation, see the link to instructions at the bottom of the scan page or review all the documentation under the ChartSchool tab on the home page.
Exchange: The exchange that each stock trades on - “NYSE”, “NASDAQ”, “OTCMKT”, “OTCBB”, “PINK”, “AMEX”, “TSE”, “VENTURE”, “NSE”, or “LSE”
and [exchange is NASDAQ]
If I'm understanding you, I think you can just take the up side/down side breakout scan above and change the length of the price channel - say from 21 - which is about a month - to 63, which is about a quarter (3 months). Price Channels are a great way to find breakouts. Or, you can choose an arbitrary number for the channel length, like 43 or 78 - or any other number you want and see what happens.
Then you can change the length of time the channel has been flat - from 10 days ago to maybe 45 days ago, or some other number a little shorter than the channel length you choose. Just look at your past examples - add the Price Channel indicator to your chart style. Maybe add several to see how they work (I have 4 - which some people might think is overkill - based on calendar intervals - 10 days (which is two weeks - half a lunar cycle, but we won't get into that), 21 (a month), 63 (a quarter) and 251 (a year). I like them for reversals, usually within a trend (for example, getting near a 10 or 21 day low when the longer trend (moving average) is rising), but they can work for breakouts, too.
Remember, you have total freedom to structure the scan anyway you want to find what works better for you. It's all a matter of experimentation, which you seem to be getting the hang of quite well.