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.
scan
I'm struggling with trying write a scan to scan my chart lists, I want to scan my lists for sma50 crossing sma200 .
can anyone give me some help I write them now but they are never accurate. I will ask for stocks under $15.00 and I will get them for $40. not sure what I'm doing wrong...
can anyone give me some help I write them now but they are never accurate. I will ask for stocks under $15.00 and I will get them for $40. not sure what I'm doing wrong...
0
Comments
-
It's often easier to assist/ troubleshoot if you paste the scan code you have to the forum.
To scan against your Chartlists, add the ChartLists using the ChartLists dropdown.
Then add your crossing code.
Select the SMA from the Technical Indicators dropdown
It defaults like this
and [SMA(50,volume) > 9999999]
change it to be looking at a price. I changed it to look at the SMA50 of the Close price
and [SMA(50,Close) > 9999999]
Then change it to look for the cross
and [SMA(50,Close) X SMA(200,Close]
If you are getting unexpected results, it's often due to the sequence of the scan lines OR the placement of the brackets OR an issue with the use of AND and OR.
Like I said, it's easier to assist with troubleshooting actual scan language.
0 -
syntax error in the original post
and [SMA(50,Close) X SMA(200,Close)]0 -
lmkwin is right - it's hard to diagnose a problem without seeing the code.
If you have MULTIPLE chartlists, those need to be in an or statement. An "or" statement is two or more conditions connected by "or", with a pair of brackets around ALL the "or" conditions. So,
[
[ favorites list is MyEnergyStocks]
or
[ favorites list is MyMaterialsStocks]
or
[ favorites list is MyHealthStockds]
]
and [close < 15]
and [sma(50,close) x sma(200, close)]
If your brackets around the or statement are not correct, then you would get ANY stock that meets ANY of the conditions you specify in the entire scan. So that would be all the stocks in all of your lists, whether there was an sma crossover or not, and whether price was below 15 or not.
If this doesn't help, post what you have.0 -
Ok I copied the last scan I tried, thx you both Imkwin and Mark for all the help ...
[type=stock]
And[volume >750000]
and [country is us] AND [CLOSE <15.00]And [CLOSE >5.00]
and [ group is not etf ]
and [today's sma (50) > today's sma (200) ]
and [yesterday's sma (50) <yesterday's sma (200) ]
and [today's low < yesterday's daily min(10,low)]
or[[favorites list is 10]
or [favorites list is 9]
or [favorites list is 5]
or [favorites list is 7]
or [favorites list is 12]
or [favorites list is 13]]0 -
Almost.
For the first "or", substitute "and"orand [[favorites list is 10]
or [favorites list is 9]
or [favorites list is 5]
or [favorites list is 7]
or [favorites list is 12]
or [favorites list is 13]]0 -
That will work, but it would more efficient to re-organize the scan so lists come first.
// begin scan
// look in these lists
[
[favorites list is 10]
or [favorites list is 9]
or [favorites list is 5]
or [favorites list is 7]
or [favorites list is 12]
or [favorites list is 13]
]
// note: if all the stocks in your lists meet these criteria, you don't need the ticker properties section
// for these ticker properties
and [type=stock]
and[volume >750000]
and [country is us] AND [CLOSE <15.00]And [CLOSE >5.00]
and [ group is not etf ]
// and theses price-indicator conditions
and [today's sma (50) > today's sma (200) ]
and [yesterday's sma (50) <yesterday's sma (200) ]
and [today's low < yesterday's daily min(10,low)]
// end scan0 -
Thank you mark that did 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