public RAVI(DataSeries ds, int periodFast, int periodSlow, bool useSMA, bool useAbsolute, string description) public static RAVI Series(DataSeries ds, int periodFast, int periodSlow, bool useSMA, bool useAbsolute)
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using Community.Indicators;namespace WealthLab.Strategies { public class RAVI_ : WealthScript { protected override void Execute() { var ravi = RAVI.Series(Close, 7, 65, true, true); ChartPane p = CreatePane(30, false, false); HideVolume(); PlotSeries(p, ravi, Color.Black, LineStyle.Solid, 3); DrawHorzLine(p, 3, Color.Blue, LineStyle.Dashed, 1); DrawHorzLine(p, -3, Color.Red, LineStyle.Dashed, 1); for(int bar = 1; bar < Bars.Count; bar++) { SetSeriesBarColor(bar, ravi, (ravi[bar] > ravi[bar-1]) ? Color.Green : Color.Red); } } } }