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


C# StockSerie.GetTrail方法代码示例

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


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

示例1: CreateInitialisedFrom

        public static IStockViewableSeries CreateInitialisedFrom(IStockViewableSeries aViewableSerie, StockSerie stockSerie)
        {
            if (!stockSerie.Initialise()) return null;

             IStockViewableSeries viewableSerie = null;
             switch (aViewableSerie.Type)
             {
            case ViewableItemType.Indicator:
               viewableSerie = stockSerie.GetIndicator(aViewableSerie.Name);
               break;
            case ViewableItemType.Decorator:
               viewableSerie = stockSerie.GetDecorator(aViewableSerie.Name, ((IStockDecorator)aViewableSerie).DecoratedItem);
               break;
            case ViewableItemType.PaintBar:
               viewableSerie = stockSerie.GetPaintBar(aViewableSerie.Name);
               break;
            case ViewableItemType.TrailStop:
               viewableSerie = stockSerie.GetTrailStop(aViewableSerie.Name);
               break;
            case ViewableItemType.Trail:
               viewableSerie = stockSerie.GetTrail(aViewableSerie.Name, ((IStockTrail)aViewableSerie).TrailedItem);
               break;
            default:
               break;
             }
             return viewableSerie;
        }
开发者ID:dadelcarbo,项目名称:StockAnalyzer,代码行数:27,代码来源:StockViewableItemsManager.cs

示例2: ApplyTo

 public override void ApplyTo(StockSerie stockSerie)
 {
     if (stockSerie.CotSerie != null)
      {
     IStockTrail stockTrail = stockSerie.GetTrail("HL("+(int)this.parameters[0]+")", "COTCOMMERCIAL(1,False,True)");
     this.eventSeries = stockTrail.Events;
      }
      else
      {
     // Detecting events
     this.CreateEventSeries(stockSerie.Count);
      }
 }
开发者ID:dadelcarbo,项目名称:StockAnalyzer,代码行数:13,代码来源:StockPaintBar_COTCOMMERCIAL.cs

示例3: GetViewableItem

        public static IStockViewableSeries GetViewableItem(string fullString, StockSerie stockSerie)
        {
            IStockViewableSeries viewableSerie = null;
             string[] fields = fullString.Split('|');
             int offset = 2;
             switch (fields[0].ToUpper())
             {
            case "INDICATOR":
               if (stockSerie == null)
               {
                  viewableSerie = StockIndicatorManager.CreateIndicator(fields[1]);
               }
               else
               {
                  viewableSerie = stockSerie.GetIndicator(fields[1]);
               }
               offset = 2;
               break;
            case "PAINTBAR":
               if (stockSerie == null)
               {
                  viewableSerie = StockPaintBarManager.CreatePaintBar(fields[1]);
               }
               else
               {
                  viewableSerie = stockSerie.GetPaintBar(fields[1]);
               }
               offset = 2;
               break;
            case "TRAILSTOP":
               if (stockSerie == null)
               {
                  viewableSerie = StockTrailStopManager.CreateTrailStop(fields[1]);
               }
               else
               {
                  viewableSerie = stockSerie.GetTrailStop(fields[1]);
               }
               offset = 2;
               break;
            case "DECORATOR":
               if (stockSerie == null)
               {
                  viewableSerie = StockDecoratorManager.CreateDecorator(fields[1], fields[2]);
               }
               else
               {
                  viewableSerie = stockSerie.GetDecorator(fields[1], fields[2]);
               }
               offset = 3;
               break;
            case "TRAIL":
               if (stockSerie == null)
               {
                  viewableSerie = StockTrailManager.CreateTrail(fields[1], fields[2]);
               }
               else
               {
                  viewableSerie = stockSerie.GetTrail(fields[1], fields[2]);
               }
               offset = 3;
               break;
            default:
               return null;
             }

             if (viewableSerie != null)
             {
            for (int i = 0; i < viewableSerie.SeriesCount; i++)
            {
               int index = 2 * i + offset;
               if (index < fields.Length)
               {
                  viewableSerie.SeriePens[i] = GraphCurveType.PenFromString(fields[index]);
                  viewableSerie.SerieVisibility[i] = bool.Parse(fields[index + 1]);
               }
               else
               {
                  viewableSerie.SerieVisibility[i] = true;
               }
            }
            if (fields[0].ToUpper() == "DECORATOR")
            {
               offset += viewableSerie.SeriesCount*2;
               IStockDecorator decorator = viewableSerie as IStockDecorator;
               for (int i = 0; i < decorator.EventCount; i++)
               {
                  int index = 2 * i + offset;
                  if (index < fields.Length)
                  {
                     decorator.EventPens[i] = GraphCurveType.PenFromString(fields[index]);
                     decorator.EventVisibility[i] = bool.Parse(fields[index + 1]);
                  }
                  else
                  {
                     decorator.EventVisibility[i] = true;
                  }
               }
            }
             }
//.........这里部分代码省略.........
开发者ID:dadelcarbo,项目名称:StockAnalyzer,代码行数:101,代码来源:StockViewableItemsManager.cs

示例4: ApplyTo

        public override void ApplyTo(StockSerie stockSerie)
        {
            IStockTrail stockTrail = stockSerie.GetTrail(this.parameters[0].ToString().Replace('_', ','),
            this.parameters[1].ToString().Replace('_', ','));

             int i = 0;
             foreach (BoolSerie boolSerie in stockTrail.Events)
             {
            this.Events[i++] = boolSerie;
             }
        }
开发者ID:dadelcarbo,项目名称:StockAnalyzer,代码行数:11,代码来源:StockPaintBar_TRAIL.cs


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