forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Help and Support → Error generated strategy when trying to test Metatrader

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 19

1 (edited by muplayer2000 2015-04-14 20:39:19)

Topic: Error generated strategy when trying to test Metatrader

I keep getting this error when trying to backtest a saved strategy.

2015.04.14 21:30:52.568    2014.06.01 21:00  Cannot call 'user32.dll::PostMessageA', 'user32.dll' is not loaded
2015.04.14 21:30:52.568    2014.06.01 21:00  unresolved import function call

http://s27.postimg.org/5kjzv2u6n/error1.jpg

Re: Error generated strategy when trying to test Metatrader

Findig Forexxsb generated EA most are unable to be tested on metatrader 4 all sort of different errors, i don't have this issue with other EA created elswhere.

Here is another EA i generated and tried to back test and this error:


2015.04.15 01:01:45.391    2014.06.02 00:00  Strategy EURUSD,H4: LabelDelete: failed to delete a text label! Error code = 4202
2015.04.15 01:01:45.391    2014.06.02 00:00  Strategy EURUSD,H4:
Cannot load enough bars! The expert needs minimum 201 bars.
Please check the "Use date" option and set the "From:" and "To:" dates properly .

Re: Error generated strategy when trying to test Metatrader

Error :

http://s3.postimg.org/kmpeff1fj/error2.jpg

Re: Error generated strategy when trying to test Metatrader

muplayer2000 wrote:

I keep getting this error when trying to backtest a saved strategy.

2015.04.14 21:30:52.568    2014.06.01 21:00  Cannot call 'user32.dll::PostMessageA', 'user32.dll' is not loaded
2015.04.14 21:30:52.568    2014.06.01 21:00  unresolved import function call

http://s27.postimg.org/5kjzv2u6n/error1.jpg


The solution to your problem is written on your screenshot two lines below the marked line.

What I see is that your strategy requires 126 bars but MT backtester loads only 100 bars on the backtester.
You have to set starting date in order to provide more data.

See this video for more info:

5 (edited by muplayer2000 2015-04-15 14:04:13)

Re: Error generated strategy when trying to test Metatrader

Its strange never had this issue when testing with any other EA i have download all history for testing in ticklite.

SO due to this i have had to just skip backtest  on metatrader and just try on demo

I have attached the EA on demo : i keep getting these messages:

2015.04.15 03:29:54.073    Strategy GBPNZD,H4: LabelCreate: failed to create text label! Error code = 4200


2015.04.15 01:01:45.391    2014.06.02 00:00  Strategy EURUSD,H4: LabelDelete: failed to delete a text label! Error code = 4202

Please advise


Popov wrote:
muplayer2000 wrote:

I keep getting this error when trying to backtest a saved strategy.

2015.04.14 21:30:52.568    2014.06.01 21:00  Cannot call 'user32.dll::PostMessageA', 'user32.dll' is not loaded
2015.04.14 21:30:52.568    2014.06.01 21:00  unresolved import function call

http://s27.postimg.org/5kjzv2u6n/error1.jpg


The solution to your problem is written on your screenshot two lines below the marked line.

What I see is that your strategy requires 126 bars but MT backtester loads only 100 bars on the backtester.
You have to set starting date in order to provide more data.

See this video for more info:

Re: Error generated strategy when trying to test Metatrader

Its strange never had this issue when testing with any other EA i have download all history for testing in ticklite.

No matter how many bars you download MT backtester always provides 100 bars when starting the backtester.

I don't know what other experts do when they require more than 100 bars.

I can also hide the error message and leave the backtest to the destiny however, you'll  start asking why the expert doesn't trade or why the indicator values are not the same.

Re: Error generated strategy when trying to test Metatrader

OK i just exported a generated EA to metatrader, as i mentionned earlier.

By importing history data into Forexsb i assume there is no need to backtest it in metrader hence you can directly test on forexsb?

I have attached a generated EA on a demo account:

Journal has this error message:
2015.04.15 03:28:45.512    Strategy GBPCAD,H4: LabelCreate: failed to create text label! Error code = 4200

Can you tell me how to resolve this? Does this error stop the EA from initiating a trade?

