public SARSI(DataSeries ds, int period, double multiplier, string description) public static SARSI Series(DataSeries ds, int period, double multiplier)
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); } } } } }