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.
small scan

shammyx1
✭
in SharpCharts
Mark
How do i code the following on stockcharts?
I feel so hopeless ive been trying to code simple things like this and i just cant make anything work, see all my previoue messages
and 14 day moving average > 50day moving average
and 200day moving average is 15% lower than the price 1 day ago
and the price 1 day ago is greater than the 50day moving average
How do i code the following on stockcharts?
I feel so hopeless ive been trying to code simple things like this and i just cant make anything work, see all my previoue messages
and 14 day moving average > 50day moving average
and 200day moving average is 15% lower than the price 1 day ago
and the price 1 day ago is greater than the 50day moving average
0
Comments
-
Hi @shammyx1
You can select the indicators in your scan - moving average and close (price) - from the drop downs on the advanced scan workbench and edit them to your needs. They have the correct syntax already built in.
For "price" select close.
For "moving average" select SMA.
Edit and combine the default versions to match your conditions.
The look back adjustment is just how you have it, e.g. 1 day ago close.
The only difficult line is "and 200day moving average is 15% lower than the price 1 day ago".
It's very unlikely the 200 day moving average ( or sma(200,close) ) will be EXACTLY 15% lower, so you have to define a range. So maybe sma is less than close * .85 and sma is greater than close * .80, or between 15 and 20 % lower.
I strongly suggest you spend some more time with the scanning videos, and look back through my previous answers for a condensed version of the basic rules.
http://scan.stockcharts.com/discussion/comment/4308#Comment_4308
I rarely will write complete scans for people because others then pile on and want me to do their work for them.
I am happy to help with tricky logic problems or arcane details of syntactically correct scans that produce unexpected results. But I'm not here to be a scan writing service.
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