Home  ›  block algo flex  ›  Documentation  ›  Stochastic

Stochastic

Stochastic Oscillator

Note: This is the standard Stochastic Oscillator, not Stochastic RSI. These are different indicators — do not confuse them.

The Stochastic Oscillator compares the closing price to the price range over a specified period, helping identify overbought/oversold conditions and potential reversals.

How it works: The indicator produces two lines: %K (the main line) and %D (a moving average of %K). Values oscillate between 0 and 100. A reading below 20 suggests the asset is oversold; above 80 suggests overbought.

Resources: TradingView Stochastic docs

Settings in block algo flex

SettingDescriptionDefault
Use Stochastic?Enable/disable the indicatorOff
%K LengthLookback period for %K calculation14
%K SmoothingSmoothing applied to the %K line (1 = no smoothing)1
%D SmoothingMoving average period for the %D line3
TimeframeTimeframe for calculationChart
Buy K Condition%K threshold for buy (e.g., "Less Than 20")Less Than 20
Sell K Condition%K threshold for sell (e.g., "Greater Than 80")Greater Than 80
Buy ConditionCrossover event (e.g., %K crosses above %D)Crossover
Sell ConditionCrossunder event (e.g., %K crosses below %D)Crossunder

How to Interpret

  • %K < 20 — Oversold zone; watch for bullish crossover
  • %K > 80 — Overbought zone; watch for bearish crossover
  • %K crosses above %D — Bullish signal
  • %K crosses below %D — Bearish signal

Pro Tip: The Stochastic works best in range-bound markets. In strong trends, the oscillator can stay in overbought or oversold territory for extended periods. Combine it with a trend indicator (ADX, EMA Price) to avoid trading against the dominant trend.

This is a static view of a single section. For full search and interactivity visit the docs app. Open interactive docs →