Log in to see Cloud of Tags

Wealth-Lab Wiki

SARSI (Self-Adjusting RSI)



public SARSI(DataSeries ds, int period, double multiplier, string description) public static SARSI Series(DataSeries ds, int period, double multiplier)

Parameter Description

dsThe source DataSeries
periodRSI lookback period
multiplierConstant multiplier


David Sepiashvili's Self-Adjusting RSI from February 2006 Traders' Tips (Stocks & Commodities magazine) presents a technique to adjust the traditional RSI overbought and oversold thresholds to ensure that 70-80% of RSI values lie between the two thresholds. Wealth-Lab's calculation is based on an algorithm by Sepiashvili which adjusts the thresholds based on a simple moving average of the RSI.


The demo Strategy below uses the traditional RSI rules, going long when the RSI indicator crosses over its lower benchmark and exiting when it crosses below the upper benchmark.

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using TASCIndicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { RSI rsi = RSI.Series( Close,50 ); SARSIUpper saru = SARSIUpper.Series( Close,50,2.0 ); SARSILower sarl = SARSILower.Series( Close,50,2.0 ); ChartPane rsiPane = CreatePane( 40,true,true ); PlotSeries( rsiPane, rsi, Color.DarkBlue, LineStyle.Solid, 2 ); PlotSeriesFillBand( rsiPane, saru, sarl, Color.Silver, Color.Transparent, LineStyle.Solid, 2); for(int bar = GetTradingLoopStartBar(50 * 3); bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CrossUnder(bar, rsi, saru) ) SellAtMarket(bar+1, LastPosition); } else { if( CrossOver(bar, rsi, sarl) ) BuyAtMarket(bar+1); } } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

ScrewTurn Wiki. Some of the icons created by FamFamFam.