# Stochastic

​"Stochastic", developed by George Lane in 1957, is an algorithm that determines the overbought and oversold points of a market and compares the closing price on the market with the highest and lowest price values ​​it has received within a selected period.
Stochastic consists of two lines known as K% and D% that fluctuate between 0 and 100 values. The region below 20 is considered the oversold region, and the region above 80 is considered the overbought region. The period recommended by George Lane for K% is 14 days, while for D% it is 3 days. However, some investors use 9% of K% and 5 days for D%.
• The K% line is found by subtracting the latest closing price from the lowest closing price in the period, dividing the result by the difference between the highest and lowest closing prices in the period, and multiplying by 100.
• K% = 100 x [last close - lowest close(p)] / [highest close(p) - lowest close(p)]
• p = number of periods determined for %K
• The D% line is calculated by averaging the K% values ​​over the specified period. In other words, K% values ​​are found by adding up and dividing by the number of periods.
• D% = (K% + K% + K% + … n) / n
• n: Number of periods specified for %D When the indicator lines fall below 20, that is, when it enters the oversold region, it is interpreted as a possible buy signal by interpreting that the current price movement will change direction.
When the indicator lines rise above 80, that is, when it enters the overbought zone, it is interpreted as a possible sell signal by interpreting that the current price movement will change direction.
When the indicator lines cross the 20 band upwards, it is interpreted as a buy signal, and if the indicator lines cross the 80 band downwards, it is interpreted as a sell signal.
If the K% line crosses above the D% line in the oversold region, it is a buy signal for traders. If the K% line crosses below the D% line in the overbought zone, it is a sell signal for traders.
If the bottoms and tops of the market's price action are not aligned with the bottoms and tops of the "Stochastic" indicator, a mismatch occurs. According to this; If it creates falling lows in price action and rising lows in the indicator, it is a buy signal. Conversely, if it is forming rising highs in the price action while the indicator is forming falling highs, it is a sell signal.
​In order to easily obtain Stochastic detections, you can create Alerts or Custom Signals through the Coinlegs system, and start autotrading bots on LegsBot by using the alerts you create.