OnCopyTo()

View as Markdown

Definition

Called as the values of a trade metric are saved.

Syntax

protected override void OnCopyTo(PerformanceMetricBase target) \{ \}

Examples

1protected override void OnCopyTo(PerformanceMetricBase target)
2{
3 // You need to cast, in order to access the right type
4 SampleCumProfit targetMetrics = (target as SampleCumProfit);
5 if (targetMetrics != null)
6 Array.Copy(Values, targetMetrics.Values, Values.Length);
7}