Skip to content
All library documents

Stochastic Oscillator Reversals with Percentage Stop and Target Exits

Article TradingView scripts

Summary

The document describes a long-only strategy built around crossovers in the Stochastic Oscillator. It smooths %K and %D, enters when %K crosses above %D while %K is below 20, and exits either when price reaches a percentage stop or target measured from the entry price, or when %K crosses below %D above 60. The stop and target are configurable, with defaults of 2.5% and 6%, respectively. The script is structured as a TradingView strategy, so its rules can be evaluated in the platform’s historical Strategy Tester.

The accompanying explanation identifies possible tester measures such as net profit, closed trades, profitable-trade percentage, and maximum drawdown, but it supplies no actual test results or asset-specific evidence. There is also a difference between the prose and implementation: the prose says both oscillator lines must be below 20 for entry, while the code checks only %K; similarly, the prose describes an overbought exit above 70, while the code uses a threshold above 60. Those thresholds and results should be checked against the implemented rules and the chosen market and timeframe.

Key ideas

  • The long entry occurs when smoothed %K crosses above %D with %K below 20.
  • The strategy exits using a fixed percentage stop, a fixed percentage target, or a bearish oscillator crossover.
  • The implemented bearish exit threshold is above 60, despite accompanying prose referring to a higher level.
  • The entry code checks %K alone, although the explanation says both oscillator lines must be below the threshold.
  • The document describes backtesting metrics but reports no measured performance or validation.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.