当前位置: 首页>>代码示例>>C#>>正文


C# Controls.AddSeries方法代码示例

本文整理汇总了C#中Controls.AddSeries方法的典型用法代码示例。如果您正苦于以下问题:C# Controls.AddSeries方法的具体用法?C# Controls.AddSeries怎么用?C# Controls.AddSeries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Controls的用法示例。


在下文中一共展示了Controls.AddSeries方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: chartSignal

    protected override void chartSignal(Backtest.ProductBase product_, Controls.LineChartDataDisplay chart_)
    {
      chart_.ClearSeries();
      chart_.AddSeries(product_.Prices, "Prices", 40, "##0.0##");
      chart_.AddSeries(HelperMethods.GetRollingStat(product_.Prices, MA, Statistics.Average), "MA", 40, "##0.0##");

      var series = product_.Prices;

      var rollingStdev = HelperMethods.GetRollingStat(product_.Prices.ToReturns(), 252, x => Statistics.Stdev(x)*Math.Sqrt(252d));

      chart_.AddSeries(rollingStdev, "Stdev", 80,
        "##0.0#%");

      chart_.AddSeries(
        HelperMethods.GetRollingStat(rollingStdev, 252, x => HelperMethods.GetPercentRank(x, x.Length - 1)),
        "Stdev_Pctile", 120, "0.00");
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:17,代码来源:SimpleMA.cs

示例2: Chart

    public override void Chart(Controls.LineChartDataDisplay lcdd_, Backtest.ProductBase product_)
    {
      var pxs = product_.Prices;

      lcdd_.ClearSeries();
      lcdd_.AddSeries(pxs, string.Format("{0} price", product_.Name), 40, "##0.0##");

      if (MA1.HasValue)
        lcdd_.AddSeries(HelperMethods.GetRollingStat(pxs, MA1.Value, Statistics.Average),
          string.Format("MA({0})", MA1), 40, "##0.0##");

      if(MA2.HasValue)
        lcdd_.AddSeries(HelperMethods.GetRollingStat(pxs, MA2.Value, Statistics.Average),
          string.Format("MA({0})", MA2), 40, "##0.0##");

      if (MA3.HasValue)
        lcdd_.AddSeries(HelperMethods.GetRollingStat(pxs, MA3.Value, Statistics.Average),
          string.Format("MA({0})", MA3), 40, "##0.0##");
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:19,代码来源:MA.cs

示例3: chartSignal

 protected override void chartSignal(Backtest.ProductBase product_, Controls.LineChartDataDisplay chart_)
 {
   chart_.AddSeries(product_.Prices, "Prices", 40, "##0.0##");
   chart_.AddSeries(GenerateWeightSeries(product_, product_.Prices.Dates[0]), "Score", 80, "##0.0%");
 }
开发者ID:heimanhon,项目名称:researchwork,代码行数:5,代码来源:MAMutliWeighted.cs

示例4: chartSignal

 protected override void chartSignal(ProductBase product_, Controls.LineChartDataDisplay chart_)
 {
   chart_.AddSeries(product_.Prices, "Pxs", 40, "###0.0##");
   chart_.AddSeries(HelperMethods.GetMA(product_.Prices, FastMA), string.Format("MA({0})", FastMA), 40, "###0.0##");
   chart_.AddSeries(HelperMethods.GetMA(product_.Prices, SlowMA), string.Format("MA({0})", SlowMA), 40, "###0.0##");
 }
开发者ID:heimanhon,项目名称:researchwork,代码行数:6,代码来源:MACross.cs

示例5: chartSignal

    protected override void chartSignal(Backtest.ProductBase product_, Controls.LineChartDataDisplay chart_)
    {
      //chart_.AddSeries(getPeriodReturns(product_.Prices), "NPeriodReturns", 80, "##0.0#%");

      //chart_.AddSeries(getZScores(product_.Prices), "zScores", 80, "##0.0#");

      chart_.AddSeries(GenerateWeightSeries(product_,null), "SignalScores", 80, "##0.0#");
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:8,代码来源:NPeriodMom_SharpeFilter_Fade.cs

示例6: chartSignal

    protected override void chartSignal(Backtest.ProductBase product_, Controls.LineChartDataDisplay chart_)
    {
      var cumultRet = product_.Prices.ToReturns(product_.Convention).ToCumulative();
      var ma1 = HelperMethods.GetMA(cumultRet, MA1);
      var ma2 = HelperMethods.GetMA(cumultRet, MA2);
      var ma3 = HelperMethods.GetMA(cumultRet, MA3);

      var ks = HelperMethods.GetRollingStat(cumultRet, KWindow, HelperMethods.GetK);


      chart_.ClearSeries();
      chart_.AddSeries(cumultRet, "Prices", 40, "##0.0##");
      chart_.AddSeries(ma1, string.Format("MA({0})", MA1), 40, "##0.0##");
      chart_.AddSeries(ma2, string.Format("MA({0})", MA2), 40, "##0.0##");
      chart_.AddSeries(ma3, string.Format("MA({0})", MA3), 40, "##0.0##");

      chart_.AddSeries(ks, string.Format("K({0})", KWindow), 80, "##0.0");
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:18,代码来源:MA3_K.cs


注:本文中的Controls.AddSeries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。