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.
Modifying Crossover scan
I would like to modify the SC predefined scan to show results for any crossovers within the last 10 days instead of one day. The predefined scan is:
[type = stock] AND [Daily SMA(20,Daily Volume) > 40000] AND [Daily SMA(50,Daily Close) > Daily SMA(200,Daily Close)] AND [Yesterday's Daily SMA(50,Daily Close) <= Yesterday's Daily SMA(200,Daily Close)]
Any ideas or suggestions?
Thanks,
Phil
[type = stock] AND [Daily SMA(20,Daily Volume) > 40000] AND [Daily SMA(50,Daily Close) > Daily SMA(200,Daily Close)] AND [Yesterday's Daily SMA(50,Daily Close) <= Yesterday's Daily SMA(200,Daily Close)]
Any ideas or suggestions?
Thanks,
Phil
0
Answers
-
The end condition you want - today - is sma50 < sma200.
If there was a crossover sometime in the past, then that condition was not true some time in the past. Then, the true condition must have been sma50 > sma200. The scan above says that was yesterday.
In your case, you want the crossover to have happened not just yesterday, but any day less than ten days ago. So you need to write a line that specifies the condition that is not true today (50>200) was true 10 days ago, so it would be (you add the proper syntax) 10 days ago sma50 > 10 days ago sma200.
Hope that helps. If you get stuck, post what you have.0
Categories
- All Categories
- 2.3K StockCharts
- 395 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 73 Data Issues
- 177 Other StockCharts Questions
- 218 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 42 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 163 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 5 Off-Topic
- 6 The Cogitation & Rumination Emporium
- Forum Test Area