EMA code does not work anymore

@BobSvan2 the code below used to work. Now when I run it only the first 5 system equity curve appear…

// Your systems selection
Int64[] systems = new Int64[] {
102772812, 104651752 ,102125034, 100722273,98408819,81128026,98128454,92190352,100166454,104664854,104632446,100578638,98858556,100738045,100848973,84372841,85617966,95709284,92527663,89091740,100859365,100761669,101509154,68456563


// Your EMA period
int emaPeriod = 150;

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

        // 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;


It works actually.
But the bottom graphs are not shown because of some changes in the page design (C2 page height).
I will ask to correct that.
Meantime - resize your browser’s window a little (after calculations). The bottom graphs are shown there then.

@BobSvan2 thanks it’s been solved now. I was wondering: is it possible to get that code to send a daily email with the generated charts? That would be awesome :smile: