- ago
Lets say y want to keep track of the number of lows in volume that a stock has made in 10 days.

How would I do that?

in wl6 it was a new sum dataseries where every time something happened one could add one and then you just looked up at the last 10 observations of that but I don't know how to do that here.

Thanks.

0
188
5 Replies

Reply

Bookmark

Sort
Cone8
 ( 24.61% )
- ago
#1
CODE:
         TimeSeries ts = new TimeSeries(bars.DateTimes, 0);          // do something to add 1's to ts                    // 10-period sum          ts = ts.Sum(10);

Like Abs(), it's a TimeSeries member... but is conspicuously missing from the QuickRef! We'll have to fix that.
0
- ago
#2
QUOTE:
TimeSeries member... but is conspicuously missing from the QuickRef!

Well, technically you are correct. The "member method" (as shown in the above example) is not documented. But the "static method" is documented.

CODE:
TimeSeries tsSum = TimeSeries.Sum(ts, 20);
I guess I like the static method approach better. It looks more like how C language does it. (I'm old school.)
0
- ago
#3
Thank you very much for prompt reply.

Maybe you can organize two titles for discussion? One colloquial and one technical which you all decide on after the chat has decanted through some iterations?

Just a suggestion.
0
- ago
#4
QUOTE:
Maybe you can organize two titles for discussion? One colloquial and one technical which you all decide on after the chat has decanted through some iterations?

Let's not complicate things beyond necessity (Occam's razor principle). And we refine topic titles straight in the process, while looking at it, not "after" when it will be lost in an endless queue of issues and tasks.
2
- ago
#5
I did not realize you improve on the fly. It was a suggestion on my terrible title.

Best. Thank you.
0

Reply

Bookmark

Sort