Possible Daily Column chart bug?

On Daily data ChartType.Column and ChartType.Bar doesn’t work the same way (on other resolutions they do.)

Sample code:

long systemId = 46106678;
var systemName = (from sys in C2SYSTEMS where sys.SystemId == systemId select sys.SystemName).First();
ITimeSeriesChart timeSeriesChart = new TimeSeriesChart();
timeSeriesChart.Name = systemName;

ITimeSheet timeSheet = TimeSheetFactory(
systemId,
TimeInterval.Day,
EquityType.Raw | EquityType.MarginUsed
);
timeSheet.EquitiesSheet();
var mrgn = timeSheet.GetColumn(systemId, EquityType.MarginUsed);
timeSeriesChart.Add(mrgn, “CMargin”, Color.Blue, ChartTypes.Column);
timeSeriesChart.Add(mrgn, “Margin”, Color.Red, ChartTypes.Bar);

CHART = timeSeriesChart;

The blue and red bars are of different height. (Looking at the data: Bar is correct, Column looks too high.)

For Month resolution the heights are the same.

Hello!

It happened me too. Several times.
The column chart (ChartTypes.Column) tries to help us and it leads to confusion. :confused:
From certain point, depending on selected time range, it starts to think it is better to group data together and show sums instead of details. :smirk:

Let’s change your code slightly and use two separated graphs:

long systemId = 46106678;
var systemName = (from sys in C2SYSTEMS where sys.SystemId == systemId select sys.SystemName).First();

// Prepare data
ITimeSheet timeSheet = TimeSheetFactory(systemId, TimeInterval.Day, EquityType.Raw | EquityType.MarginUsed );
timeSheet.EquitiesSheet();
var mrgn = timeSheet.GetColumn(systemId, EquityType.MarginUsed);

// Charts
ITimeSeriesChart timeSeriesChart1 = new TimeSeriesChart();
ITimeSeriesChart timeSeriesChart2 = new TimeSeriesChart();
timeSeriesChart1.Name = systemName;
timeSeriesChart2.Name = systemName;

timeSeriesChart1.Add(mrgn, "CMargin", Color.Blue, ChartTypes.Column);
timeSeriesChart2.Add(mrgn, "Margin", Color.Red, ChartTypes.Bar);

CHART = timeSeriesChart1;
HR();
CHART = timeSeriesChart2;

We get following (different) charts showing all data.


Let’s play with Zoom.

Select 1 month:

Voilà - the same pictures!


It works until YTD:


Then, starting from 1 year, the column chart starts to group data to weeks and shows sums per weeks:


Missing data???

If I change the system id in your code to 85617966 I get no result!

[AFAICT this is a valid system id, I do get equity for it, for example.]

Mozart trades just stocks.

Yes, I know. But stocks have margin too? Even if the multiplier is 1, the open positions’ value is the margin, no? Or the assumption / recommendation is that in order to get this type of margin we use the change of equity value between 2 days?

Maybe. But we prefer to let it be as it is.