| rudeStock 6 posts
 msg #161750
 - Ignore rudeStock
 | 3/29/2025 6:15:23 PM 
 The following 2 expressions are producing different results even though the only difference is that where clause is using a variable (i.e. 5_week_high) vs non-variable (5 week high). Can't seem to figure out what the reason is. What am I doing wrong?
 
 set{market_cap, shares outstanding * close}
 set{current_week_high, weekly high}
 set{5_week_high, 5 week high}
 show stocks where weekly high is equal to 5_week_high
 and chart-display is weekly
 and market_cap is above 250
 and volume is above 100000
 and market is not ETF
 and add column market_cap
 and add column current_week_high
 and add column 5_week_high
 sort column 1 descending
 
 
 set{market_cap, shares outstanding * close}
 set{current_week_high, weekly high}
 set{5_week_high, 5 week high}
 show stocks where weekly high is equal to 5 week high
 and chart-display is weekly
 and market_cap is above 250
 and volume is above 100000
 and market is not ETF
 and add column market_cap
 and add column current_week_high
 and add column 5_week_high
 sort column 1 descending
 
 
 | 
| nibor100 1,099 posts
 msg #161751
 - Ignore nibor100
 | 3/29/2025 7:38:42 PM 
 Not sure you are doing anything wrong, but SF is picking up the high for Friday as the 5 week high in your 2nd filter, for all stocks, even though in many cases it is not even the actual high for last week.
 
 Ed S.
 
 
 | 
| rudeStock 6 posts
 msg #161752
 - Ignore rudeStock
 | 3/29/2025 9:23:30 PM 
 Yeah, I noticed that too. "5 week high" is not giving the highest weekly high value over the last 5 weekly high values. Not sure how to get that! The example for 52-week high value clearly says '52 week high" in it.
 
 
 | 
| rudeStock 6 posts
 msg #161753
 - Ignore rudeStock
 | 3/29/2025 9:38:04 PM 
 Ah, figured out. The expression "5 week high" does not represent the highest value of the 5 week high values. It should have been "high 5 week high".
 
 
 | 
| TheRumpledOne 6,529 posts
 msg #161754
 - Ignore TheRumpledOne
 modified
 | 3/30/2025 11:01:57 AM 
 
 
 
 
 
 
 |