New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Can anyone tell me how to write this scan so it scans all "3" groups of the SP1500 below

ablueboyablueboy
edited June 2020 in Scanning
// stock universe is the S&P 1500
[[group is SP500] or [group is SP400] or [group is SP600]]
and[type = stock]
and [country is US]
and [sma(20,volume)>400000]
and [low>12] and [high<35]
and [exchange is not pink]
and [group is not Biotechnology]
and [group is not ETF]
and [group is not Pharmaceuticals]
AND
[
// 20-days low 4 bars ago
[[4 days ago low = 1 day ago min(20,low)] AND [1 day ago min(3,low)>1 day ago min(20,low)]] OR
// 20-days low 5 bars ago
[[5 days ago low = 1 day ago min(20,low)] AND [1 day ago min(4,low)>1 day ago min(20,low)]] OR
//20-days low 6 bars ago
[[6 days ago low = 1 day ago min(20,low)] AND [1 day ago min(5,low)>1 day ago min(20,low)]] OR
//20-days low 7 bars ago
[[7 days ago low = 1 day ago min(20,low)] AND [1 day ago min(6,low)>1 day ago min(20,low)]] OR
//20-days low 8 bars ago
[[8 days ago low = 1 day ago min(20,low)] AND [1 day ago min(7,low)>1 day ago min(20,low)]] OR
//20-days low 9 bars ago
[[9 days ago low = 1 day ago min(20,low)] AND [1 day ago min(8,low)>1 day ago min(20,low)]] OR
//20-days low 10 bars ago
[[10 days ago low = 1 day ago min(20,low)] AND [1 day ago min(9,low)>1 day ago min(20,low)]] OR
//20-days low 11 bars ago
[[11 days ago low = 1 day ago min(20,low)] AND [1 day ago min(10,low)>1 day ago min(20,low)]] OR
//20-days low 12 bars ago
[[12 days ago low = 1 day ago min(20,low)] AND [1 day ago min(11,low)>1 day ago min(20,low)]] OR
//20-days low 13 bars ago
[[13 days ago low = 1 day ago min(20,low)] AND [1 day ago min(12,low)>1 day ago min(20,low)]] OR
//20-days low 14 bars ago
[[14 days ago low = 1 day ago min(20,low)] AND [1 day ago min(13,low)>1 day ago min(20,low)]] OR
//20-days low 15 bars ago
[[15 days ago low = 1 day ago min(20,low)] AND [1 day ago min(14,low)>1 day ago min(20,low)]] OR
//20-days low 16 bars ago
[[16 days ago low = 1 day ago min(20,low)] AND [1 day ago min(15,low)>1 day ago min(20,low)]] OR
//20-days low 17 bars ago
[[17 days ago low = 1 day ago min(20,low)] AND [1 day ago min(16,low)>1 day ago min(20,low)]]
]
AND

[close <= 1 day ago min(20,low) * 1.01] // un-comment if you want to search for stocks that are close to their 20-day low and potentially ready for a TS setup

//[low < 1 day ago min(20,low) ] // un-comment if you want to scan for stocks that set a 20-day low TODAY

Best Answer

  • lmkwinlmkwin ✭✭
    edited June 2020 Answer ✓
    it does. You bracketed it perfectly. You probably can cut the Type is stock and not Pink as the group is a given, it's a stock and it's not a pink. ETF's also aren't in the SP1500 so that can go as well. and country......

Answers

  • lmkwinlmkwin ✭✭
    Syntax passes. What is the issue that you are experiencing? I get 10 results.

  • yes i also get 10 results, but i do not know if i have written it to include all 3 SP500+SP400+SP600 can you tell?
Sign In or Register to comment.