Errors, bugs, questions - page 529

 

My question has already flown away.) I'll say it again.

tol64:
Почему то между 2001 и 2006 годом не тестируются эксперты. Смотрел по евро и фунту. Закрыл терминал, удалил историю. Закачалась заново. Всё равно. До 2001 сделки открываются. А начиная с 2001 по 2006 при наличии сигналов пропуск. Почему?

---
Дополнительная информация. Это происходит только, если в настройках тестера выбран таймфрейм D1. Если выбрать таймфрейм D1 в настройках эксперта, а в настройках тестера меньший ТФ, то пропуска нет. Это баг или есть какое-то этому объяснение? 

Has anyone experienced a similar problem?
 
Yedelkin:
Well, have a look at the code given by the author. And in what case PositionGetDouble is called :)

Well, yes, we get the data after we've determined that there are no positions in principle and the selection of a particular position has failed...

It is somehow strange.

 
papaklass:

To Vedelkin.

Once again. The reference says that in order to guarantee fresh position data, it's recommended to call the PositionSelect( Symbol() ) function just before calling for them. The code I've provided here disproves this statement. Logically, the code itself is absurd, but it underscores the incorrectness of the statement in the help.

Now:

And the bug is that the PositionGetDouble(POSITION_VOLUME) function should return zero if there is no position. That's it. IMHO.

No,you're wrong....

Return zero if there is(PositionSelect() ) position with volume=0.

Ordo you think that if there is no position, you should return zero and the opening price =0 ?!?

 
papaklass:

And the bug is that the PositionGetDouble(POSITION_VOLUME) function should return zero if there is no position.

:) The "flaw" is that in the absence of an open position it makes no sense to request its data and make further calculations based on these data.

Well, let's say you know for sure that there is no position. So why would you request its data (to do extra steps), if you already know that there is no position? It's easier to rewrite the code a bit.

papaklass:

Once again. The reference says that in order to guarantee the guaranteed acquisition of fresh position data, it's recommended to call the PositionSelect( Symbol() ) function just before calling for it. The code I've provided here disproves this statement. Logically, the code itself is absurd, but it emphasizes the incorrectness of the statement in the help.

The code above only says that the author "in order to guarantee fresh data" calls the PositionSelect() function, the function reports its failure, but the author still requires fresh position data. Is it correct?

But then we get the following:

  • (a) the failure of the PositionSelect function means that fresh position data has not been copied into the software environment (as the author would like);
  • and (b) subsequent calls to PositionGetDouble, PositionGetInteger and PositionGetString will return data copied once before when the PositionSelect function was successful
  • .

In other words, the developers recommend to call the function in order to continue working with fresh position data when the function completes successfully, and they do not promise anything at all if the function returns false. ...When receiving false, the developers recommend somewhat different procedures :)

2. Moreover, let's consider a new version of the code:

if(PositionSelect(Symbol()))
   {//---еще одно непосредственное обращение
      //---например, расчитываем объем позиции при доливки
   } 
else 
   {
      //---например, расчитываем объем позиции при отсутствии позиции
   }

Here, if the PositionSelect() function fails, it prompts us to "calculate the amount of position when there is no position". But who says that the failure of the PositionSelect() function automatically means that there is no position? The reasons for the failure of the PositionSelect() function can be different.

 

I would like to pester the developers once again...

I want to tell by drawing that it is vitally important to be able to deletepending orders when a certain price is reached. As MT4 trader, I am much more interested without such an option. Please tell me what are your future plans in this direction. Thank you.

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
Files:
zhq04b2p01.png  16 kb
 

The terminal crashes very often when working with the tester.

 
tol64:

The terminal crashes very often when working with the tester.

The terminal crashes are reported to the developers on a regular basis in automatic mode. But if you want, you can make an application to the CD with all the details and attach the logs.
 
tol64:

The terminal crashes very often when working with the tester.

Describe your situation in detail to Service Desk, specifying

  • Input parameters of the Expert Advisor during testing
  • attach indicator (the indicator will be removed after fixing).
 
Interesting:
Terminal crash reports seem to come in automatically to the developers on a regular basis. But if you want, you can make a request to the CA, where you specify all the details and attach the logs.
So, that information which is in Details>> is automatically sent to the developers if the Internet? If so, that's great. Everything should be automated.)))
 
ALozovoy:

Describe your situation in detail to Service Desk, specifying

  • Input parameters of the Expert Advisor during testing
  • attach indicator (the indicator will be removed after fixing).

Ok, I will do it later.