How do I take a strategy and after beacktesting it, them run the optimizer using many different time frames? Restated, I run a successful backtest, get a good result lets say using 10 minute charts, I can manually set backtest to 15(or 4 or whatever) and run it again, how can I set a range of minutes ( 1 to 30) or whatever, and get the optimizer to find out the most profitale period for my strategy. PS I know how to set a "slow" / "fast" MS variable and have optimizer run against all combinations, can't seem to figure how to do same with minutes.
Thanks
Wilson
Wilson,
Optimizing on the data series is currently not available in NT6.5.
We are trying to optimize a strategy with respect to the parameter "tbarrainterna1" (size in minutes of the internal work bar array) and parameter "Simple". Running the strategy with "backtest" gets logical results for each parameter combination. But executing "Optimize" the results for the tests are identical for every "tbarrainterna1" value while "Simple" is constant.
SAMPLE CODE.
protected override void Initialize()
{
Add(PeriodType.Minute,tbarraInterna1 ); //indice de acceso 1
Add(SMA(Simple));
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
switch (BarsInProgress)
{
case 0: //BARRAS POR DEFECTO DEL GRAFICO EN USO
//NADA break;
case 1: //BARRAS tbarrainterna1
// Condition set 1
if (Closes[1][0] > SMA(BarsArray[1],Simple)[0])
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (Closes[1][0] < SMA(BarsArray[1],Simple)[0])
{
EnterShort(DefaultQuantity, "");
}
break;
......
#region Properties
//-------------------------------------------------
[Description("")]
[Category("Parameters")]
public int Simple
{
get { return simple; }
set { simple = Math.Max(1, value); }
}
/////////////////////////////////////////////////////////////////////
[Description("Tiempo de la barra para el calculo interno.")]
[Category("Parameters")]
public int TbarraInterna1
{
get { return tbarraInterna1; }
set { tbarraInterna1 = Math.Max(1, value); }
}
Best Regards,
Federico Benitez.

Comment