StockFetcher Forums · General Discussion · days out the the last 10 positive<< >>Post Follow-up
dashover
227 posts
msg #161941
Ignore dashover
8/15/2025 1:41:54 PM

How would you code

both raw number and %

Thanks!

dwiggains
447 posts
msg #161942
Ignore dwiggains
8/16/2025 9:37:04 AM

Fetcher[
set{b, close / close 1 day ago}
set{up, count(b > 1,10)}
add column up
set{up%, close / close 10 days ago}
add column up%
]



maybe get you started
see ya
david

nibor100
1,096 posts
msg #161943
Ignore nibor100
8/17/2025 11:52:56 AM

@dashover,

Since it is a 10 day period, simply divide the Up column number by 10 to get the % of days that were Up out of the last 10. i.e. Up =3 then 30% etc.

Ed S.

xarlor
610 posts
msg #161944
Ignore xarlor
8/18/2025 12:11:16 PM

dwiggains is defining "positive" as today's close higher than yesterday's close.

If instead you are defining positive as the traditional today's close is higher than today's open, see below.

Note: I cheated and multiplied by 10 to get the percentage as nibor intimated. The percentage only works for a 10-day look-back and will break if using a different length. It can be written to scale with other lengths, but would require a few more set statements.

Fetcher[
set{pos,count(close > open,10)}
set{pos_p,pos * 10}
add column pos{Days positive}
add column pos_p{Percentage of days positive}

/* Show only the last 10 days and which were positive. Remove this entire section if needed */
set{tick,count(close > open,1)}
draw tick
chart-time 10 days
]



StockFetcher Forums · General Discussion · days out the the last 10 positive<< >>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.