public WilsonRSIChannel(DataSeries ds, int rsiperiod, int smoothperiod, double cord, string description) public static WilsonRSIChannel Series(DataSeries ds, int rsiperiod, int smoothperiod, double cord)
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() { DataSeries ds = Close; int rsiPer = 21; int emaPer = 1; DataSeries obought = WilsonRSIChannel.Series(ds, rsiPer, emaPer, 70); DataSeries nzu = WilsonRSIChannel.Series(ds, rsiPer, emaPer, 55); DataSeries nzl = WilsonRSIChannel.Series(ds, rsiPer, emaPer, 45); DataSeries osold = WilsonRSIChannel.Series(ds, rsiPer, emaPer, 30); PlotSeriesDualFillBand(PricePane, obought, nzu, Color.LightGray, Color.Blue, Color.LightGray, LineStyle.Solid, 1); PlotSeriesDualFillBand(PricePane, osold, nzl, Color.LightBlue, Color.LightBlue, Color.LightBlue, LineStyle.Solid, 1); ChartPane rsiPane = CreatePane( 50, false, true ); PlotSeries(rsiPane, RSI.Series(Close, rsiPer), Color.Blue, LineStyle.Solid, 2); SetPaneMinMax( rsiPane, 30, 80 ); int b = Bars.Count - 1; double[] rect = { b, 55, b, 70, 0, 70, 0, 55 }; DrawPolygon(rsiPane, Color.LightGray, Color.LightGray, LineStyle.Invisible, 1, true, rect); double[] rect2 = { b, 30, b, 45, 0, 45, 0, 30 }; DrawPolygon(rsiPane, Color.LightBlue, Color.LightBlue, LineStyle.Invisible, 1, true, rect2); HideVolume(); } } }