Stochastic
Stochastic (the stochastic oscillator) is an oscillator from 0 to 100 that shows where a bar closed relative to the high and low of the chosen period. Scalpers watch it to see whether the price is pressing against an edge of the recent range and how that position changes from bar to bar.
Stochastic is drawn in a separate area below the chart.
How it is calculated
- Fast %K = 100 × (Close − lowest Low) / (highest High − lowest Low), where the highest and lowest values are taken over %K period bars.
- %K is a simple moving average (SMA) of fast %K over %K smoothing bars. With a value of 1 there is no smoothing, and %K equals fast %K.
- %D is a simple moving average of %K over %D period bars.
If High and Low of all bars in the period are equal (the price stood still), fast %K is undefined — the lines have a gap until that bar leaves the smoothing window. The horizontal levels 80 and 20 are drawn as guides; they do not affect the calculation.
Parameters
| Parameter | Description | Default |
|---|---|---|
| %K period | How many bars the highest and lowest values are taken over. | 14 |
| %K smoothing | The simple average period that smooths fast %K. | 1 |
| %D period | The simple average period of the %D line. | 3 |
Plots
| Parameter | Description | Default |
|---|---|---|
| %K | The %K line. | Blue, solid, width 1 |
| %D | The %D line. | Purple, dashes, width 1 |
Levels
| Parameter | Description | Default |
|---|---|---|
| Upper | The upper horizontal level. | 80, orange |
| Lower | The lower horizontal level. | 20, orange |
Style
Each line has the Plot (show the line), Label (show the last value on the right scale), Color, Width (1–5) and Style (Solid, Dashes, Dots) fields.
Each level has the Show, Value, Color, Width and Style fields. A visible level shows its value on the right scale.
How to add an indicator to the chart is described in Adding an indicator; parameters are changed in the indicator manager.