Errors, bugs, questions - page 587

 
speedy:

Good afternoon.

I have lost the ability to stop at a breakpoint.
After pressing the debug button, the process starts and immediately stops.
Can't even stop in the init function.
Doesn't work the same way with Expert Advisors and Inductors, even from the standard package.

So it starts and stops immediately?

Do you have examples of playback in steps, logs?

 
alexvd:

So it starts and stops immediately?

Do you have examples of playback in steps, logs?

Starts successfully and ... exits successfully... logs will send in the evening there are no errors, I have looked everywhere and tested different eksperts/indicators from the standard package.
Visual tester works, but it's not the same...

Just at one point debug just doesn't linger on the program, but somehow ends the session early and "successfully"...

to be continued...

 
speedy:

Starts successfully and ... exits successfully... I will send the logs in the evening there are no errors, I have looked everywhere and tested different eksperts/indicators from the standard package.
Visual tester works, but it's not the same...

It's just that at one point debug just doesn't linger on the programme, but somehow ends the session early and "successfully"...

continued...

The problem is solved.

I noticed that before I started debugging all the indicators and experts from the standard package,
Even after deleting source code it "found" it. Of course, after deleting the executable, the terminal politely asked me, when debugging, if I was ready to replace my old EA with the one I was trying to debug. I said Yes and it calmed down and everything worked.

It's still not clear, though:
- why debugging of the old EA did not work
- (more importantly) why debug loaded the old and apparently non-working Expert Advisor instead of the one started in debug.

All this is not blocking now because I found a workaround.
But I'm sure the BUG with wrong debugging EA instead of the highlighted one is still there...

 

Please help or explain what is wrong.

the EA works like clockwork on a demo account, but in the Strategy Tester it generates a request error

I have described my request to open an order in my library in a convenient and understandable way

bool Trade::OpenOrder(string symbol,string typeorder,double price,double volume,ulong deviation=50,double sl=0,double tp=0,ulong magic=0)

{

bool in=false;

if(magic==0) magic=777;

if(typeorder==" || symbol=="" || price==0 || volume==0)

{

Print("Order parameters not specified");

return(in);

}

else

{

MqlTradeRequest request;

if(typeorder=="BUY") request.type=ORDER_TYPE_BUY;

if(typeorder=="SELL") request.type=ORDER_TYPE_SELL;

request.price=price;

request.action=TRADE_ACTION_DEAL;

request.magic=magic;

request.symbol=symbol;

request.volume=volume;

request.sl=sl;

request.tp=tp;

request.deviation=deviation;

request.comment=";

MqlTradeResult result;

OrderSend(request,result);

if (result.retcode == TRADE_RETCODE_DONE) in=true;

else Print(result.retcode," ",request.price," ",request.sl," ",request.tp);

return(in);

}

}

My EA uses inheritance from that class, so from it my request looks like this

G_Symbol is defined at initialization

type="BUY"

price price Ask

Lots 0.1

......................

OpenOrder(G_Symbol,type,price,Lots);

On demo, position opens, but in the Strategy Tester it says this

2011.12.01 13:18:46 2010.01.29 00:00:52 10013 1.386 0 0

2011.12.01 13:18:46 2010.01.29 00:00:52 failed market buy 0.10 EURUSD [Invalid request]

I cannot make a strategy test.

I don't know what happened to my tester, I had no problems before and I haven't changed my module for at least half a year.



 
Genchik:

On demo it opens, but in the tester it says this

2011.12.01 13:18:46 2010.01.29 00:00:52 10013 1.386 0 0

2011.12.01 13:18:46 2010.01.29 00:00:52 failed market buy 0.10 EURUSD [Invalid request]

I cannot make a strategy test.

Maybe something wrong with the tester, it's because I haven't had any problems before and I haven't changed my module for at least half a year.


Please check branch I have a problem with SELL orders
 

I have looked through this thread, but there is a different problem

I have the EA working and no problems in my account,

But in the tester, during visualization it does not open orders in any direction

My build is 540 and everything happened after I updated to it

Here is another message from the Strategy Tester of another terminal, also 540 build

2011.12.01 14:14:40 Core 1 2011.04.18 18:07:47 10013 1.42279 0 0

2011.12.01 14:14:40 Core 1 2011.04.18 18:07:47 failed instant sell 0.10 EURUSD at 1.42279 [Invalid request]

2011.12.01 14:14:38 Core 1 2011.04.07 08:45:54 10013 1.42947 0 0
2011.12.01 14:14:38 Core 1 2011.04.07 08:45:54 failed instant buy 0.10 EURUSD at 1.42947 [Invalid request]

 
Genchik:

2011.12.01 14:14:38 Core 1 2011.04.07 08:45:54 10013 1.42947 0 0
2011.12.01 14:14:38 Core 1 2011.04.07 08:45:54 failed instant buy 0.10 EURUSD at 1.42947 [Invalid request]


10013

TRADE_RETCODE_INVALID

Incorrect request

 
sergeev:

10013

TRADE_RETCODE_INVALID

Incorrect request

Thanks for the transcript, but I know it.

The thing is that the request is correct.

and on the account the advisor works without problems, it does not want and gives this error only on the tester

 
Genchik:

I looked through this thread, but there's a different problem

Have you tried ZeroMemory()?
 
Rosh:
Have you tried ZeroMemory() ?

What's that got to do with it?

I don't use it at all.

Reason: