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.
Scanning for an event
Answers
-
It depends what you are looking for.
If you are looking for a crossover of some kind - an indicator crossing zero, or indicator line crossing another, or a short average crossing a longer average - then you would either write a long scan, testing one value against another for each of the ten days and run the scan once, e.g.
and
[
[sma(5, close) x sma(20, close)]
or [1 day ago sma(5, close) x 1 day ago sma(20, close)]
or [2 days ago ... etc.
]
OR, you could write the scan for today only, and run the scan ten times, using the offset tool (the calendar drop down that appears when you click on the white box at Starting ... days ago.. to set the date back one day each time.
If you are looking for a maximum or minimum value over the last 10 days, then you would use the max or min functions, e.g. [max(10, close) > 23].
0 -
I'd probably use the search on the forum.
"in the last ten days" in the Search pulls up several previous discussions.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