using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Color Bars of the indicator based on oversold/overbought levels DataSeries rsi = RSI.Series( Close, 14 ); ChartPane rsiPane = CreatePane( 60, true, true ); PlotSeries( rsiPane, rsi, Color.Gray, WealthLab.LineStyle.Solid, 2 ); for(int bar = 50; bar < Bars.Count; bar++) { if ( rsibar > 70 ) SetSeriesBarColor( bar, rsi, Color.Red ); else if ( rsibar < 30 ) SetSeriesBarColor( bar, rsi, Color.Blue ); else SetSeriesBarColor( bar, rsi, Color.Transparent ); } } } }