StockFetcher Forums · Filter Exchange · Counting 2 events simultaneously...<< >>Post Follow-up
siliconhippy
37 posts
msg #34298
Ignore siliconhippy
12/9/2004 7:57:52 PM

I am trying to count the number of days when BOTH the volume and close is above previous days', but the count multiply is erroneous.

Fetcher[ set{v, volume above volume 1 day ago}
set{p, close above close 1 day ago}
set{pv, p*v}

show stocks where ema(10) crossed above ema(50) within the past 30 days
and count(pv,10) is above 6
]




cegis
235 posts
msg #34341
Ignore cegis
12/12/2004 6:34:19 PM

siliconhippy,

VERY CLOSE!

What you need is the count() function in the set commands:

Fetcher[ set{v, count(volume above volume 1 day ago,1)}
set{p, count(close above close 1 day ago,1)}
set{pv, p*v}

show stocks where ema(10) crossed above ema(50) within the past 30 days
and count(pv equals 1,10) is above 6
]



The count() makes the values of p and v zero (false) or one (true), so pv will now be zero (either/both false) or one (both true).

HTH,

C


siliconhippy
37 posts
msg #34345
Ignore siliconhippy
12/12/2004 10:04:38 PM

thx again. Now this shows why we need good documentation, that not only states the commands, but TIPs the users too about pitfalls.

siliconhippy


StockFetcher Forums · Filter Exchange · Counting 2 events simultaneously...<< >>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.