# Equity courve trading

**URL:** <https://forums.collective2.com/t/equity-courve-trading/8971>\
**Category:** C2 Explorer\
**Created:** [October 17, 2016, 12:18am UTC](https://forums.collective2.com/t/equity-courve-trading/8971 "2016-10-17T00:18:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TrendNeutral](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/trendneutral/32/238_2.png) [@TrendNeutral](https://forums.collective2.com/u/TrendNeutral)\
**Post date:** [October 17, 2016, 12:18am UTC](https://forums.collective2.com/t/equity-courve-trading/8971/1 "2016-10-17T00:18:02Z")

</div>

@BobSvan2 is it possible to have a formula in Explorer that visualizes a bunch of systems equity curves as well as the EMA (200) on the curve, where “200” is something we can change?

Thanks!

---

<div class="post-metadata">

**Author:** ![BobSvan2](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/bobsvan2/32/21391_2.png) [@BobSvan2](https://forums.collective2.com/u/BobSvan2)\
**Post date:** [October 25, 2016, 3:03pm UTC](https://forums.collective2.com/t/equity-courve-trading/8971/4 "2016-10-25T15:03:17Z")

</div>

This is done.

I added a technical analysis stuff to Collective2 Explorer.

Your question should be answered by this example: [Two systems and EMAs chart](https://collective2.com/c2explorer_help/html/53ae5306-9465-4f71-941a-805625392eda.htm#TwoSystemsAndEmaChart)

Enjoy!

---

<div class="post-metadata">

**Author:** ![TrendNeutral](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/trendneutral/32/238_2.png) [@TrendNeutral](https://forums.collective2.com/u/TrendNeutral)\
**Post date:** [October 29, 2016, 2:56pm UTC](https://forums.collective2.com/t/equity-courve-trading/8971/5 "2016-10-29T14:56:04Z")

</div>

@BobSvan2 thanks a lot. Is there any way we can put all systems in the code and we generate one single chart for each system? (rather than one chart with all systems…)

---

<div class="post-metadata">

**Author:** ![BobSvan2](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/bobsvan2/32/21391_2.png) [@BobSvan2](https://forums.collective2.com/u/BobSvan2)\
**Post date:** [November 1, 2016, 2:31pm UTC](https://forums.collective2.com/t/equity-courve-trading/8971/6 "2016-11-01T14:31:09Z")

</div>

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](https://forums.collective2.com/t/tail-ratio-in-explorer/8911/9))

```cs
// 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.)

```cs
// 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;
}

```

* * *

![](https://yyz2.discourse-cdn.com/flex028/uploads/collective2/4824/61a159fe6af4d4c0.png)
