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.
PMO 30 day high/low or other indicator
How can I test to see if the PMO is, say, 5% lower today than it was in the last 30 days, or just lower?
I've written a few scans so far but can't figure out how to do something like this for an indicator like PMO.
I tried this:
and [ppo line (5,5,1)<ppo line (30,30,1)]
but it doesn't seem to return anything. If I try something like this:
and [ppo line (5,5,1)<ppo line (30, close)]
I get a syntax error. Apologies for the basic question. Just not sure how to reference a PPO/PMO/MACD value for a low in a period.
I've written a few scans so far but can't figure out how to do something like this for an indicator like PMO.
I tried this:
and [ppo line (5,5,1)<ppo line (30,30,1)]
but it doesn't seem to return anything. If I try something like this:
and [ppo line (5,5,1)<ppo line (30, close)]
I get a syntax error. Apologies for the basic question. Just not sure how to reference a PPO/PMO/MACD value for a low in a period.
0
Comments
-
I think you have to clarify (to yourself) exactly what your are looking for.
Do you want stocks where today's indicator value is the lowest in 30 days?
In that case, you would want to use the min() function (see the Instructions link for details), where today's indicator = min(30, indicator); so
and [MACD Line(12,26,9) = min(30, MACD Line(12,26,9)]
Or do you want to know if today's indicator value is say, 5% lower than it was 30 days ago?
If so, then today's indicator < 30 days ago indicator * .95 (for five per cent).
and [MACD Line(12,26,9) < min(30, MACD Line(12,26,9) * .95]
If you want both, you would combine the two conditions into one statement.
If you just want to see whether it's lower than a few days ago, then the pattern is
and [indicator < x days ago indicator], so
and [MACD Line(12,26,9] < 10 days ago MACD Line(12,26,9)]
This is a pretty good video on some coding techniques that might give you some ideas:
stockcharts.com/videos/?fv=usvs-ah-writingscans-p2
Check out the other ones, too.
Here's a link to a sample scan page that might help, too:
stockcharts.com/school/doku.php?st=sample+scan&id=chart_school:scan_library:sample_scans0 -
[MACD Line(12,26,9) < min(30, MACD Line(12,26,9) * .95]
This should get me going now that I know how to write it. Thanks again.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