Code Amibroker Indicators

StochRSI with Oversold and Overbrought Zone for Amibroker

by admin December 28, 2018 2 min read 0 comments

Key Takeaways

  • Market conditions and their impact on trading decisions
  • Key levels and price action analysis
  • Risk management strategies for this setup

The StochRSI is an indicator used in technical analysis that ranges between zero and one and is created by applying the Stochastic Oscillator formula to a set of Relative Strength Index (RSI) values rather than standard price data.

In this formula the overbought and oversold zones are highlighted. There is also a configurable separator to show date boundaries.

_SECTION_BEGIN(“StochRSI”);
RSIperiods = Param( “RSIperiods”, 10, 1, 100, 1 );
Stochperiods = Param( “Stochperiods”, 10, 1, 100, 1 );
sep = ParamList( “Separator Interval”, “Day|Week|Month|Year”, 0 );
Kperiods = Param( “Kperiods”, 3, 1, 50, 1 );
Dperiods = Param( “Dperiods”, 3, 1, 50, 1 );
OBthreshold = Param( “OBthreshold”, 80, 55, 100, 5 );
OSthreshold = Param( “OSthreshold”, 20, 0, 50, 5 );
switch( sep ) { case "Day": dn = Day(); dn1 = inDaily; break; case "Week": dw = DayOfWeek(); newWeek = dw < Ref( dw, -1 );; newYear = Year() != Ref( Year(), -1 ); dn = weekNumber = Sum( newWeek, BarsSince( newYear ) + 1 ); dn1 = inWeekly; break; case "Month": dn = Month(); dn1 = inMonthly; break; case "Year": dn = Year(); dn1 = inYearly; break; } separator = dn != Ref( dn, -1 ); Plot( separator, "", colorDarkBlue, styleHistogram | styleOwnScale | styleNoLabel | styleNoRescale, 0, 1, 0, -2, 5 ); TheRSI = RSI( RSIperiods ); llRSI = LLV( TheRSI, Stochperiods ); hhRSI = HHV( TheRSI, Stochperiods ); StochasticRSI = 100 * ( ( TheRSI - llRSI ) / ( hhRSI - llRSI + 0.00001 ) ); StocK_rsi = MA( StochasticRSI, Kperiods ); StocD_rsi = MA( StocK_rsi, Dperiods ); Plot( StocK_rsi, "StochK(" + Kperiods + ") of RSI(" + RSIperiods + ")", colorRed, styleLine | styleThick ); Plot( StocD_rsi, "StochD(" + Dperiods + ") of RSI(" + RSIperiods + ")", colorBlue, styleDashed | styleThick ); PlotGrid( OBthreshold, colorRed, 1 ); PlotGrid( OSthreshold, colorGreen, 1 );
_SECTION_END();

Trading Data Snapshot

Always verify current market conditions before executing any trade. Past performance does not guarantee future results.

A
admin
Trading analyst and market commentator with expertise in technical analysis, price action, and risk management. Dedicated to helping traders make informed decisions.

Leave a Reply