writing a scan for the weekly standard deviation(10) ten week sma (52) week

I am trying to write a scan to determine the weekly standard deviation 10 week with a simple moving average of 52 weeks, so that i can find etf's with specific sd 10 week 52 week sma less than a specific number result like .10
i can put these paramater in a chart and it show the SD of an etf/stock exampleON A WEEKLY CHART
SELECTION THE INDICATOR STANDARD DEVIATION PARAMATER 10 WITH AN OVERLAY SIMPLE MOVING AVERAGE 52
i have tryed to write a scan to get to this data with no luck example:
//[WEEKLY Std Deviation(10),SMA(52) <= .10]
another one
[WEEKLY Std Deviation, SMA(52) > .10]
another one
[SMA(52, STANDARD DEVIATION(10)) < .10]

has any one done this??

Comments

  • markd
    markd mod
    edited March 2019
    I think you want this. It passes syntax, but I did not verify whether the results are correct.

    and [weekly Std Deviation(10, weekly sma(52)) <0.10]

    // optional, add this if you want to see the results in order
    rank by [weekly Std Deviation(10, weekly sma(52))]

    The default version of Std Deviation takes only one parameter, but the documentation shows it can take another one:

    https://stockcharts.com/docs/doku.php?id=scans:indicators#standard_deviation_std_deviation
  • You are right it did pass syntax but for some strange reason I got 999 results and std deviations greater than .10
  • mark guess what I just reversed your code and IT WORKED:
    [weekly sma(52, weekly std deviation(10)) < .10 ]
    THANKS FOR YOU HELP AL