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.
Check for the Market Trend
Best Answer
-
I am pretty sure you have to use a separate scan to determine if SPY meets your condition (or look at the chart).
The scan would be:
[symbol is 'SPY']
and [close > sma(20, close)]
The reason is, the scan engine returns a symbol only if it meets ALL conditions in the scan. Only SPY meets the condition [symbol is 'SPY'], so only SPY will be returned.
But, you *might* be able to test for the opposite condition for SPY, using an 'or' statement, like this.
// these lines should execute when SPY is below its SMA and return only symbol SPY
// the favorites list code (second part of the 'or' condition') should not return anything (I think)
[
[symbol is 'SPY']
and [close < sma(20, close)]
]
or
// these lines should execute when SPY > MA 20
[
[ favorites list is ??] // your list
and [ some condition]
and [ some condition]
]
Make sure you include ALL the brackets. Sorry I don't have the time to test to be sure this will work. You have to find a day when SPY is below its MA 20, and list conditions are true.0
Answers
-
Thanks markd0
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