I checked the source file  :

//+------------------------------------------------------------------+
//| Create a text label                                              |
//+------------------------------------------------------------------+
bool LabelCreate(const long              chart_ID=0,               // chart's ID
                 const string            name="Label",             // label name
                 const int               sub_window=0,             // subwindow index
                 const int               x=0,                      // X coordinate
                 const int               y=0,                      // Y coordinate
                 const ENUM_BASE_CORNER  corner=CORNER_LEFT_UPPER, // chart corner for anchoring
                 const string            text="Label",             // text
                 const string            font="Arial",             // font
                 const int               font_size=8,              // font size
                 const color             clr=clrWhite,             // color
                 const double            angle=0.0,                // text slope
                 const ENUM_ANCHOR_POINT anchor=ANCHOR_LEFT_UPPER, // anchor type
                 const bool              back=false,               // in the background
                 const bool              selection=false,          // highlight to move
                 const bool              hidden=true,              // hidden in the object list
                 const string            tooltip="\n",             // sets the tooltip
                 const long              z_order=0)                // priority for mouse click
 

 {
      string namep = "Lbl_prm_"+IntegerToString(i);
      string namev = "Lbl_val_"+IntegerToString(i);
      LabelCreate(0,namep,0,paramsX,locationY,CORNER_LEFT_UPPER,m_DynamicInfoParams[i]);
      LabelCreate(0,namev,0,valuesX,locationY,CORNER_LEFT_UPPER,"");
      locationY+=12;
     }

   LabelCreate(0,"Lbl_pos_0",0,350, 0,CORNER_LEFT_UPPER,"","Ariel",10);
   LabelCreate(0,"Lbl_pos_1",0,350,15,CORNER_LEFT_UPPER,"","Ariel",10);
   LabelCreate(0,"Lbl_pos_2",0,350,29,CORNER_LEFT_UPPER,"","Ariel",10);
Popov wrote:

Its strange never had this issue when testing with any other EA i have download all history for testing in ticklite.

No matter how many bars you download MT backtester always provides 100 bars when starting the backtester.

I don't know what other experts do when they require more than 100 bars.

I can also hide the error message and leave the backtest to the destiny however, you'll  start asking why the expert doesn't trade or why the indicator values are not the same.

Re: Error generated strategy when trying to test Metatrader

I cannot reproduce the error. Can you open the expert in the editor and run it in Debug mode. It will stop at the error line and probably you'll be able to find the problem.

Re: Error generated strategy when trying to test Metatrader

Ran a debug , no errors.

I re-installed a new copy of meta-trader on a different folder, the error is gone. Strange

I have a question, do you have to attach the indicators on the charts that were used to create the EA when testing in demo?

Popov wrote:

I cannot reproduce the error. Can you open the expert in the editor and run it in Debug mode. It will stop at the error line and probably you'll be able to find the problem.

Re: Error generated strategy when trying to test Metatrader

No, you don't need indicators.

However, you can set them to see the charts if you want. They'll not affect the trade in any way.

11 (edited by muplayer2000 2015-04-15 23:40:36)

Re: Error generated strategy when trying to test Metatrader

Thank you

In regards to that does the EA uses a library DLL to read the indicator data?

Also i am wondering  i noticed if i use Acceptance criteria filter : stagnation : Less than 10 days

does not matter which time frame , the generator does not generate any EA , is this a bug? or a limitation of the software?


Popov wrote:

No, you don't need indicators.

However, you can set them to see the charts if you want. They'll not affect the trade in any way.

Re: Error generated strategy when trying to test Metatrader

muplayer2000 wrote:

Thank you
Also i am wondering  i noticed if i use Acceptance criteria filter : stagnation : Less than 10 days

does not matter which time frame , the generator does not generate any EA , is this a bug? or a limitation of the software?

It is not a bug, nor is it a limitation. It is actually perfectly realistic and normal that there are practically no strategies that make profit all the time. If someone else is trying to convince you the other way he is probably either lying or has found the holy grail of Forex trading (then you got to wonder why is he sharing it with you anyway) smile .

