Scan for a moving average of an indicator

I have been trying to write a scan for the 50 Week SMA of the Weekly Williams%R(60), but having no success. If someone could help on this matter, I would be most appreciative. Thank you.

Comments

  • markd
    markd mod
    edited September 2021
    and [weekly sma(50, weekly Williams %R(14)) < 20 ]

    For an sma( ), the first term is the number of elements to average, and the second term is what value to average. Usually, its a price like high, low or close. But it can be indicator value as well.

    The second thing is, *both* the function (sma in this case) AND the terms inside it have to have a time frame modifier (daily weekly monthly), if they can take a time frame modifier. Williams %R can take a time frame modifier, so, it's "weekly sma(..." AND "weekly Williams..". NOTE: if you omit or mix time frame modifiers, the scan may run even if it doesn't give you an editor error or a syntax error, but the results will not be what you expect.

    (the exception is "daily"; the scan engine assumes a value is daily if there is no time frame modifier, so if you mean daily, you don't have to write it in the scan. No harm if you do, though.)
  • Thank you.