All systems? Certainly not!
There is more than 20,000 systems there…
You need to select some systems to the list.
You can compose a chart in a cycle for each system in that list then.
For example: Select 10 last week most popular systems
(Copied from Tail Ratio in Explorer)
// Your systems selection.
// For example - last week most popular systems.
var popularLastWeek = from stat in C2STATS
where stat.StatName == "popular10080"
orderby stat.StatValueVal descending
select stat.SystemId;
// Get 10 most popular systems Ids
Int64[] systems = popularLastWeek.Take(10).ToArray();
Here is an example how to do what you want.
(Systems IDs are hard coded in the array.)
// Your systems selection
Int64[] systems = new Int64[] {
46106678, // Bob Dylan
90325773, // Ascendatnt
84690231 // Genefish Hong Kong
};
// Your EMA period
int emaPeriod = 30;
foreach (var systemId in systems)
{
// Get a system (for its Name)
var c2System = GetC2SYSTEM(systemId);
// Daily equity data with commissions and fees
ITimeSheet timeSheet = TimeSheetFactory(systemId, TimeInterval.Day);
// Let TimeSheet run
timeSheet.EquitiesSheet();
// Extract equity data.
var equity = timeSheet.GetColumn(systemId, EquityType.Equity);
// Your Technical analysis data
var taData = C2TALib.EMA(equity, emaPeriod);
// Create a chart object
ITimeSeriesChart chart = new TimeSeriesChart();
chart.Name = c2System.Name;
// Add equity to the chart
chart.Add(equity, "Equity", Color.Blue);
// Add Technical analysis to the chart
chart.Add(taData, "EMA_" + emaPeriod.ToString(), Color.Red);
// Show the chart
CHART = chart;
}