
Write the selection question, read the exact rule and inspect both matching and excluded cases before saving the screen.
Write a selection question
Separate stocks already above an average from stocks crossing it today. A state screen asks close > sma200. A crossover compares two sessions. A golden cross compares SMA 50 with SMA 200, so it is an average-to-average event rather than price crossing an average.
Read field units and lookback periods
SMA 200 uses 200 daily trading-session closes, not 200 calendar days. At close 101 and SMA 200 of 100 the stock lies 1% above its average. A previous close already above its previous average means the state is true without a new price crossing.
Compare another question before combining rules
Compare above-SMA and crossover presets before adding alignment. AND joins requirements such as close above both SMA 50 and SMA 200. OR can admit either condition, so put grouped alternatives inside parentheses and read the whole rule back before running it.
securityType = "Stock" and indexMembership contains "SP500" and (sma50 > sma200 and sma50Ago1 <= sma200Ago1)Inspect a match and a boundary exclusion
Inspect average slope, distance and repeated crossings in a sideways market. A golden cross follows the past path of two smoothed series. Record the actual crossing session rather than assuming every currently aligned stock just crossed.
Change one condition at a time and compare a row just inside the threshold with one just outside it. A zero-match result means the selected population did not meet the whole rule for that session; it is not a reason to silently change the question.
Save a reproducible research definition
Save the expression through the editor’s Library workflow. Record the selected session, population and sort so a later run can be compared meaningfully. A saved scan preserves rules, while a watchlist preserves symbols; their results can change independently.
Continue with
Read our data and methodology notes for calculation context. This guide explains research tools and observations. It does not recommend a trade or investment.