/// <summary> /// Creates the plots for the data to be added to. /// </summary> public override void CreatePlots() { base.CreatePlots(); PlotSeries plot = new PlotSeries("line"); PlotSeriesFlag plotFlag = new PlotSeriesFlag(); ChartPlots[ToString()] = plot; ChartPlots[ToString() + "label"] = plotFlag; }
/// <summary> /// Adds data to the created plots for the indicator at the current bar. /// </summary> /// <param name="currentBar"></param> public override void AddToPlots(int currentBar) { base.AddToPlots(currentBar); PlotSeries plot = (PlotSeries)ChartPlots[ToString()]; PlotSeriesFlag plotFlag = (PlotSeriesFlag)ChartPlots[ToString() + "label"]; long ticks = UtilityMethods.UnixTicks(Data.Dates[currentBar]); plot.PlotData.Add(new List <object>() { ticks, FifthWaveValue[currentBar] > 0.0 ? (object)Math.Round(FifthWaveValue[currentBar], 2) : null }); if (WaveLabels[currentBar] != null) { plotFlag.PlotData.Add(new Dictionary <string, object>() { { "x", ticks }, { "title", WaveLabels[currentBar].Label } }); } }