# Ranking system scan

Is it possible to scan from a ranking criteria? If my ranking is a score of 0-5 and I just what to scan for stocks with a score of 4 is this possible? I’ve had no luck trying to script.
Thanks Peter

```//Currently trading above the MA12?
V1 = CLOSE() > MA(BARS=12, STYLE=Exponential, CALC=Close);
//Is the 34ema sloping up
V2 = MA(BARS=36, STYLE=Exponential, CALC=Close) IsUp;
// Currently trading above MA 36?
V3= Close() > MA(BARS=36, STYLE=Exponential, CALC=Close);
//Is the RSI(12) above its 12MA?
V4 = RSI(BARS=12) > MA(RSI(BARS=12), BARS=12);
//Positive returns over last 3 months?
V5= ROC(Month(PERIODAMOUNT=1), BARS=3) > 0;
//Sum the results to get a ranking value
V1+V2+V3+V4+V5```

Hi,

It’s possible to scan, you just need to convert the script to produce a boolean result. In the example of wanting to find codes that have a rank of 4 that would be done by including the following:

```//Currently trading above the MA12?
V1 = CLOSE() > MA(BARS=12, STYLE=Exponential, CALC=Close);
//Is the 34ema sloping up
V2 = MA(BARS=36, STYLE=Exponential, CALC=Close) IsUp;
// Currently trading above MA 36?
V3= Close() > MA(BARS=36, STYLE=Exponential, CALC=Close);
//Is the RSI(12) above its 12MA?
V4 = RSI(BARS=12) > MA(RSI(BARS=12), BARS=12);
//Positive returns over last 3 months?
V5= ROC(Month(PERIODAMOUNT=1), BARS=3) > 0;
//Sum the results to get a ranking value
V6 = V1+V2+V3+V4+V5;
//Find Rank of 4
V6 == 4```

Here is how it looks in a WL:

Thanks