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
| Name | Type | Description |
|---|---|---|
sourceoptional | series default close | Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9). |
periodoptional | int default 10 | Cycle / stochastic period. |
fastoptional | int default 23 | MACD fast EMA. |
slowoptional | int 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