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.
Hello to Everyone,
Is there a scan syntax to display a positive candle crossing over an ema? In the url refer to Dec. 13/2023 as an example of a hollow, positive candle crossing over an EMA.
Best, John Train
0
Comments
Your suggested syntax works well!
Is there a syntax to scan for a hollow, positive candle that closes or opens above an ema?
Thank-you,
John Train
The meaning and usage of each term (or probably most terms) is available by searching the term in Support Articles. If the term is an indicator, in depth explanation is likely available in Chart School.
It's probably worthwhile if you intend to write custom scans to spend some time getting familiar with items in the dropdowns.
This may work:
and [close x ema(21,close)]
and [Long Body is true]
If you don't like the default definitions of candle types, you have to write your own, which takes some thought and effort.
P.S. Dec 17 2023 is a Sunday. The dates below the chart seem to represent Mondays, or possibly Tuesday if Monday is a holiday.
If you want the first bar to close completely above the EMA, you would test for the low crossing the EMA of the close:
and [low x ema(21,close)]
For the Pfizer chart below, what scan syntax do I require to bring up Pfizer in the scan results? I have tried using syntax but no luck. This time I am scanning for the black candle when the price was $28.69 per the chart.
Regards,
John Train
https://stockcharts.com/c-sc/sc?s=PFE&p=D&yr=0&mn=6&dy=0&i=t8238500658c&r=1710429372411
Before you write a scan, you have to identify what specific combination of elements on the chart you see that you think are significant. You need a reason(s) for why what you see is a trade. You need to think about what your are seeing on the chart in terms of what the scan engine can understand. As I suggested, the scan engine's "vocabulary" for talking about charts is in the drop downs under the scan writing window.
Some choices are indicators above, below or crossing some level; price above, below or crossing some moving average, close or high or low (don't say just price, say which price) is max or min over some period of time, some specific candle type, etc. You would probably have to play around with these on your charts to see what seems to work best most often.
Your choice of indicators or moving averages, channels, etc., should be on your chart style to verify the results of your scan.
Most scans turn up junk as well as what you are actually looking for. The less specific the scan, the more junk. The more specific the scan the less junk, but also the more likely you miss set ups you would go for. That's the trade off.
[open > ema(9,close)] or [open x ema(9,close)]
[group is sp500]
and [ [open > ema(9,close)] or [open x ema(9,close)] ]
The "x ema" is redundant, since if it crossed over it is also "> ema". But it doesn't hurt.
This scan will work for any day the open is above the ema, not just 3/13 - also 3/12, 3/11, 3/8 etc.