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
|
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!
|