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 PPO(2,3,2) being upward crossed by it’s SMA(1)

Request for help in setting up a scan for function in discussion title.

Have used following formula:

[ PPO Hist (2,3,2) x sma (1, PPO Hist(2,3,2))]

Have tried substituting Line and Signal on both sides of the equation. When running the scan all three ways I only get what spears as an error message stating- “No Date Available in Table”. Any help would be appreciated. I used above format in response to an earlier inquiry about RSI being crossed by it’s own SMA. Thanks for your assistance


  • what does the rest of the scan look like?

    You need to tell the scan engine what universe you want it to look at for these conditions

    Something like

    [Type is stock]
    [country is US]
    [exchange is NYSE]
  • The sma 1 of something is equal to the value of the something - e.g. close and sma(1,close) are the same thing. So you won't get a crossover. That's why you get the no data in table message - the condition can't happen.
  • I didn't pick up on that. Yes, change the SMA to 2 and it returns data.
  • It may be you are wanting to test for PPO Hist x PPO Line. Or, PPO Hist x PPO Signal.

    If you have an example chart of the signal you want and can post it, that might help.
  • Thank you for your replies. I refined my formula as above and found that the PPO Signal (2,3,2) being crossed by an upwards SMA (1) of the PPO(2,3,2) is what I need to set up. I changed the sma(1) to sma 2) as suggested and referenced my own list of stocks as what I want to scan (sorry I left that I left that out on the first post) and results are retrieved as needed.
    My follow up question is why StockCharts search engine can solve for sma (2) but not for sma (1)? Am I doing something wrong or just a limitation of the scan engine. Results using sma (2) are helpful but why can’t you scan for sma (1) when my saved chart definitions can draw it out. Thanks for any help or explanation.
  • You can scan for sma 1, but as I said above, the sma 1 of a value equals the value itself. Your scan asked for the sma 1 of PPO to cross PPO. But that's like asking for, say, 5 to cross 5. Can't happen.

    Now if you want Hist to cross Signal, you could write either Hist x Signal, or sma(1,Hist) x Signal, and either one would work. But why use sma(1, Hist) when you can just write Hist? No harm in it, just extra work and not as clear.
  • Thanks-now I understand the problem.
  • If you want to try PPO x 1 days ago SMA1 PPO to see how that works for you. Or flip one of the 2,3,2 to 2,3,1 as another option
Sign In or Register to comment.