It isn't working because the values in column B aren't numbers - although they look like numbers, they are actually text. You could try converting them to numbers like this - you need the Iferror because the hyphens will produce an error when it tries to convert them.
=IF(ISBLANK(A2),,iferror(--SUBSTITUTE(INDEX(QUERY(IMPORTHTML("https://www.finviz.com/quote.ashx?t="&A2, "table", 8),"select Col4"),6),"*",""),"-"))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…