StockFetcher Forums · Filter Exchange · Need a little help, Please<< >>Post Follow-up
SAFeTRADE
630 posts
msg #114319
Ignore SAFeTRADE
7/3/2013 12:30:02 PM

Fetcher[set{sig1,count(williams %r(90) > -07 in the last 1 day,1)}
set{sig2,count(cci(14) > 89 in the last 1 day,1)}
set{duo, sig1 * sig2}
set{since, days(duo > 0, 10 ) }
symlist(kbe)
add column since
draw since
]



What am I not seeing as to why this is not working? Should return at least 4.

Clarence

four
5,087 posts
msg #114322
Ignore four
modified
7/3/2013 1:09:19 PM

1. remove -- symlist(kbe)
2. add column duo equals 1

-- results = 491 market closed)


Fetcher[
set{sig1,count(williams %r(90) > -07 in the last 1 day,1)}
set{sig2,count(cci(14) > 89 in the last 1 day,1)}
set{duo, sig1 * sig2}
set{since, days(duo > 0, 10 ) }
add column duo equals 1
add column since
draw since

]



SAFeTRADE
630 posts
msg #114326
Ignore SAFeTRADE
7/3/2013 7:15:17 PM

Thanks Four. It is my understanding that the days since shows how many days since an event happened.
If that is the case then kbe should show a 4 as duo triggered 4 days ago or maybe 5 now. Am I incorrect in
that assumption?

Clarence

four
5,087 posts
msg #114327
Ignore four
modified
7/3/2013 9:29:18 PM

Try this...

- Looking at 10 days for both variables as individual results (not sure how you want to combine them as a final requirement)
- The -1 forces the required event to have happened at least once in 10 day range
- The column result of 0 is the required event happened today


Fetcher[
set{will1, days(williams %r(90) > -.07,10)}
set{cci1, days(cci(14) > 89,10)}
add column will1 above -1
add column cci1 above -1
sp500

draw williams %r(90) line at -.07
draw cci(14) line at 89

add column williams %r(90)
add column cci(14)

do not draw will1
do not draw cci1
]



SAFeTRADE
630 posts
msg #114328
Ignore SAFeTRADE
7/3/2013 10:05:17 PM

Thanks Four you really jump right in there and I appreciate that. I finally figured it out.
here is the right code.

Fetcher[set{sig1,count(williams %r(90) > -07 in the last 1 day,1)}
set{sig2,count(cci(14) > 89 in the last 1 day,1)}
set{duo, sig1 * sig2}
set{since, days(duo EQUAL 0, 10)}
symlist(kbe)
add column since
draw since
]



Should not have been looking for 1 but zero instead in the "duo equal 0" instead of
"duo equal 1"

Thanks again!

Clarence

four
5,087 posts
msg #114329
Ignore four
modified
7/3/2013 10:35:47 PM

Wondering about the correct phrase (in English) for your need...

Is this correct?:

---> Only return stocks that :

-1--- One of the 2 sets does not occur -or- both do not occur: williams %r(90) > -.07 , cci(14) > 89
-2--- Within one day of each other -or- the same day
-3--- Item 2 occurs within the last 10 days

PS Notice: -07 -- needs a period = -.07

SAFeTRADE
630 posts
msg #114334
Ignore SAFeTRADE
7/5/2013 3:45:08 AM

Four, not sure I understand your question completely. I am looking for both Williams %r and CCI(14)
to signal a 1. The duo is a check for when both are 1's. It keeps track of when they crossed over to 1.
The Williams %r(90) is a -07 and not a -.07. I hope this answers your question. Just recently USO
met these qualifications as well as KBE and KRE.

Clarence

SAFeTRADE
630 posts
msg #114335
Ignore SAFeTRADE
7/5/2013 5:50:53 AM

Four here is the rest of the filter.

Fetcher[set{UpperLim , High 20 day High}
set{LowerLim , Low 20 day Low}
set{diff, upperlim - lowerlim}
set{up70, diff * .30}
set{up50, diff * .50}
set{dn30, diff * .70}
set{70line, upperlim - up70}
set{50line, upperlim - up50}
set{30line, upperlim - dn30}

set{sig1,count(williams %r(90) > -07 in the last 1 day,1)}
set{sig2,count(cci(14) > 89 in the last 1 day,1)}
set{duo, sig1 * sig2}
set{since, days(duo EQUAL 0, 10)}

set{cntrl, count(close > 50line,1)}
set{cntrlsince, days(cntrl EQUAL 0, 20)}

symlist

(spy,dia,qqq,ijh,ijr,iwb,iwm,iwv,ivw,ijk,ijt,ive,mdy,ijj,ijs,dvy,rsp,fxb,fxe,fxy,xly,xlp,xle,xlf,

xlv,xli,xlb,xlk,iyz,xlu,ewa,ewz,ewc,fxi,ewq,ewg,ewh,inp,ewi,ewj,eww,ewp,rsx,ewu,efa,eem,ioo,eeb,d

bc,uso,ung,gld,slv,shy,ief,tlt,agg,bnd,tip,gdx,iyr,ivv,oih,smh,iwf,vti,xrt,xme,iwb,iwo,kbe,iwd,iwn,iws,ivw,rth,kre,iyf,iwr,iym,vxx,icf,veu,xop,iwp,oef,ibb)


draw upperlim on plot price
draw lowerlim on plot price
draw 70line on plot price
draw 30line on plot price
draw williams %r(90) line at -07
draw cci(14) line at 90


add column separator
add column upperlim
add column 50line{pivot}
add column lowerlim
add column separator
add column duo{buy}
add column since
add column separator
add column cntrl
add column cntrlsince
add column separator


/*IMPROVED OBV CALCULATION*/

SET{HIOP, HIGH - OPEN}
SET{HILOW, HIGH - LOW}
SET{OPLOW, OPEN - LOW}

SET{UPMOVE, HIOP / HILOW}
SET{DOWNMOVE, OPLOW / HILOW}

SET{UPVOLUME, VOLUME * UPMOVE}
SET{UPVOLSUM20, SUM(UPVOLUME, 20)}
SET{UPVOLSUM5, SUM(UPVOLUME, 5)}

SET{DOWNVOLUME, VOLUME * DOWNMOVE}
SET{DOWNVOLSUM20, SUM(DOWNVOLUME,20)}
SET{DOWNVOLSUM5, SUM(DOWNVOLUME,5)}

SET{5VOL%, UPVOLSUM5 / DOWNVOLSUM5}
SET{20VOL%, UPVOLSUM20 / DOWNVOLSUM20}

draw 5vol% on plot 20vol%
add column 5vol%
add column UPVOLSUM5
add column DOWNVOLSUM5
add column separator
add column 20VOL%
add column UPVOLSUM20
add column DOWNVOLSUM20
]



Clarence

StockFetcher Forums · Filter Exchange · Need a little help, Please<< >>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.