13 (edited by muplayer2000 2015-04-16 10:00:07)

Re: Error generated strategy when trying to test Metatrader

That is not what i actually meant nor im i looking for a holy grail with this software smile, i was asked to test different strategy EA Software FSB is one of them.

From what i have been testing with the generator algorithm , seem only able to generate  something using higher frame chart.

Any time frame below H4 You get 0 result ,  Ran 6 instances Generator around millions of calculations with H1 / 30 min / 15min
Stagnation max: 1 month , no results

Even checking some of the dev default strategies i noticed all of them which seem good to the eye have a stagnation period above 60 days , i left the criteria at default only changing the stagnation period.

That is the reason i am  assuming you can only generate higher time frame strategy with FSB and  it will not be suitable to generate lower time frame EA.

It does seem the generator cycles through the same Algorithm


yavor99 wrote:
muplayer2000 wrote:

Thank you
Also i am wondering  i noticed if i use Acceptance criteria filter : stagnation : Less than 10 days

does not matter which time frame , the generator does not generate any EA , is this a bug? or a limitation of the software?

It is not a bug, nor is it a limitation. It is actually perfectly realistic and normal that there are practically no strategies that make profit all the time. If someone else is trying to convince you the other way he is probably either lying or has found the holy grail of Forex trading (then you got to wonder why is he sharing it with you anyway) smile .

Re: Error generated strategy when trying to test Metatrader

I normally leave the criteria off. Later I filter and sort the generated strategies as per my criteria.

Re: Error generated strategy when trying to test Metatrader

Also i am wondering  i noticed if i use Acceptance criteria filter : stagnation : Less than 10 days

does not matter which time frame , the generator does not generate any EA , is this a bug? or a limitation of the software?

This is dependent on time frame, lower time frames will have less stagnation days.

Actually there are not too many bugs in the software, there are a few things that the developer is working on, for sure please let him know if you discover anything, it will be revised promptly.

It will take you a couple months to get used to the software and understand how to use it, the more you use it and study the features, the better the results.

Personally I have generated quite a few good strategies using the lower time frames. As you gain knowledge and experience with the software you will be able to use it a lot more effectively.

Reading through the posts in this forum will give you ideas, it is well worth the time to read older posts.

Re: Error generated strategy when trying to test Metatrader

As far as evaluating the software goes, it would probably bet better for you to seek the help of the developer as that would save you a ton of time and also give you far more realistic results.

I know that he will personally be glad to assist you and thereby make your evaluation effective.

Re: Error generated strategy when trying to test Metatrader

Thank you for the informative replies. I appreciate it.

As far as stagnation goes, seems best to leave it off in from personal experience looks like its speculative/estimates or conflicts when it comes to stagnation period results.

In terms of calculation does the generator use a the same algorithm (fixed algorithm not dynamic) each time (meaning if someone uses the same settings(same indicator)  in the generator as someone else they will have the same results ? Or is it absolutely random ?

Can the Generator be used to generate a mechanical EA System?

Can the generator be used to generate price action EA system?

Re: Error generated strategy when trying to test Metatrader

A user has the option to use and create whatever he wishes to have in the sections 'Opening Logic' and 'Closing Logic', turn them on or turn them off.

The program is open source and feel free to create of have someone create whatever you need.

Re: Error generated strategy when trying to test Metatrader

In terms of calculation does the generator use a the same algorithm (fixed algorithm not dynamic) each time (meaning if someone uses the same settings(same indicator)  in the generator as someone else they will have the same results ? Or is it absolutely random ?

The algorithm is same, but the Generator chooses indicators randomly. The chance to receive one and the same strategy is small.

Can the generator be used to generate price action EA system?

The Generator generate sonly price action strategies because 99% of the indicators are based on the market price. When the price moves, the strategy acts. Don't be fooled by marketing phrases.

The program is open source and feel free to create of have someone create whatever you need.

The source code of the technical indicator sand the EA mql code is available. FSB Pro is not open source.

Posts: 19

Pages 1

You must login or register to post a reply

Forex Software → Help and Support → Error generated strategy when trying to test Metatrader

Similar topics in this forum