Changeset 9997 for trunk/sources
- Timestamp:
- 09/20/13 13:08:31 (11 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionLineChartView.cs
r9992 r9997 53 53 this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true; 54 54 this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true; 55 this.chart.ChartAreas[0].AxisY.IntervalAutoMode = IntervalAutoMode.VariableCount; 55 56 this.chart.ChartAreas[0].AxisY2.ScaleView.Zoomable = false; 57 this.chart.ChartAreas[0].AxisY2.IntervalAutoMode = IntervalAutoMode.VariableCount; 58 this.chart.ChartAreas[0].AxisY2.LabelStyle.Enabled = false; 59 this.chart.ChartAreas[0].AxisY2.MajorGrid.Enabled = false; 60 this.chart.ChartAreas[0].AxisY2.MinorGrid.Enabled = false; 61 this.chart.ChartAreas[0].AxisY2.MajorTickMark.Enabled = false; 62 this.chart.ChartAreas[0].AxisY2.MinorTickMark.Enabled = false; 56 63 this.chart.ChartAreas[0].CursorY.Interval = 0; 57 64 } … … 63 70 var testRows = Content.ProblemData.TestIndices; 64 71 this.chart.Series.Add(SIGNALS_SERIES_NAME); 72 this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Secondary; 65 73 this.chart.Series[SIGNALS_SERIES_NAME].LegendText = SIGNALS_SERIES_NAME; 66 74 this.chart.Series[SIGNALS_SERIES_NAME].ChartType = SeriesChartType.FastLine; 67 this.chart.Series[SIGNALS_SERIES_NAME].Points.DataBindY(Content.TrainingSignals.Concat(Content.TestSignals).ToArray()); 75 this.chart.Series[SIGNALS_SERIES_NAME].Points.DataBindXY( 76 trainingRows.Concat(testRows).ToArray(), 77 Content.TrainingSignals.Concat(Content.TestSignals).ToArray()); 68 78 this.chart.Series[SIGNALS_SERIES_NAME].Tag = Content; 69 this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Secondary;70 79 71 IEnumerable<double> accumulatedPrice = GetAccumulatedProfits(Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable)); 80 var trainingPriceChanges = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable, 81 trainingRows); 82 var testPriceChanges = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable, 83 testRows); 84 IEnumerable<double> accumulatedTrainingPrice = GetAccumulatedProfits(trainingPriceChanges); 85 IEnumerable<double> accumulatedTestPrice = GetAccumulatedProfits(testPriceChanges); 72 86 this.chart.Series.Add(PRICEVARIABLE_SERIES_NAME); 87 this.chart.Series[PRICEVARIABLE_SERIES_NAME].YAxisType = AxisType.Primary; 73 88 this.chart.Series[PRICEVARIABLE_SERIES_NAME].LegendText = PRICEVARIABLE_SERIES_NAME; 74 89 this.chart.Series[PRICEVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine; 75 this.chart.Series[PRICEVARIABLE_SERIES_NAME].Points.DataBindY(accumulatedPrice.ToArray()); 90 this.chart.Series[PRICEVARIABLE_SERIES_NAME].Points.DataBindXY( 91 trainingRows.Concat(testRows).ToArray(), 92 accumulatedTrainingPrice.Concat(accumulatedTestPrice).ToArray()); 76 93 this.chart.Series[PRICEVARIABLE_SERIES_NAME].Tag = Content; 77 this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Primary;78 94 79 95 80 IEnumerable<double> trainingProfit = OnlineProfitCalculator.GetProfits( Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable, trainingRows), Content.TrainingSignals, Content.ProblemData.TransactionCosts);81 IEnumerable<double> testProfit = OnlineProfitCalculator.GetProfits( Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.PriceChangeVariable, testRows), Content.TestSignals, Content.ProblemData.TransactionCosts);96 IEnumerable<double> trainingProfit = OnlineProfitCalculator.GetProfits(trainingPriceChanges, Content.TrainingSignals, Content.ProblemData.TransactionCosts); 97 IEnumerable<double> testProfit = OnlineProfitCalculator.GetProfits(testPriceChanges, Content.TestSignals, Content.ProblemData.TransactionCosts); 82 98 IEnumerable<double> accTrainingProfit = GetAccumulatedProfits(trainingProfit); 83 99 IEnumerable<double> accTestProfit = GetAccumulatedProfits(testProfit); 84 100 this.chart.Series.Add(ASSET_SERIES_NAME); 101 this.chart.Series[ASSET_SERIES_NAME].YAxisType = AxisType.Primary; 85 102 this.chart.Series[ASSET_SERIES_NAME].LegendText = ASSET_SERIES_NAME; 86 103 this.chart.Series[ASSET_SERIES_NAME].ChartType = SeriesChartType.FastLine; 87 this.chart.Series[ASSET_SERIES_NAME].Points.DataBindY(accTrainingProfit.Concat(accTestProfit).ToArray()); 104 this.chart.Series[ASSET_SERIES_NAME].Points.DataBindXY( 105 trainingRows.Concat(testRows).ToArray(), 106 accTrainingProfit.Concat(accTestProfit).ToArray()); 88 107 this.chart.Series[ASSET_SERIES_NAME].Tag = Content; 89 this.chart.Series[SIGNALS_SERIES_NAME].YAxisType = AxisType.Primary;90 108 91 109 this.UpdateStripLines(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading/3.4/HeuristicLab.Problems.DataAnalysis.Trading-3.4.csproj
r9989 r9997 103 103 <Compile Include="Calculators\OnlineProfitCalculator.cs" /> 104 104 <Compile Include="Calculators\OnlineSharpeRatioCalculator.cs" /> 105 <Compile Include=" CsvProblemInstanceProvider.cs" />106 <Compile Include=" EcbProblemInstanceProvider.cs" />105 <Compile Include="InstanceProviders\CsvProblemInstanceProvider.cs" /> 106 <Compile Include="InstanceProviders\EcbProblemInstanceProvider.cs" /> 107 107 <Compile Include="Interfaces\IModel.cs" /> 108 108 <Compile Include="Interfaces\IProblem.cs" />
Note: See TracChangeset
for help on using the changeset viewer.