Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 895

 

Came across an unpleasant feature of the optimiser in the strategy tester.

Here is the code:

input int      value=1;

int OnInit()

{

    if (value == 3) return (INIT_FAILED);

    return(INIT_SUCCEEDED);

}

We run a parameter value from 1 to 10 in the tester for optimization. The result is that all parameter sets are incorrect after 3 runs although logically only the third run should be incorrect.

Here is a picture of the same code with theINIT_PARAMETERS_INCORRECT returned parameter

The documentation says:

INIT_FAILED.

Initialization failed and there is no sense to continue the testing because of some unrecoverable errors. For example, failed to create an indicator that is required for the work of the Expert Advisor.

Return of this value means the same as the return of a value other than zero - initialization of the Expert Advisor in the tester has failed. Testing for the given set of parameters of the Expert Advisor will not be executed, the agent is free to receive a new task.

There is more to come. If we output the results to a file, we see that after the third pass theOnInit() functionis not started at all.

Has anyone encountered something like this? How to solve the problem?

P. S. Tested on MT4 build 765

 

Hello!

Can you tell me why the terminal does not see the indicator with a closed code, but the terminal of another broker does. The build on both terminals is the same

 

Please help.

I need to output Time[] as mm/dd/yyyyy hh:mi

and by default it outputs yyyy.mm.dd hh:mi

help :(



 
w_ersoc:

Please help.

I need to output Time[] as mm/dd/yyyyy hh:mi

and by default it outputs yyyy.mm.dd hh:mi

help :(

StringReplace(TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES),".","/");
 
evillive:

not working. it just outputs the number 2.... or still the same output option 2015/04/22 14:30 instead of 04/22/2015 14:30

what's wrong?

I didn't need to change the dots to slashes, I needed to swap the year number month...

______

found

like this:)

datetime date1=Time[1];
MqlDateTime str1;

TimeToStruct(date1,str1);

Comment(str1.mon+"/"+str1.day+"/"+str1.year);

 

Good day!

Can you tell me how to overcome the order send error 134?

I searched the forum and found only two ancient links.

 
Garkusha:

Good day!

Can you tell me how to overcome the order send error 134?

I searched the forum and found only two ancient links.

Take a look at these.
 
DiPach:
Look at it this way.
Thank you, I'll look into it.
 
Garkusha:

Good day!

Can you tell me how to overcome the order send error 134?

I searched the forum and found only two ancient links.


134

ERR_NOT_ENOUGH_MONEY

Not enough money to complete the transaction

 
Garkusha:
Thank you, I will look into it.

You're welcome.

There's a good selection of material there. Good luck!