Errors, bugs, questions - page 3132

 
Yury Lemeshev #:

There is one problem, it appears randomly and occasionally.

Appears when working in the tester with several currencies.

In each cycle I request actual prices for symbols. If for some reason the tester does not receive quotes for a particular symbol, it uses the quotes obtained earlier for another symbol.

I should open a position if the price is higher than the specified one. I should open position if I got wrong data from another symbol.

EURCAD symbol opens if the price is above 1.45117. 1.74425>1.45117? Yes, it is higher but it is the price of another symbol.

We have detected 7 error orders out of 500.

I can only speculate that the price request from the symbol, the response is thrown into one and the same environment variable. Just a quick check to see if it is equal to the previous value. If it's another symbol equals very rarely.

 
Yury Lemeshev #:

There is no error in the code, the code was rewritten to eliminate the error, and the error does not appear regularly, it is completely chaotic

Miracles don't happen in this world... Here's one of the telepaths not yet on a binge and also talking about an error.

 
Yury Lemeshev #:

There is one problem, it appears randomly and occasionally.

Appears when working in the tester with several currencies.

In each cycle I request actual prices for symbols. If for some reason the tester does not receive quotes for a particular symbol, it uses the quotes obtained earlier for another symbol.

I should open a position if the price is higher than the specified one. I should open position if I got wrong data from another symbol.

EURCAD symbol opens if the price is above 1.45117. 1.74425>1.45117? Yes, it is higher but it is the price of another symbol.

We have detected 7 erroneous orders out of 500.

The answer is in the question itself. The robot can use irrelevant quotes or wrong data from another symbol. I do not know what exactly the idea is. But something is obviously wrong in the code...

 
Mihail Matkovskij #:

The answer is in the question itself. The robot can use irrelevant quotes or incorrect data from another symbol. I don't know what the idea is of course. But something is obviously wrong in the code.

There is something wrong in the code. There are gaps in the logic. The flickering jambs in general are hard to foresee and fend off.

 
2021.12.31 22:14:19.911 2019.01.24 18:50:09 -2117- EURGBP 0.86993
2021.12.31 22:14:19.912 2019.01.24 18:50:10 -2117- EURGBP 0.86994
2021.12.31 22:14:19.912 2019.01.24 18:50:10-2117- EURGBP 1.5969
2021.12.31 22:14:19.912 2019.01.24 18:50:10 instant buy 0.01 EURGBP at 0.86993 (0.86985 / 0.86993 / 0.86985)
2021.12.31 22:14:19.912 2019.01.24 18:50:10 deal #13 buy 0.01 EURGBP at 0.86993 done (based on order #13)
2021.12.31 22:14:19.912 2019.01.24 18:50:10 deal done [#13 buy 0.01 EURGBP at 0.86993]
2021.12.31 22:14:19.912 2019.01.24 18:50:10 order performed buy 0.01 at 0.86993 [#13 buy 0.01 EURGBP at 0.86993]

Each cycle is ok, but data from another symbol is substituted in the moment. 1.5969>0.88506 yes, position opens. This is not a code bug. This is a bug in the tester.

euSY01b=0;euSY01a=0;
   if(SymbolInfoDouble(euSY01,SYMBOL_BID,euSY01b)==true && SymbolInfoDouble(euSY01,SYMBOL_ASK,euSY01a)==true && euSY01b>0 && euSY01a>0)
      {
      GlobalVariableSet("["+MAGICs+"] "+euSY01+" LAST BID",euSY01b);GlobalVariableSet("["+MAGICs+"] "+euSY01+" LAST ASK",euSY01a);
      }
 
Valeriy Yastremskiy #:

In the code it's all like that. There are gaps in the logic. Flickering joints in general are hard to foresee and ward off.

what do you think logic is without code?

 
Yury Lemeshev #:
2021.12.31 22:14:19.911 2019.01.24 18:50:09 -2117- EURGBP 0.86993
2021.12.31 22:14:19.912 2019.01.24 18:50:10 -2117- EURGBP 0.86994
2021.12.31 22:14:19.912 2019.01.24 18:50:10-2117- EURGBP 1.5969
2021.12.31 22:14:19.912 2019.01.24 18:50:10 instant buy 0.01 EURGBP at 0.86993 (0.86985 / 0.86993 / 0.86985)
2021.12.31 22:14:19.912 2019.01.24 18:50:10 deal #13 buy 0.01 EURGBP at 0.86993 done (based on order #13)
2021.12.31 22:14:19.912 2019.01.24 18:50:10 deal done [#13 buy 0.01 EURGBP at 0.86993]
2021.12.31 22:14:19.912 2019.01.24 18:50:10 order performed buy 0.01 at 0.86993 [#13 buy 0.01 EURGBP at 0.86993]

Each cycle is ok, but data from another symbol is substituted in the moment. 1.5969>0.88506 yes, position opens. This is not a code bug. This is a bug in the tester.

Then, check the symbol for timing before entering the signal search.

 
Mihail Matkovskij #:

What do you think is logic without code?

Problem statement/localisation - solution algorithm or solution logic - code. Unfortunately this is often not understood here in one-for-all mode. Coding begins before the problem is clearly formulated, not even the solution algorithm. Of course, the logic that any query is always executed is not only incorrect in the tester, but also in reality. Therefore, we need the right actions to avoid toxic consequences of flickering events))) Happy Holidays!!!!

 
Valeriy Yastremskiy #:

Happy Holidays!!!!

Thank you. Same to you!

In essence of the question, above I wrote what needs to be done. And then the logic will work.

 
Mihail Matkovskij #:

then, check the symbol for synchronisation before entering the signal search.

   if(SymbolIsSynchronized(euSY01)==true && SymbolInfoDouble(euSY01,SYMBOL_BID,euSY01b)==true && SymbolInfoDouble(euSY01,SYMBOL_ASK,euSY01a)==true && euSY01b>0 && euSY01a>0)

If you do so, and there are 7 such lines in the code for seven pairs, then the market overview will only have quotes for one currency.


Reason: