I tried the below script in the Thinkorswim Scanner's thinkScript Editor to list the stocks whose 8EMA has not crossed over 21EMA over last 10 bars, but this is not giving me the expected result. Even if for one bar, the below condition is passing, the scanner is listing the stock. The scanner is not validating the condition for the entire set of 10 bars. Please correct me or provide me some pointers.
(MovAvgExponential("length" = 8)."AvgExp" crosses above MovAvgExponential("length" = 21)."AvgExp" ) is false within 10 bars
(MovAvgExponential("length" = 8)."AvgExp" crosses above MovAvgExponential("length" = 21)."AvgExp" ) is false within 10 bars
Last edited by a moderator: