The Stochastic Oscillator technical indicator compares where a security’s price closed relative to its price range over a given time period.
The Stochastic Oscillator is displayed as two lines. The main line is called %K. The second line, called %D, is a Moving Average of %K. The %K line is usually displayed as a solid line and the %D line is usually displayed as a dotted line.
There are several ways to interpret a Stochastic Oscillator. Three popular methods include:

Stochastic Oscillator
Calculation:
The Stochastic Oscillator has four variables:
The formula for %K is:
%K = (CLOSE-LOW(%K))/(HIGH(%K)-LOW(%K))*100
where:
The %D moving average is calculated according to the formula:
%D = SMA(%K, N)
where:
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/50
Standard Deviation (StdDev)
The Standard Deviation (StdDev) measures the market volatility. This indicator charactrizes the scale of price changes relating to the Moving Average.
Relative Vigor Index (RVI)
The main point of the Relative Vigor Index Indicator (RVI) is that on the bull market the closing price is, as a rule, higher, than the opening price.
Ultimate Oscillator
The Ultimate Oscillator was developed by Larry Williams. It uses the averaging of three oscillators with different periods.
Volumes
The Volumes indicator shows volumes with different colors depending on the volume changes.