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.
Scanning for PctChange
I am trying to create a scan using the PctChange function to get the percent change for the year of qqq etf going back to 2009 and then forward each year. the reason for the scan will be to put the % change for the qqq, a general scan and see how many etf"s beat the qqq in a specific year.
this is the scan I created:
// this scan has 1573 in the starting before the current trading day in that parameter
// or course if you run in tomorrow you would have to pull up the jan 4 2009 date in increase the number of days
//00 CHG MODEL %
[symbol starts with 'qqq ']
AND
//&&&& PCT PARAM 1year = NUM DAYS-weeks PARM 2= % CHANGE
[weekly PctChange(52,close) < 0]
rank by weekly PctChange(52,close)
I used 52 in the weeks parameter because I want the scan to include the entire year of 2009
I had to use less than zero because I came up with a negative number for my results
if you do a performance chart the result should be around 48.27%
as you can see by the attached file this scan give a results of -33.88%
does any one have some ideas of what I am doing wrong.
this is the scan I created:
// this scan has 1573 in the starting before the current trading day in that parameter
// or course if you run in tomorrow you would have to pull up the jan 4 2009 date in increase the number of days
//00 CHG MODEL %
[symbol starts with 'qqq ']
AND
//&&&& PCT PARAM 1year = NUM DAYS-weeks PARM 2= % CHANGE
[weekly PctChange(52,close) < 0]
rank by weekly PctChange(52,close)
I used 52 in the weeks parameter because I want the scan to include the entire year of 2009
I had to use less than zero because I came up with a negative number for my results
if you do a performance chart the result should be around 48.27%
as you can see by the attached file this scan give a results of -33.88%
does any one have some ideas of what I am doing wrong.
0
Best Answer
-
Scanal, the scan engine can't look into the future. So when you write "and [weekly PctChange(52,close) < 0]" it's looking at the previous 52 weeks.
Thus you need to run your scan on Jan 1 2010, to look at the previous 52 weeks, ie 2009.
starting 1323 days ago, (as of today)
[symbol starts with 'qqq ']
// and [weekly PctChange(52,close) < 0] , you don't need this clause
rank by [weekly PctChange(52,close)]
This scan gives me 48.267% for the QQQ
Per the chart I get 48.27%
http://scharts.co/1E6QIHT0
Answers
-
great tank you0
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