StockFetcher Forums · General Discussion · code help needed for using weekly data<< >>Post Follow-up
kraalarw
18 posts
msg #160330
Ignore kraalarw
5/19/2023 4:29:43 PM

Hi, I would appreciate any help with creating stockfetcher code for weekly data. Specifically, I'm wanting the filter to find symbols where the Weekly High/Low range is above and below the MA(50) for the previous week, and also the current week.
Note: I'm not concerned about where the closing price for each week is in relation to the MA(50); only that the Weekly High is above the MA(50), and the Weekly Low is below the MA(50) for previous week and also the current week.

Here is my attempt at writing the code for these parameters:

weekly high 1 week ago >= weekly MA(50) 1 week ago
and weekly low 1 week ago <= weekly MA(50) 1 week ago
and weekly high of current week >= weekly MA(50)
and weekly low of current week <= weekly MA(50)
and price above 5
and volume above 500000
and chart-display is weekly
and chart-time is 80 weeks
and draw weekly MA(50)
and not ETF

Thank you in advance for any help with this.


nibor100
1,008 posts
msg #160334
Ignore nibor100
5/22/2023 4:58:09 PM

You are very close, all you have to do is remove the 2 instances of
"of current week"
from your filter, as shown below:
Ed S.
(Note you are measuring against a 50 week moving average, whereas a 50 day moving avg translates to a 10 week mov avg.)

Fetcher[
weekly high 1 week ago >= weekly MA(50) 1 week ago
and weekly low 1 week ago <= weekly MA(50) 1 week ago
and weekly high >= weekly MA(50)
and weekly low <= weekly MA(50)
and price above 5
and volume above 500000
and chart-display is weekly
and chart-time is 80 weeks
and draw weekly MA(50)
and not ETF
]



StockFetcher Forums · General Discussion · code help needed for using weekly data<< >>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.