ClockDrift 3 posts msg #149227 - Ignore ClockDrift |
9/24/2019 3:16:24 PM
Hello, I am filtering on average volume, beta, select Sectors, and (trying) to apply to my own watch list. I tried the script below, but it returns general results, NOT from the watchlist. I can't figure out how to get multiple sectors AND a watch list applied. Thanks in advance.
[
set{vol1, count(Average Volume(10) is above 500000, 1)} /*will return a 1 or 0*/
set{beta1, count(Beta is above 1.2, 1)}
set{x, vol1 * beta1}
x > 0
apply to sector(Industrial, Oil, Utilities)
apply to watchlist(OptionsList)
and add column Average Volume(10)
add column Beta
add column sector column sector()
add column industry
sort column 7 descending
]
The above runs fine, but the results are general results, not from the watchlist.
Also tried ...
[
set {vol1, Average Volume(10) is above 500000}
set (beta1, Beta is above 1.2}
set {sector1, sector is Finance}
set {watch1, watchlist(WeeklyOptions)}
set {finalAND, vol1*beta1*sector1*watch1}
and add column Average Volume(10)
and add column beta
and add column sector
and add column industry
sort column 7 ascending
]
|
nibor100 1,044 posts msg #149236 - Ignore nibor100 |
9/25/2019 10:06:22 PM
Based on the few tries I tested SF doesn't process a filter correctly that has both 'Apply to Watchlist' and "Apply to Sector" command phrases.
There are at least a couple of work-arounds:
1. a. Go to Watchlist tab
b. Select the Table box
c. Select your watchlist
d. Select the watchlist actions box
e. choose filters (not Run as filter)
f. scroll down the list of your filters and put a checkmark in the box next to the filter number
g. click save
h. the screen should update and a column labeled by your filter number will show checkmarks for the stocks that meet that filter today and it is sort-able
2.a. Go to My Filters and run your filter as normal
b. Select the Table box
c. Then select the drop down box that looks like a giant asterisk
d, choose Quick Settings
e. Select the drop down in the 'watchlist indicators' box
f. choose "Show as Columns (table only)
g. a set of columns with watchlist names for each your watchlists that have any result stocks of your filter in them, will appear.
h. Click on the desired watchlist label to sort the results list by that watchlist's stocks that meet your filter.
Hope this helps some,
Ed S.
|