StockFetcher Forums · General Discussion · Touching quarter to date moving average & bouncing up<< >>Post Follow-up
nainil
10 posts
msg #161497
Ignore nainil
12/19/2024 6:30:59 PM

I'm trying to get stocks that touched the 90 day moving average and then the next day candle closed higher. This isn't giving me enough results. What would the right stockfetcher code look like for such results:

/* Define the moving average period */
set{ma_period, 90}

/* Show stocks touching the moving average */
close near ma(ma_period)

/* Ensure the stock price bounced up the next day */
and close > close 1 day ago
and close 1 day ago near ma(ma_period)

/* Display the moving average for reference */
add column ma(ma_period)

/* Optional: Add price and volume filters */
and close > 10
and average volume(30) > 100000

/* Optional: Sort by percentage change on the bounce day */
sort by 100 * (close - close 1 day ago) / close 1 day ago descending


nibor100
1,045 posts
msg #161500
Ignore nibor100
12/19/2024 9:38:19 PM

You'll get more results if you remove your avg volume requirement, and/or lower the price minimum and especially if you look at results from prior days, say more than a week ago. As there are more opportunities for your bounce day to be up when the overall market has been rising.....
Ed S

xarlor
587 posts
msg #161501
Ignore xarlor
12/20/2024 9:00:29 AM

Fetcher[
/* Touched MA(90) then bounced above it */
low 2 days ago > ma(90) 2 days ago
low 1 day ago < ma(90) 1 day ago
close > open
close > close 1 day ago
close > ma(90)

/* Limit the universe of tickers */
close > 10
average volume(30) > 100,000

/* Sort by percentage gain close-to-close */
set{Pup1,close / close 1 day ago}
set{Pup2,Pup1 - 1}
set{Pup,Pup2 * 100}
add column Pup {Percentage up}
sort column 5 descending
]



nainil
10 posts
msg #161502
Ignore nainil
12/20/2024 3:25:44 PM

Thank you very much -- this is exactly what I was looking for!

StockFetcher Forums · General Discussion · Touching quarter to date moving average & bouncing up<< >>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.