Write scanner for Stochastic RSI and Simple Moving Average


Active member
2019 Donor
Hi Everyone, just wondering if it is possible write this simple code for the trade setup below

Objective is to find those stocks that pullbacks to test the moving average before rebounding up. This is the scenario i have thought of,

Time frame used : Daily Time Frame

Indicators used : 20Day and 40Day Simple Moving Averages

Lower indicator : Stochastic RSI (SRSI)

Stocks to have at least 6 months of uptrend, 20MA above 40MA


Buy Signal A : When Stock price pullbacks and touches the 20MA and the Stochastic RSI indicator is in the oversold region . A warning signal is generated.

Trigger Signal, when the next Day's Price breaks above the Previous Day's HIGH

or Stochastic RSI indicator CUTS above the 20% mark, A BUY Signal is created

Sell Signal : When SRSI indicator CUTS below the 80 % mark, a SELL signal is created

Thank you
Last edited by a moderator:


Well-known member
@Nick Please refer to How toDrive the Scanner in the Tutorial Section. There are also 2 videos in there. You should be able to build it from there OR at least know how difficult it may be. Sorry that I can't be of more help.

Similar threads