StockFetcher Forums · Filter Exchange · Help with a filtering problem<< >>Post Follow-up
graftonian
1,089 posts
msg #129081
Ignore graftonian
6/11/2016 10:52:42 AM

I have combined two filters to obtain a list of bottom dwellers,but cannot seem to make a filter statement(s) to reduce the number of hits to a workable number. I would like to limit the list to a "muddy" or "conners"
hits from 1 to 10 days. Any ideas?

Fetcher[
/*combining the muddy method and the conners composite*/
/*muddy method*/
set{A, count(RSI(2) IS BELOW 2 , 1)}
set{B, count(60 DAY SLOPE OF THE CLOSE IS ABOVE 0.5,1)}
set{C, count(PRICE TOUCHED LOWER BOLLINGER BAND(20),1)}
set{D, count(price has been dropping for 3 days, 1)}
set{E, count(volume > average volume(30), 1)}
set{F, count(volume > volume 1 day ago, 1)}
set{OR0,a + b}
set{OR1, OR0 + C}
set{OR2, OR1 + D}
set{OR3, OR2 + E}
set{MUDDY_SCORE, OR3 + F}
draw MUDDY_SCORE
/*how long since stock a "muddy method candidate"*/
set{DAYS_SINCE_MUDDY_TRIGGER, days(MUDDY_SCORE > 4, 30)}
do not draw DAYS_SINCE_MUDDY_TRIGGER
ADD COLUMN SEPARATOR
add column DAYS_SINCE_MUDDY_TRIGGER
/*CONNERS COMPOSITE*/
SET{LONG1, COUNT(CLOSE ABOVE MA(200),1)}
SET{LONG2, COUNT(CLOSE BELOW MA(5),1)}
SET{LONG12, LONG1 * LONG2}
SET{1A_1, COUNT(HIGH DECREASING FOR 3 DAYS,1)}
SET{1A_2, COUNT(LOW DECREASING FOR 3 DAYS,1)}
SET{1A_3, 1A_1 * 1A_2}
SET{1A, 1A_3 * LONG12}
SET{2A_1, COUNT(RSI(4) BELOW 25,1)}
SET{2A, 2A_1 * LONG1}
SET{3A_1, COUNT(RSI(2) DECREASING FOR 3 DAYS,1)}
SET{3A_2, COUNT(RSI(2) 3 DAYS AGO BELOW 60,1)}
SET{3A_3, COUNT(RSI(2) BELOW 10,1)}
SET{3A_4, 3A_1 * 3A_2}
SET{3A_5, 3A_3 * 3A_4}
SET{3A, 3A_5 * LONG1}
SET{4A_1, COUNT(BOLLINGER %B(20,2) 2 DAYS AGO BELOW 0.2,1)}
SET{4A_2, COUNT(BOLLINGER %B(20,2) 1 DAY AGO BELOW 0.2,1)}
SET{4A_3, COUNT(BOLLINGER %B(20,2) BELOW 0.2,1)}
SET{4A_4, 4A_1 * 4A_2}
SET{4A_5, 4A_3 * 4A_4}
SET{4A, 4A_5 * LONG1}
SET{DOWN_4OF5, COUNT(CLOSE BELOW CLOSE 1 DAY AGO,5)}
SET{DOWNCOUNT, COUNT(DOWN_4OF5 ABOVE 3.5,1)}
SET{5A, DOWNCOUNT * LONG12}
SET{6A_1, COUNT(RSI(2) 1 DAY AGO BELOW 10,1)}
SET{6A_2, COUNT(RSI(2) BELOW 6,1)}
SET{6A_3, 6A_1 * 6A_2}
SET{6A, 6A_3 * LONG12}
SET{C1, 1A + 2A}
SET{C2, C1 + 3A}
SET{C3, C2 + 4A}
SET{C4, C3 + 5A}
SET{CONNERS_COMPOSITE, C4 + 6A}
draw CONNERS_COMPOSITE
/*HOW MANY DAYS SINCE CONNERS COMP = 6*/
SET{DAYS_SINCE_CONNERS_TRIGGER, DAYS(CONNERS_COMPOSITE > 5, 30)}
ADD COLUMN DAYS_SINCE_CONNERS_TRIGGER
DO NOT DRAW DAYS_SINCE_CONNERS_TRIGGER
/*add W%R and IFT to the mix for info */
SET{I2, IFT(5,9) * 50}
SET{I, I2 - 50}
SET{W, WILLIAMS %R(30)}
DRAW W
draw W line at -20
draw W line at -80
DRAW I ON PLOT W
/*FILTER*/
DAYS_SINCE_CONNERS_TRIGGER BETWEEN 0 AND 10
/*DAYS_SINCE_MUDDY_TRIGGER BETWEEN 0 AND 10*/
/*BELLS & WHISTLES*/
DRAW Parabolic SAR(0.02,0.2)
SET{CLS, CLOSE}
SET{TEN_PCT, CLS* 1.1}
DRAW PRICE LINE AT CLS
DRAW PRICE LINE AT TEN_PCT
draw ema(13)
set{SPY, ind(spy, close)}
draw SPY
draw cema(SPY, 13) on SPY
]



graftonian
1,089 posts
msg #129085
Ignore graftonian
6/11/2016 2:05:06 PM

Never mind, I solved the problem. I will write on the blackboard 1000 times: "DO NO DRAW...." statements belong at the bottom of the script.

StockFetcher Forums · Filter Exchange · Help with a filtering problem<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.