Errors, bugs, questions - page 446

 
voix_kas:

Error code: 4756. You can see it in the screenshot.

1. Once again I repeat my question - List of symbols that are supposed to trade selectively selected (i.e. for all symbols that are going to trade mult was executed command SymbolSelect with the second parameter true)?

I advise in the initialization block to select all the symbols that are required by SymbolSelect and check for this error after this modification.

2. To the developers:

a) Why should the list of terminal symbols explicitly include symbols that were not selected using SymbolSelect (assuming that no actions were performed on them except for collecting some information)?

b) don't you think that such seemingly harmless things as SymbolsTotal(false) and SymbolName(index,false) lead to explicit displaying of symbols in visualization window.

As far as I understand it, it should be like this - No SymbolSelect no symbol among those displayed in MarketWatch.

c) As far as I understand, in the tester, the environment should download all symbols that are queried, and display only those that are selected at SymbolSelect or for which the user tries to get prices or any other relevant information.

For example, if I'm trying to determine whether a symbol is synchronized or how deep its history is on the server, why should it be immediately placed in MarketWatch with the selection sign?

 
voix_kas:

And how do I catch the error code at the point you indicate? I register the error on the last line of the above code.

This error does not appear if the following term is added just before this code:

For example like this:

double price=SymbolInfoDouble(Instrumet, SYMBOL_ASK);
if(price==0.0)
  {
   Print("Ай-яй-яй. Ошибка ",GetLastError());
   return(false);
  }
TradeRequest.price = price;
 
Interesting:

2. The question to developers - Why do symbols that were not selected using SymbolSelect (assuming that no actions were performed on them other than collecting certain information) get into the list of terminal symbols in an explicit form (you can see it in the screenshot above)?

The MT5 tester uses a very accurate simulation of trading conditions, including the most accurate conversion of profits into the balance currency.

It means that when working with crosses, we have to simulate the base currency pair to recalculate the profit. That is, when working on some instruments (crosses) there is a double volume of modelling, so that at any second the calculation is absolutely accurate and repeatable.

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5
 

Interesting
Of course. This code comes before all subsequent actions:

if (SymbolInfoInteger(Instrumet, SYMBOL_SELECT) || SymbolSelect(Instrumet, true))
{
  ...
}

If the condition is not met, no further action is performed on this tool.

About"SymbolSelect " during initialization... Soyou think that the first call ( SymbolSelect(Instrumet, true) ) does not load the tool?

It's just that I first go through the symbols for presence (initialize). And then in OnTick|OnTimer I explicitly select if instrument wasn't selected before.

uncleVic

Thank you. That is how I am handling this error.
If you can, please explain what causes the null price to appear? And can it happen in real life (i.e. in real-time mode, not only during testing)?

 
voix_kas:

Interesting
Of course. This code comes before all subsequent actions:

If the condition is not met, no further action is performed on this tool.

About"SymbolSelect" during initialization... Soyou think that the first call ( SymbolSelect(Instrumet, true) ) does not load the tool?

It's just that I first go through the symbols for presence (initialize). And then in OnTick|OnTimer I make an explicit selection if the tool has not been previously selected.


It's strange, either I don't understand something or there is some code somewhere that doesn't work the way I expect.

As far as I know SymbolSelect is enough to be used once, in the initialization block (it's better to check the result).

In my tester, I simply form MarketWatch from a preliminarily prepared array like this

  //Forming list of symbols
  for(int f=0;f<ArraySize(ArrSymbolsEA);f++)
  {
  SymbolSelect(ArrSymbolsEA[f],true);
  }

It is usually enough to make all symbols available for trading in the Strategy Tester.

However, in this case, if a symbol is missing in the journal, there will be an error like this

2011.07.06 18:47:57     symbol NZDUSD does not exist

If everything is working properly, the tester window should look like this


 
voix_kas:

Thank you. That's exactly how I'm getting around this error now.
If you could please explain what causes the zero price to occur? And can this happen in real life (read, in "real-time" mode, not just during testing)?


What is the error code?
Документация по MQL5: Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений
Документация по MQL5: Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений
  • www.mql5.com
Стандартные константы, перечисления и структуры / Коды ошибок и предупреждений - Документация по MQL5
 

To the developers

I was going to write this in SD, but changed my mind. Please add bool SymbolExists(name) / bool SymbolIsExists(name) function

Purpose - determines if a specified symbol is found on the server. In case of success returns true.

Only in such a way, that symbol will not be displayed in MarketWatch (the principle is the same as for SymbolIsSynchronized).

All this will allow to get rid of such troubles

2011.07.06 18:47:57     symbol NZDUSD does not exist
 
uncleVic:
What is the error code?

As far as the strategy tester shows, two errors are generated at the same time. Only the last one can be intercepted.
How do I know it? I gave the code above. Where should I put the error code information in it?

 
Interesting:

It's strange, either I don't understand something or there's code somewhere that doesn't work the way I think it does.

...

If everything worked as expected the tester window should look like this

Please run the tester with your multicurrency from 2011.01.03 00:00:00.

Up to 2011.01.03 00: 59:59 only 3 currency pairs are available (which are displayed in marketwatch, you can see on the screenshot). Starting with 2011.01.0301:00:00 - everything is normal.

P.S.

We are talking about MQ demo accounts (to prepare for the Championship).

 
voix_kas:

Please run the tester with your multicurrency from 2011.01.03 00:00:00.

I have until 2011.01.03 00: 59:59 only 3 currency pairs are available (which are displayed in marketwatch, you can see on the screenshot). Starting with 2011.01.0301:00:00 - everything is normal.

P.S.

We are talking about MQ demo accounts (to prepare for the Championship).

Is the history by symbols synchronized?
Reason: