StochasticOscillator
Extends
BaseBarsIndicator The is a momentum indicator that compares a security’s closing price to its price range over a specific time period. This indicator is shown as two lines on a chart:
- %K, which is the main line representing the level of the Stochastic Oscillator.
- %D, which is a moving average of %K and typically displayed as a dotted line. The Stochastic Oscillator provides signals for buying and selling:
- Buy Signal: When either %K or %D falls below a certain threshold (e.g., 20) and then climbs back above it.
- Sell Signal: When the Oscillator rises above a higher threshold (e.g., 80) and then drops below it.
These levels indicate overbought or oversold conditions and suggest potential price reversals. The calculation of the Stochastic Oscillator involves several steps:
RawK = 100 * (Close - Lowest(Low, RawPeriod)) / (Highest(High, RawPeriod) - Lowest(Low, RawPeriod))
%K = SMA(RawK, KPeriod)
%D = SMA(%K, DPeriod)
RawKcalculates the raw Stochastic value.%Ksmooths this value using a Simple Moving Average (SMA) overKPeriod.%Dthen takes an SMA of %K overDPeriodto provide a signal line.
Constructor
The default constructor will set the rawPeriod = 14, kPeriod = 3, dPeriod = 3 |
Presentation |
Properties
| Name | Type | Description |
|---|---|---|
| historyCapacity inherited from | number | The maximum history held by the indicator. As new data comes in only this many points are kept. |
| historyCount inherited from | number | The number of historical points currently held by the indicator. Will never be larger than |
| last inherited from | T | |
| values inherited from | T[] |
Methods
add()inherited from | ||||||
|---|---|---|---|---|---|---|
| No documentation has been provided. | ||||||
Presentation | ||||||
Parameters
Returns
|