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.

Price performance over its SMA

Hello All.

I would like to have a scan which can tell me whether the price performance is above its weekly sma(50) and/or whether it's trending higher.

I tried a syntax mentioned in one of the earlier threads (symbol:$SPX) *1.03 > (SMA,20,symbol:$SPX) but it no longer works. I have been experimenting quite a bit and no matter what I tried, I am struggling to get it right:

weekly close ('$SYMBOL:$NYA') > weekly SMA(50,close ('$SYMBOL:$NYA'))

I would deeply appreciate if someone could help and point me in the right direction, please.

Kind regards,


  • You can't get it right because the scan engine won't do it. It is not coded to deal with ratio symbols (like ABC:DEF). The code you quoted never worked. As a rule of thumb, if you can't add the scan terms you want from the drop downs below scan writing window, the scan engine can't deal with it.

    I'm a long time subscriber. Ratio symbols came along long after the scanning engine was designed and built and for reasons unknown (to me) it was never updated to accommodate them. I'm not sure if it's a design issue or a capacity issue (meaning, it would slow down the scan engine too much) or a business priority issue.

    I use ratio symbols extensively on my charts and it burns me that I can't scan for the charts I want to see based on those symbols.

    You can increase the likelihood of finding those outperforming charts by including the base symbol ( like $NYA in your example) in a favorites list, and running a scan against the list that includes a "rank by PctChange( x, x)"
    (substitute your values for the "x"s). For instance

    // [favorites list is ??] // your target stocks

    rank by [weekly PctChange(20, weekly close)]

    Unfortunately, this solution only works against a list, not a group like [group is EnergySector] because the base symbol "$NYA" is not in any group.
  • lmkwinlmkwin ✭✭
    edited March 2021
    You can use a PctRelative in the rank by statement. It also works in standalone filter statements but you can't use it in relation to itself or overlay indicators. Well, you CAN use it, it just won't work as you expect.

    So statements like:

    and [PctRelative(75,$industry) > 20]
    and [PctRelative(75,$Sector) > 10]
    and [PctRelative(75,VBINX) > 10]

    will work.

    rank by [PctRelative(10,$NYA)]

    will work

    but the PctRelative crossing the MA of the PctRelative will not. Well, it will scan, and you won't get a syntax error, but the results are suspect.

    I have been playing around with some compound filter statements on this topic. Like the Seasonality code I posted, if I achieve something along these lines, I'll post it. Like my experience with ACP, I usually end up frustrated and move on to working on my favored scans. Working on a Renko Block scan, 100% Pole on a PnF chart scan, etc. Things that appear to be productive.

    I think that the RS aspect does provide value. How much? Well, it's a vital component to successful portfolio management in the opinion of many portfolio managers.

    For me, the price chart rules, but it's always nice to know where you stand in relation to the market.

    All of my non-PnF charts have the Price Performance RS panels on them. My PnF charts would as well except StockCharts doesn't allow it as a panel.

  • Many thanks Markd and Imkwin!

    It's a pity that the RS over its MA cannot be used as an input directly. I doubt that it can make our scans considerably slower. Well, at worst it can double the time but so far I am happy with the SC scanning speed.

    I will follow your recommendations and will experiment with PctRelative.

    I have been using NinjaT and am new to SC. Do you happen to know what the route is for enhancement requests and how responsive is their development team? ACP is good but so far it does not allow us to plot MA for the relative strength indicator.

    Many thanks once again.
  • lmkwinlmkwin ✭✭
    edited March 2021
    you CAN'T put an MA on the Relative panel in ACP. But you can in SharpCharts.

    As far as enhancement/recommendations, they are responsive to the requests, but there is often a lag in implementing them. I've been waiting for several years now (maybe on year 8 now?) for, what I consider simple, enhancements suggested for the Point and Figure Charts. The response is 'thank you for your suggestions. When we review that area of the system, we will take them into account.' or something like that. "The Team" seems to be focused exclusively on ACP, so perhaps, those may get more gravitas at the moment.
  • I think anyone with experience in software development on a large scale will understand it is a slow process. No, it is glacial. Partly it has to do with getting the specs right and coding it right to meet the specs, but mainly it's because you never know what change will break something apparently unrelated, so you have to test, test, test before letting it out into the world. Very frustrating - not just for the customer but the developers, too. Those upgrades that have the best prospects for attracting and/or retaining subscribers have to get priority, and even those take forever. Does management always make the right decisions? Hard to answer that with a straight face, but to be fair, who does?
  • I have a couple decades experience in software development. Of course, my focus was on user needs and interfacing in the most efficient manner. What I think happened is that "The Team" is pretty much all new and has no ability to "program" in the SharpCharts system. They, most likely, will finish up the Symbol Summary one would imagine. After that..... Grayson did say that they were laser focused on implementing improvements to the SharpCharts system in 2021. So far.... Extended Hours check box appears to be a direct result of that laser focusing.

    I agree, making changes requires testing skills. Skills that may no longer be available in the company at the SharpCharts level. That's why I think we'll only see additions with no changes or deletions. Hope I'm wrong but...........we'll see what happens. It's still the best, by far, platform I use.
  • Thank you for the additional info.

    I have submitted a couple of enhancement requests for:
    1) a possibility to use RS relative to its MA condition in our scans;
    2) making MA for $SYMBOL/$SPX available in ACP.

    Let's hope for the best.

    P.S. Thinking about the (1) it would be great to have a possibility to subtract the MA out of MA value as well as out of $SYMBOL/$SPX, so that the MA appears to be horizonal, then it would be a bit easier to see how quickly it is improving or deteriorating. Well, one thing at a time.
  • I work for a software company, and there is one shortcoming in SC's enhancement logging functionality that I can see right away. As users we cannot vote for ERs, unfortunately. I hope they have some sort of internal process for that.
  • I had started a thread a while back about suggestions to support. I had thought that if we posted them on the forum AFTER submitting them to StockCharts, that others, may also like the suggestion and could make a similar request to StockCharts support for the enhancement. This could possibly add momentum with more requests. I have no idea how it has worked but thought it a good idea to try and get power in numbers perhaps.

    I like your suggestion on the use of creating a horizontal line. Two workarounds for this come to mind. One is the Annotation Tools. If you haven't tried them yet, they are quite robust.

    Another may be to put Price Channels overlay on your Ratio symbol. Price Channel will put a Top, Center, and Bottom for the period that will provide a great deal of clarity, in my opinion, of what is going on. I have a tremendous appreciation for Price Channels on my charts. You'll be able to see when the Top and Bottom are rising or falling very easily. I put them on a lot of my indicators when appropriate. You may even "spot divergences" using them.

Sign In or Register to comment.