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.
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...
0
Comments
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.
and [SMA(50,Close) X SMA(200,Close)]
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.
[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]]
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]]
// 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 scan