Hi, Just use the default, built in, exhaustive optimizer (i.e. do not call OptimizerSetEngine).
You only have 60 iterations, so there is no need for a non exhaustive optimizer. Non exhaustive optimizers are targeted at problems that have too many combinations to evaluate in any reasonable amount of time (e.g. hundreds of thousands or more iterations that would takes days, months or years to complete). Note, however, that when using an exhaustive optimizer you have to avoid over optimization, also known as curve fitting or of using up all of the degrees of freedom. Tomasz wrote an interesting article that appears to address exactly what you are doing (seeking optimal time frame) while at the same time attempting to avoid curve fit solutions: http://www.amibroker.com/docs/MTFIndicators.html Also, when you say "variable results", what exactly do you mean? It should be expected that at each step of a walk forward analysis, some parameters may change. Since market conditions change during each in sample period (e.g. bull to bear), a new optimal set of parameters will likely result, which will no longer coincide with the previous in sample period that was calculated under different conditions (e.g. was bull, now is bear). http://www.amibroker.com/guide/h_walkforward.html Mike --- In [email protected], "gabriel...@..." <fina...@...> wrote: > > OK.. > > Can u give me what type of engine and with what kind of settings will > get the same results when i optimize this lines: > > N = Optimize("N-minutes", 33, 1, 60, 1); > TimeFrameSet( N * in1Minute ); > MA1 = MA( Close, 10); > MA2 = MA( Close, 20); > BuySignal = Cross( MA1, MA2); > sellSignal = Cross( MA2, MA1); > TimeFrameRestore(); > > Buy = TimeFrameExpand(BuySignal , N*in1Minute); > Sell = TimeFrameExpand(sellSignal , N*in1Minute); > > I tried cmae, 5 , 1000, have variable results.. on walkforward > i tried spso, 5, 1000, same variables results.. > and also trib, 5, 1000.. > > > --- In [email protected], "Mike" <sfclimbers@> wrote: > > > > Tribes is a non exhaustive optimizer, meaning that it does not > > evaluate every possible combination. > > > > As such, it is possible that it will find different "optimal" > > solutions every time, depending on the nature of the surface being > > optimized. For example; If the surface has many similar peaks, it may > > land on a different one each time (local optima) instead of the one > > true optimal solution (global optima). > > > > Try increasing the number of Runs and/or MaxEval. If you have more > > than 2 or 3 optimization variables, 1000 MaxEval is not enough. > > > > http://amibroker.com/guide/h_optimization.html > > > > Mike > > > > --- In [email protected], "gabriel_id@" <finance@> wrote: > > > > > > hi there, > > > > > > i am a bit confused, i run the same optimization process.. on same > > > data range.. and i got different results each time :) > > > > > > and the engine was trib, 5, 1000... > > > > > > thx, > > > GV > > > > > >
