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.
Lowest range from 10 days
Best Answers
-
I think the only way to do this is the brute force way -
and [low < 1 day ago low]
and [1 day ago low < 2 days ago low]
and [2 days ago low < 3 days ago low]
and...
etc.
As for biggest percentage move lower, that's a bear (so to speak) -
and [1 day ago close > close]
and [ [1 day ago close - close]/1 day ago close > [2 days ago close - 1 day ago close]/2 days ago close ]
and [2 days ago close > 1 day ago close]
and [ [1 day ago close - close]/1 day ago close > [3 days ago close - 2 day ago close]/3 days ago close ]
etc.
Watch your brackets.
Not sure how often you are going to get hits with this. The longer and more specific the pattern, the less often it occurs. Also, the subsequent action will not always be the same either. But what the heck, give it a try.0 -
I agree with Markd, the best way to start coding is using the long brute force method as it allows you to better understand what you are coding for.
However once you get to know your indicators a little better you can use some tricks.
If we use the PercentChange function and set the duration for 1 day, then if the %change is less than Zero, the close is lower today than it was yesterday.
We can also use the Min / Max overtime function to see if the %Change has been less than Zero for multiple days. And also to see if todays %change is is greater (more negative in this case), than previous multiple days.
[type = Stock]
and [country is US]
and [1 day ago Max (5, PctChange (1,close)) < 0]
and [ PctChange (1,close) < 1 day ago Min (5, PctChange (1,close)) ]
Note I didn't get any hits when using 10 days so switched to 5 days and did get some hits for verification of the scan. Play around and see what you think.0
Answers
-
Yes, thats the way i was going to write it but i thought you might know an easier way. At least i get to practise my coding.0
-
Thanks Markd,
Yes it could be written as lower lows. I wasn't sure if Morgan was looking for lower closes or lower lows, so just made the example for lower closes.0 -
Thanks Guys. Appreciate it.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