Handbook
Glossary
macd ( seq n1 n2 -- newseq )
Vocabulary
math
.
finance
Inputs
seq
a
sequence
n1
short number of periods
n2
long number of periods
Outputs
newseq
a
sequence
Word description
Returns the Moving Average Converge of the sequence, calculated by:
•
MACD[t] = EMA2[t] - EMA1[t]
Definition
USING:
kernel
math.vectors
;
IN:
math.finance
:
macd
( seq n1 n2 -- newseq )
rot
dup
ema
[
swap
ema
]
dip
v-
;