Forex Factory (
-   Platform Tech (
-   -   Optimizer won't optimize anything... (

mjollnir Sep 21, 2007 12:51pm | Post# 1

Optimizer won't optimize anything...
Hi there,

I wrote my own EA and I'm testing it with MetaTrader Optimizer..

On simple testing it's okay, I got the report and graph.

But when I want to optimize the 2 main vars of my EA, the 2 panels related to vars optimization stay blank.

Here is how my vars are coded, out of any function:

Inserted Code
extern int stop_loss;      // (10)
extern int take_profit;     // Gross PIP Profit (has to remove spread) (6)

I set up Initial Value, Step, and Stop in the Optimizer. Still no report and graph...

What did I miss?


tesla Sep 22, 2007 3:08am | Post# 2

If I had to guess, the values you're testing with are illegally close to market. MT brokers define a stoplevel, which is the minimum distance from market that you can set your takeprofit and stoploss.

Second guess? Your EA isn't actually using those values, so every run result is the same and MetaTrader is discarding superfluous results.

mjollnir Sep 22, 2007 7:19am | Post# 3

It works now, thanks!

© Forex Factory