'How to specify a window size by rows instead of DURATION in DolphinDB?

Does the parameter window of wj function only support duration type? How should I approach it if I want to select by rows?

M data are all based on trading days. Data in a duration type window will be NULL if it's weekends or holidays. I'm now using moving for backward sliding windows. Any functions for forward sliding windows, like moving(fun, X, -n)?



Solution 1:[1]

Currently, wj function only supports duration type. There are two types of high-order functions: window and twindow that were introduced for forward sliding window calculations.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jinwandalaohu