protected SystemPerformanceSlice() { ReasonToExist = "NO_REASON_TO_EXIST"; EquityCurve = new DataSeriesTimeBased("Equity"); CashCurve = new DataSeriesTimeBased("Cash"); PositionsImTracking = new List <Position>(); PositionLongShortImTracking = PositionLongShort.Unknown; // direction not specified => it means "both short and long" here }
public int DotsExistsForCurrentSlidingWindow; // just because the object itself is the most convenient place to incapsulate it public Indicator() { this.Name = "INDICATOR_NAME_NOT_SET_IN_DERIVED_CONSTRUCTOR"; this.DataSeriesProxyFor = DataSeriesProxyableFromBars.Close; this.ParametersByName = new Dictionary <string, IndicatorParameter>(); this.ChartPanelType = ChartPanelType.PanelIndicatorSingle; this.OwnValuesCalculated = new DataSeriesTimeBased(this.Name); this.LineColor = Color.Indigo; this.LineWidth = 1; }
void propagatePerformanceReport(SystemPerformance performance) { DataSeriesTimeBased equityCurve = performance.SlicesShortAndLong.EquityCurve; this.fontsByStyle.Clear(); this.fontsByStyle.Add(this.Font.Style, this.Font); try { this.olvReport.BeginUpdate(); this.olvReport.Items.Clear(); this.currentColumn = 0; this.currentRow = 0; this.GenerateReportForOneColumn(performance.SlicesShortAndLong); this.currentColumn++; this.currentRow = 0; this.GenerateReportForOneColumn(performance.SliceLong); this.currentColumn++; this.currentRow = 0; this.GenerateReportForOneColumn(performance.SliceShort); this.currentColumn++; this.currentRow = 0; this.GenerateReportForOneColumn(performance.SliceBuyHold); if (performance.BenchmarkSymbolBars != null) { this.colBuyHold.Text = performance.BenchmarkSymbolBars.Symbol; this.colBuyHold.Width = 50; } else { this.colBuyHold.Text = "Buy & Hold"; this.colBuyHold.Width = 50; } //AdjustColumnSize(); } finally { this.olvReport.EndUpdate(); } }