StockFetcher Forums · General Discussion · Total percent moved<< >>Post Follow-up
freshpotato
36 posts
msg #58062
Ignore freshpotato
12/13/2007 10:00:44 AM

Hello guys!

I want to figure this out, how to create a filter that tells me how many percent the last 1 month has moved, 2 months and 3 months and so on..

So for the first month it should be something like:
set {Mov1M,count(absolute day change,30)}

but how can I do for the month before without including this month..

Thanks
Tor L

TheRumpledOne
6,407 posts
msg #58071
Ignore TheRumpledOne
modified
12/13/2007 11:36:37 AM

Fetcher[
set{ close22, close 22 days ago}
set{ diff22, close - close22}
set{ pct22, round(diff22 multiplied by 100 ) / close22 }

add column pct22 { current month }
add column pct22 44 days ago {1 month ago}
add column pct22 66 days ago {2 months ago}

sort column 5 descending

market is nasdaq 100
]



Is this close enough?



nikoschopen
2,824 posts
msg #58072
Ignore nikoschopen
12/13/2007 11:46:23 AM

The count() should only be used when you want to see how many times such and such occurred within the x number of days. Use the sum() instead:

Fetcher[set {Mov1M,sum(day change,22)}]


OR

Fetcher[set {Mov1M,sum(weekly day change,4)}]


**Also you don't want to use the ABS function because this will return the negative value as positive.

how can I do for the month before without including this month??

Depending on how many days (or weeks) have elapsed for the current month, you can use the above example to find the cumulative change for the previous months. Suppose we're into the second week of the month. Here's a simple way to find last month's ROC.

Fetcher[set {Mov1M,sum(weekly day change,6) - sum(weekly day change,2)}]




StockFetcher Forums · General Discussion · Total percent moved<< >>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.