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

 
Алексей Тарабанов:
Please note that it is an EA.

I've been checking for days, as I wrote above, can you suggest a specific solution based on my EA, for example?

 
Konstantin Nikitin:
Alternatively, you can change the spread on 4. Once, I had a default OnTimer, changed the trade to OnTick. The trades went on.

OnTick set, spread changed, same error.

 
Andery Voronin:

I got such an error on the latest version of EA, apparently a lot of unnecessary stuff, solvable with ISTesting(), IsVisualMode(). Although there is enough code for a ream of paper.

Hmm, interesting solution. Can you describe the solution to this problem usingISTesting(), IsVisualMode()?
This EA is on mql4 and for metatrader.

 
Mikhail Vlasov:

I understood perfectly well without you that the EA does not trade for some reason during automatic validation, the question is what is the reason for the lack of trading or how to trace it

I would advise you to read posts to the last letter.

Forum on trading, automated trading systems and strategy tester

Troubled with error there are no trading operations

Alexey Viktorov, 2018.12.30 08:21

What a load of nonsense you have made up. It's easier than two fingers... The EA simply does not open a position for some reason and does not report it in the logs. I have not looked at the code, but this is one of the possible reasons. For example, the Expert Advisor has not enough money and without announcing it, it stops trading or just waits for a new tick and everything repeats.
You know best where the conditions are set, the cards are in your hands. The Expert Advisor should inform the user about all errors, without trying to open a position, rather than silently terminating the trade.
 
Alexey Viktorov:

I would advise you to read the messages to the last letter.

You know best where the conditions are set, so help yourself. The Expert Advisor should inform the user about all errors without trying to open a position, rather than silently terminating the trade.

I agree with you that the EA should inform the user about all errors, but if during automatic validation, for example, an EA is charged with a deposit of 1$ and it will process this exception, then it may as well tell the user on every tick that there are not enough funds and will not trade, and in the end I will again receive an error of testing with descriptionthere areno trading operations or am I misunderstanding something?

 
Mikhail Vlasov:

I agree with you that the Expert Advisor should inform the user about all errors, but if during automatic validation, for example, an Expert Advisor gets a $1 deposit and it will process this exception, then it may as well tell the user on every tick that there are not enough funds and will not trade, and in the end I will again receive a test error with the descriptionthere areno trading operations, or I do not understand something wrong?

Or maybe I should have just checked?

 
It won't help because in the end the error will be the same, but what influenced it (small deposit or something else) - remains unknown, that's the problem - there is no specifics because anything can affect the fact that the robot stopped trading.
 
Mikhail Vlasov:
It won't help because in the end the error will be the same, but what caused it (small deposit or something else) - it remains unknown, that's the problem, there is no specifics, because anything can affect the fact that the robot has stopped trading.

It will take you 10-15 minutes to check it, it's not the first day you've discussed the problem. And you're just speculating whether it will help or not...

 
As a variant purely for testing. You can write in OnInit to take positions. and see. If everything passes. Then we will look for a bug in the Expert Advisor. There are not many variants. The basic checks will suffice. By the way, I noticed that the check of a StopLoval is performed using a pure number. I personally always do +1
 

The automatic testing of the topicstarter's EA lasted 72 seconds. 3 currency pairs on 3 different timeframes. H1, H4, Daily, if I am not mistaken. Who stopped the test and why? Or the autotester's computing power is limitless and it ran the whole interval? What was that interval?

You see, there were simply no trades on these three symbols in this interval. Not on the Expert Advisor, but on the market.

4 pairs, 3 timeframes. H1, M30, Daily. 72 seconds)

One more thing: the autotester can't display trades on the market, it always works on the principle of the kitchen. If there is a deal, we watch how the Expert Advisor behaves, if there is no deal, we wait. All deals are external, the Expert Advisor in the autotester is not able to trade in principle.

Reason: