compren 8 posts msg #160489 - Ignore compren modified |
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:
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.
|
xarlor 587 posts msg #160490 - Ignore xarlor |
8/6/2023 12:23:52 PM
From page 142 of the StockFetcher Manual, emphasis mine:
Chart-Display
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:
|