stock vs $nya

I like to write a scan where a stock:$NYA ema15 crosses ema150, and where the ema 150 has been in an uptrend?
can somebody please help me?

Comments

  • markd
    markd mod
    edited May 2019
    As far as I know, you can not write a scan for ratio values.

    However, you may be able to figure out how to do something with the PctRelative function, explained here:

    https://stockcharts.com/docs/doku.php?id=scans:functions
  • lmkwin
    lmkwin ✭✭
    @wdw, I've been attempting to do this for a while but unsuccessfully. Something that you may want to consider it playing around with the PctRelative function like @markd suggested. I haven't been able to make it recognize a MA but you can take a take to PctRelative values and look for a crossover or movement.

    [PctRelative(15,$NYA) x PctRelative(150,$NYA)]

    Unfortunately it's tough to verify or validate the results via the charts and it probably isn't exactly what you are asking about.

    You could also use a comparison of under performing to out performing over different periods. Remember, you can also use $Industry and $Sector in the space for the Relative comparison