I would calculate the Daily % Range, then use BarsTrue() to find where it was less than 10% over the last 10 days.
Script Example:
//Find High / Low Range as a %
V1 = (ABS(Low() - High()) / HIGH()) * 100 ;
//High Low Range % is less than 10%
V2 = V1 <= 10 ;
//Last 10 Bars have had a Range of 10% or less
BARSTRUE(V2) == 10
If you mean has moved less than 10% over the entire 10 day period (not on a daily basis) a ROC would work.
Apply V1 and V2 to your charts using a Show Plot and you will see why the result is being returned. Highest High and Lowest Low values are dynamic, what covers a 10% range today may be different to the 10% range 5 days ago.
If you are only using the script to scan with (don’t need historical matches) you could wrap V1 and V2 in a LAST() function, this should give you the result you are expecting.