I think there are a lot of sample apps here regarding e.g. moving average. It's best to just search for all docs and threads using the search function, looking to the right, "More like this", I just have seen this thread which looks like a nice sample:
Hope this helps,
Thank you, Stefan.
I know rangeavg, and so on for other standard statistics. What I want is to construct my personal range*** function with other kind of statistic (not standard statistic). I though if I had the code of rangeavg, for example, it would be possible for me to construct my own range function.
Sorry, you do not answer my question but it's very nice of you.
Yes, I never assumed that I answered your question, honestly, I am still unsure what you are after.
It sounds to me that you are well aware of the QV functions, also of the possibilities that e.g. set analysis offers for point in time analysis, which can also be used for moving averages, if moving is describing a calculation over a certain period in time or a certain set of values more generally speaking.
I just noticed in your OP that you are looking for some macro code (.. in the module part...), sorry I missed that before.
Are you aware of the API documentation? I assume yes.
Hm, I am not aware of any existing macro samples like you requested, so I am probably not able to help you further, unless you may want to share more information on what exactely you want to achieve. If you don't really need the advanced statistics calculation be done during runtime, I would guess that doing it would probably easier and better to do outside QV.
And last, I have heard - but never tried myself - that there is an experimental integration of R into QV, not sure if this is true or I mixed something up, but it maybe worth to look into that too.
Have a nice weekend,