Home/Dovee/Function reference

stc

Schaff Trend Cycle

Reference/Oscillators/Function

stc(source, period, fast, slow)

MACD pushed through a stochastic, 0–100. Defaults period 10, fast 23, slow 50. Alias: schaff.

Parameters

NameTypeDescription
sourceoptionalseries
default close
Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9).
periodoptionalint
default 10
Cycle / stochastic period.
fastoptionalint
default 23
MACD fast EMA.
slowoptionalint
default 50
MACD slow EMA.

Return value

series

Short form: if the first argument is a number, Dovee uses close as the source.

Also accepted: schaff.

Example

oscillator
s = stc()
plot s as "STC"
level 75 as "OB" red
level 25 as "OS" green
when s crosses above 25 then buy

See also