StockFetcher Forums · General Discussion · Weekly Measures - Why Doesn't this Work?<< >>Post Follow-up
8 posts
msg #160489
Ignore compren
8/6/2023 12:01:16 PM

Just trying to accomplish something simple, show me a 30-week moving average on a daily chart, and "count" every day that the close of the day is above that level. Here is my code:

Fetcher[apply to symlist(wbd)
draw weekly ma(30)

close crossed above weekly ma(30)

set{buy,count(close above weekly ma(30),1)}
draw buy

The results are counting days where the close was below Weekly MA(30), sometimes for months. I'm sure this has something to do with the whole weekly measure thing, but seems like it shouldn't be this hard to accomplish.

565 posts
msg #160490
Ignore xarlor
8/6/2023 12:23:52 PM

From page 142 of the StockFetcher Manual, emphasis mine:

Chart-display is a very specific phrase that tells a chart to be converted to weekly mode. Like the other chart options, this does not affect screening results; instead it provides another way to draw the chart. By telling StockFetcher to place the chart in weekly mode, all of the plots, including price, are converted to the appropriate weekly values. Any measures or indicators that were a part of the screen are also converted to their weekly counterpart. As an example, below is a screen that looks for a 10 and 50 day moving average crossover.

MA(10) crossed above the MA(50)

Adding the phrase chart-display is weekly to this screen doesn’t affect the individual matches; however, it does convert our averages from 10 and 50 day to 10 and 50 week averages.

The new example is:

MA(10) crossed above the MA(50)
and chart-display is weekly

While providing the ability to analyze weekly charts, this addition can be confusing when verifying that a particular condition occurred. Therefore, it is important to be careful when using weekly charts.

As such your filter should be:

chart-display is weekly
chart-time 6 months

draw ma(30)

set{buy,count(close above ma(30),1)}
draw buy

StockFetcher Forums · General Discussion · Weekly Measures - Why Doesn't this Work?<< >>Post Follow-up

*** Disclaimer *** 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. does not recommend particular securities., 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.