Troubled by the error there are no trading operations - page 12

 
Renat Akhtyamov:

riddles ;)

It's not that the tests are weird, it's the basic logic that's wrong. What kind of riddles are they?

If there was no margin for the opening, the closing will not be taken into account. OrderSelect will not work further.

I'm afraid to see what's there "in the main robot, which is 100%, even 100500 working on demo and real".

 
Andrey Kaunov:

I've been tinkering with this code for a week now!!! Removed anything that could cause an error or prevent a trade from opening. Let me send you the source code and see for yourself what's wrong. I am sure that nothing should interfere.

Even a simple EA may creaky check. There was one pass, if you remember, where there were no trades on two pairs.


They're giving you whatever you want.

At the very least, the trading conditions would have been described in the report,

or is that easier to guess, I don't know.

 
Maxim Kuznetsov:

It's not that the tests are weird, it's the basic logic that's wrong. What kind of riddles are there?

If there was no margin for the opening, the closing will not be taken into account either. OrderSelect won't let it work any further.

I'm afraid to see that there is "a basic robot that is 100%, even 100500 working on demo and real".

Yes there is, I see everything

The only thing that prevents you from putting the right code - the tester swallows it whole

I've basically already told you - count the number of trades first, not look at the tickets, but you're missing the point ...
 
Renat Akhtyamov:

it turns out that there were no trades in NZD or GBP

Hmm, interesting

because everything works in Andrew's tester.

In the tester, everything works on all pairs. Input parameters, which create conditions for entry(I mean big, main EA), which at some values would make it impossible to open trade, I simply removed from external ones and set them constant value. This was the first step. Then I have removed all conditions to open transaction, except for the simplest ones, to avoid creation of one deal after another. However, the code still fails to pass the check.

What should I do? Write a naked Expert Advisor without any conditions, like that simple one, to pass the validation?

 
Andrey Kaunov:

I've been crumbling this code for a week now!!! Removed anything that could cause an error or prevent a trade from opening. Let me send you the source code and see for yourself what's wrong. I am sure that nothing should interfere.

Even a simple EA may creaky check. There was one pass, if you remember, where there were no trades on two pairs.


There is no need to try to get trades on each of the tested symbols.

You need to handle their opening errors correctly.

It does not matter whether there are deals made in any of the symbols or not. It is important that the position non-opening is handled correctly by the Expert Advisor. In your case - a message to the journal, because it is impossible to open a position with the minimum lot with a balance of one dollar.

Do you hear what I'm telling you? Do not force the opening of positions on all traded symbols. The Validator intentionally turns on a stupid schoolboy and watches how your Expert Advisor reacts to stupid settings.

I'm already starting to quietly invoke evil spirits....... :(((

 
Renat Akhtyamov:

Yes, I see everything.

The only thing preventing me from posting the correct code is that the tester swallows it whole.

I basically told you before - you have to count the number of trades, but it didn't work...

No, Renat, the validator generates a certain error on that too. I tried


 
Andrey Kaunov:

No, Renat, the validator generates a certain error on that too. I've tried


sOr=bOr=0;

      for (i=OrdersTotal()-1;i>=0;i--)
      {
         if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) && OrderSymbol()==Symbol())
         {
            if(OrderType()==OP_BUY)bOr=bOr+1;
            if(OrderType()==OP_SELL)sOr=sOr+1;
         }
      }

if(sOr==0)

{

//open sell

}

if(bOr==0)

{

//open buy

}

 
Artyom Trishkin:

It is not necessary to try by any means to achieve trades on each of the symbols being tested.

It is necessary to handle their opening errors correctly.

It does not matter whether trades have been made on any of the symbols or not. It is important that the position non-opening is handled correctly by the Expert Advisor. In your case - a message to the journal, because it is impossible to open a position with the minimum lot with a balance of one dollar.

Do you hear what I'm telling you? Do not force the opening of positions on all traded symbols. The Validator intentionally turns on a stupid schoolboy and watches how your Expert Advisor reacts to stupid settings.

I'm already starting to quietly invoke evil spirits....... :(((

Artyom, I've asked for the umpteenth time and haven't gotten a coherent answer (no offense). Why does he always turn on a fool for NZDUSD, and after that he goes into some kind of glitch with endless waiting. It's the validator that crashes, not the Expert Advisor. There is no place for the EA to crash. I will pay you $50, Artem, if you fix the code to pass validation all the time, rather than once every 20-30 tries, as now.

All right? Shall I send you the code?

 
Andrey Kaunov:

In the tester, everything works on all pairs. Input parameters, which create entry conditions(I mean the big, main EA), which at some values would make it impossible to open a trade, I simply removed from the external ones and set them to a constant value. This was the first step. Then I have removed all conditions to open transaction, except for the simplest ones, to avoid creation of one deal after another. However, the code still fails to pass the check.

What do you need to do, write a naked Expert Advisor without any conditions, like that simple one, to pass the validation?

You don't have to enter any hard parameters. All parameters should be calculated from trading conditions. In the settings, leave the lot to be opened. If the lot is calculated, then in case of shortage of funds, even at the minimum lot, display a message about it. All other parameters of the transaction should also be checked, controlled and corrected. If the correction is impossible, you will be notified accordingly.

However, if there are a lot of conditions and they all depend on the current state of trade and signals, it is likely that there will be no deal in the validator. In this case an individual approach to testing of such EA is needed.

 
Andrey Kaunov:

Artyom, this is the second time I've asked and I haven't received an intelligible answer (no offense). Why does it always turn on the NZDUSD and then crash into a glitch with endless waiting. It's the validator that crashes, not the Expert Advisor. There is no place for the EA to crash. I will pay you $50, Artem, if you fix the code to pass validation all the time, rather than once every 20-30 tries, as now.

All right? You want me to send you the code?

No. I don't need someone else's money for someone who paid it not to figure it out for themselves. It's not the money that's more important, it's your result.

Reason: