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.
Ave Day Range
Comments
-
This doesn't work because the sma( ) function does not do custom calculations inside the parentheses - in your example "range/close"
[SMA(20, [Range/Close])]
So I don't think you can do it exactly the way you want, unless you can find and indicator that already does that calculation.
But you could try these alternatives (which you might have tried already) to approximate what you want:
// the average range over 20 days is greater than 5 % of today's close
and [sma(20, range) > close * .05]
Or,
//the average range is more than 5% of the average close
and [ [sma(20, range) / sma(20, close)] > .05]
Or, if you want the range to exceed 5% of the close for each of the past 20 days you would have to inspect each day, so
and [ [high-low]/close > .05]
and [ [1 day ago high - 1 day ago low] / 1 day ago close > .05]
... etc.
Of the three, I think the second probably would give you results closest to what you want.0 -
Hi Mark,
What does this calculate: [PctDiff(sma(20, range),sma(20,close)) < 5]
It gives lots more results than: [ [sma(20, range) / sma(20, close)] > .05]
Many thanks
0 -
Good question. I can't get meaningful results with PctDiff. But I did notice your version asks for less than 5 % (<5). Mine asks for greater than 5 % (>.05).0
-
I looked at the documentation for PctDiff. It is not explicit about which term is the denominator and which the numerator, or how the result is expressed - as a fraction, e.g. .05 or as a whole number, e.g. 5. Sorry I don't have the time to look into it more. Maybe Support can help.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