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.
Syntax correct ?
I would like to set an alert for the etf "SPY" when the price is above the 200 day MA and the 200 day MA has crossed the 250 day MA. Is my syntax correct?
[symbol ='SPY'] and [close > sma(200)] and [sma(200) x sma(250)]
Thanks
[symbol ='SPY'] and [close > sma(200)] and [sma(200) x sma(250)]
Thanks
0
Best Answer
-
in both the Advanced Alert and Advanced Scan Workbenches there is a button at the bottom of the input box that reads Check Syntax. Click on that button and it will tell you whether or not the syntax is correct.
In this case it reads
so the syntax is correct.0
Answers
-
Thank you very much0
-
Keep in mind that a syntax check is not the same as a logic check. For instance, this is syntactically correct
and [close > sma(10,close)]
and [close < sma(10,close)]
but logically not possible.
This is an obvious example, but if your scan gets complicated, you may not realize that you could be asking for something that isn't logically possible. Getting zero results could be a clue (although valid scans can get zero results, too, especially if you have a lot of conditions).
No such problems with this alert.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