Stock BUY & SELL Trading Strategy Using Stochastic RSI & Python

randerson112358
4 min readOct 11, 2021

Stochastic RSI Using Python

In this article, I will use the Stochastic Relative Strength Index (StochRSI) and the python programming language to determine when to buy and sell stock.

What Is Stochastic RSI ?

According to Invetopedia, the Stochastic RSI (StochRSI) is an indicator used in technical analysis that ranges between zero and one (or zero and 100 on some charting platforms) and is created by applying the Stochastic oscillator formula to a set of relative strength index (RSI) values rather than to standard price data.

According to Tradingsim.com, “The Stochastics oscillator measures price momentum and is based on the closing price as defined by the back period. While the Stochastic RSI, on the other hand, measures the momentum of the RSI and is based on the closing price of RSI, relative to the user-defined high and low range from the RSI’s look back period”.

A stochastic RSI value above 0.8 (or 80 depending on the platform) is considered overbought and hence may signal a good time to sell, which a values below 0.2 (or 20 depending on the platform) is considered over sold and hence may signal a good time to buy.

BUY when Stochastic RSI is below 0.2
SELL when…

--

--