However, the optimizer does not appear to be using this variable (NewAcntSize) to perform the optimization. How do I change the optimization type strategy to make it use the account value as opposed to the standard optimization parameters. Thanks for your help.
//
// Copyright (C) 2006, NinjaTrader LLC <www.ninjatrader.com>.
//
#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// </summary>
[Gui.Design.DisplayName("Account Balance")]
public class AccountBalance : OptimizationType
{
public double NewAcntSize;
/// <summary>
/// Return the performance value of a backtesting result.
/// </summary>
/// <param name="systemPerformance"></param>
/// <returns></returns>
public override double GetPerformanceValue(SystemPerformance systemPerformance)
{
return NewAcntSize; //AccountItem.CashValue;
}
}
}
Comment