Exemple #1
0
        private static void AddLineDeclaration(Algo algo, AlgoBuilder template, int bufferIndex, string bufferName)
        {
            if (algo.Styles[bufferIndex] != DrawingShapeStyle.None && IsLineVisible(algo, bufferIndex))
            {
                var colorPart = string.Empty;
                if (algo.Colors[bufferIndex] != null)
                {
                    colorPart = ", Color = Colors." + algo.Colors[bufferIndex];
                }

                var plotTypePart = string.Empty;
                if (algo.Styles[bufferIndex] != DrawingShapeStyle.None)
                {
                    plotTypePart = ", PlotType = PlotType." + algo.Styles[bufferIndex].ToPlotTypeString();
                }

                template.LinesDeclarations.AppendFormat("[Output(\"{0}\"{1}{2})]\n", bufferName, colorPart, plotTypePart);
            }
            template.LinesDeclarations.AppendFormat("public IndicatorDataSeries {0}_AlgoOutputDataSeries {1}\n", bufferName,
                                                    "{ get; set; }");

            template.InitialzeAllOutputDataSeries.AppendLine(string.Format("AllOutputDataSeries.Add({0}_AlgoOutputDataSeries);", bufferName));
        }
 public AlgoPresenter(AlgoBuilder algoBuilder)
 {
     _algoBuilder = algoBuilder;
 }
Exemple #3
0
 public AlgoPresenter(AlgoBuilder algoBuilder)
 {
     _algoBuilder = algoBuilder;
 }
        private static void AddLineDeclaration(Algo algo, AlgoBuilder template, int bufferIndex, string bufferName)
        {
            if (algo.Styles[bufferIndex] != DrawingShapeStyle.None && IsLineVisible(algo, bufferIndex))
            {
                var colorPart = string.Empty;
                if (algo.Colors[bufferIndex] != null)
                    colorPart = ", Color = Colors." + algo.Colors[bufferIndex];

                var plotTypePart = string.Empty;
                if (algo.Styles[bufferIndex] != DrawingShapeStyle.None)
                    plotTypePart = ", PlotType = PlotType." + algo.Styles[bufferIndex].ToPlotTypeString();

                template.LinesDeclarations.AppendFormat("[Output(\"{0}\"{1}{2})]\n", bufferName, colorPart, plotTypePart);
            }
            template.LinesDeclarations.AppendFormat("public IndicatorDataSeries {0}_AlgoOutputDataSeries {1}\n", bufferName,
                                                    "{ get; set; }");

            template.InitialzeAllOutputDataSeries.AppendLine(string.Format("AllOutputDataSeries.Add({0}_AlgoOutputDataSeries);", bufferName));
        }