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.
scan for a rising channel - is this hard to do?
i would like to create a scan for a rising channel where price is just above the 40 day moving average but not more than 5% above it.
is that possible?
0
Comments
[group is sp500]
and [sma(40,close) > 21 days ago sma(40,close)]
and [close > sma(40,close)]
and [close < sma(40, close)*1.05]
You can alter the 21 days to fit the situations you are looking for.
Is there a way to get that channel?
and [sma(251,close) > 63 days ago sma(251, close)]
and [sma(40, close) > sma(251,close)]
The parameters are just suggestions. Add this code to existing code, right under [group is sp500]. To be absolutely sure of a rising trend, you could sample several look backs of the long sma - maybe 21, 63, 126, etc.
You could also do it with stochastics - again choose a long time frame and test for %K > 70 and %K > maybe 3 months ago or six months ago.
However, the move seems to be advanced. The scan that you suggested picked 6 stocks.....
take HSP, PLL, and RAI respectively......if you notice that the uptrends began in MARCH 2014 ish for all three.
Is there a way to modify youre scan, so that it will give me stocks that have just entered the uptrends rather than already been in them for ages?
Mark
So,
and [sma(63, close) > 10 days ago sma(63,close)]
and [sma(63, close) > 30 days ago sma(63,close)]
You could play with both the length of the sma and the gap for the test period.
Note that not every turn of an sma results in an extended trend.
and [sma(63, close) > 10 days ago sma(63,close)]
and [sma(63, close) < 30 days ago sma(63,close)]