-
Notifications
You must be signed in to change notification settings - Fork 0
/
avg.lmavg.pd
65 lines (65 loc) · 1.67 KB
/
avg.lmavg.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#N canvas 488 23 555 516 10;
#X obj 179 105 t f b;
#X obj 105 128 list;
#X obj 180 24 inlet;
#X obj 105 19 inlet;
#X obj 105 426 outlet;
#X obj 105 150 list split \$1;
#X obj 180 72 f \$1;
#X obj 105 297 list-abs/list-mult;
#X text 181 368 BREAKING DOWN 'Linearly Weighted Moving Average' For
example \, in a 15-day linearly-weighted moving average \, today's
closing price is multiplied by 15 \, yesterday's by 14 \, and so on
until day 1 in the period's range is reached. These results are then
added together and divided by the sum of the multipliers (15 + 14 +
13 + ... + 3 + 2 + 1 = 120).;
#X obj 241 327 list-abs/list-accum;
#X obj 105 328 list-abs/list-accum;
#X obj 105 387 /;
#X obj 217 231 list append;
#X obj 217 150 until;
#X obj 217 172 f;
#X obj 248 174 + 1;
#X obj 292 174 sel 0;
#X obj 296 231 t l;
#X msg 292 194 0;
#X obj 217 208 + 1;
#X obj 218 105 t f f b;
#X obj 209 270 list split \$1;
#X obj 248 195 mod \$1;
#X obj 191 45 loadbang;
#X text 184 467 megrimm 2016;
#X connect 0 0 5 1;
#X connect 0 1 1 1;
#X connect 1 0 5 0;
#X connect 2 0 6 0;
#X connect 3 0 1 0;
#X connect 5 0 1 1;
#X connect 5 0 7 0;
#X connect 5 2 1 1;
#X connect 6 0 0 0;
#X connect 6 0 20 0;
#X connect 7 0 10 0;
#X connect 9 0 11 1;
#X connect 10 0 11 0;
#X connect 11 0 4 0;
#X connect 12 0 17 0;
#X connect 12 0 21 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 14 0 19 0;
#X connect 15 0 22 0;
#X connect 16 0 13 1;
#X connect 16 0 18 0;
#X connect 17 0 12 1;
#X connect 18 0 14 1;
#X connect 19 0 12 0;
#X connect 20 0 13 0;
#X connect 20 1 22 1;
#X connect 20 1 21 1;
#X connect 20 2 12 1;
#X connect 21 0 9 0;
#X connect 21 0 7 1;
#X connect 22 0 14 1;
#X connect 22 0 16 0;
#X connect 23 0 6 0;