Honey31 10 posts msg #161618 - Ignore Honey31 |
3/8/2025 2:15:22 PM
Is it possible to get WTD, MTD,QTD,YTD in Stockfetcher
|
Mactheriverrat 3,166 posts msg #161619 - Ignore Mactheriverrat |
3/8/2025 2:57:43 PM
Seems MTD is the only that's in Stockfetchers feed.
|
TheRumpledOne 6,498 posts msg #161630 - Ignore TheRumpledOne |
3/9/2025 5:26:56 PM
StockFetcher Usage Guide
140
Weekly
By default, all of the measures on StockFetcher are computed using daily data. This means that an
MA(10) would use 10 days of price information to compute one moving average value. On
StockFetcher, it is possible to switch from daily information to weekly by simply adding the
keyword weekly in front of any measure. The following example is a filter using a couple of
weekly moving averages.
Show stocks where the weekly MA(10) crossed above the
weekly MA(50)
Now, when the phrase weekly MA(10) is used, ten weekly price points are used to compute a
single value. On StockFetcher, the weekly price and volume components are computed as
follows:
- weekly close: the last daily close for the week
- weekly open: the first daily open for the week
- weekly high: the highest traded price during the week
- weekly low: the lowest trading price during the week
- weekly volume: the sum of all shares traded during the week
Using the definitions above, a weekly MA(10) would then be computed using weekly closing
values from the previous ten weeks.
|
TheRumpledOne 6,498 posts msg #161631 - Ignore TheRumpledOne |
3/9/2025 5:29:14 PM
|
TheRumpledOne 6,498 posts msg #161632 - Ignore TheRumpledOne modified |
3/9/2025 5:34:17 PM
MONTHLY is NOT working.
|
lorypanna 32 posts msg #161633 - Ignore lorypanna modified |
3/9/2025 6:11:57 PM
My contribution, FWIW.
Notes:
- xTD: the filter uses the Open at the beginning of the period 'x' and the Close at the end of the period 'x' (the current / last Close unless 'offset' is greater than zero); maybe this is not the 'correct' way to calculate xTD
- Don't think QTD can be calculated, unless there's some way to identify 'start of Quarter' 's Open
I'm interested to understand what is the 'correct' or 'generally used / accepted' way to calculate xTD.
Cheers from italy.
|
TheRumpledOne 6,498 posts msg #161641 - Ignore TheRumpledOne |
3/10/2025 11:34:03 AM
Nice work, lorypanna.
Please share this in the WHAT I HAVE LEARNED thread.
|
nibor100 1,067 posts msg #161682 - Ignore nibor100 |
3/13/2025 1:16:12 PM
@lorypanna,
To answer your question about way to calculate "xTD":
Your method is one of the commonly used ways another is
set{MyMOpen1, date(MONTHSTART, open)}
set{MyMTD1, close divided by MyMOpen1}
set{MyMTDP1001, MyMTD1 minus 1}
add column MyMTDP1001 multiply by 100 {MTD%}
Hope this helps,
Ed S.
|
lorypanna 32 posts msg #161683 - Ignore lorypanna |
3/13/2025 6:49:33 PM
@nibor100
Thank you, Ed S.
From what I see, you're confirming my result but doing the calculation in a different way: [ (a - b) / b ] = [ (a / b) - 1 ]. That's good to know for myself.
JFI, I explain why I asked the question: in past I found some traders / platforms that used as the reference price of xTD not the [ open at x ] but the [ close at (x - 1) ], that is the close of the previous candlestick (FWIW, some AI engines confirm this). I understand that the difference often is not so 'important', but I just wanted to clarify to myself if the calculation I'm doing is at least 'common' / 'reasonable' ...
Something new I learned: didn't know I can made a calculation directly in the 'add column' command.
Thanks again and cheers from Italy. lorypanna
|
nibor100 1,067 posts msg #161703 - Ignore nibor100 |
3/16/2025 11:29:05 AM
You can even use an add column command to filter the results, for example:
add column MyMTDP1001 multiply by 100 greater than -2 {MTD%}
Ed S.
|