Questions on MQL5 Wizard and standard library of trading classes - page 9

 
-Alexey-:

What, then, is its practical, rather than tester, purpose? It seems to be there, but you can't use it. And why any questions on this subject, e.g. suggestion to introduce such processing or write an article by developers or some guide on error handling are always received with silence from developers? After all, they are the most competent on the subject - what's the problem? It looks strange, to say the least, that instead of something really useful, we are working on a bunch of indicators that no one needs (0 comments, 0 requests for them), when there is no basis for trading - the ability to open and close trades. The question of the emulator of auto-trading got hung up without an answer, but it has to be in the standard library. I would like to hear the answer.

So nobody hides the fact that the strategy wizard is only for the tester. )) Just and quickly check this or that idea and then decide in which direction to go. And error handling is not such a difficult task. You can at least look at how others do it. For example, KimIV's function library on the fourth forum. I think I could even write an article on this subject, but I don't have that much time now.

And the developers now, I understand, have all their efforts focused on developing the project as a whole. The Market, Signals and Warehouse services are hanging in the air, maybe some more bugs. These are the primary tasks now in my opinion.

 
The point is not whether the task is complex or not, but whether it needs to be implemented in a standard library. It would be a good idea to define a list of the main tasks when writing an EA and implement them for the developers, so that there is no need to watch how others do it, or wait until someone has time to write an article.
 
beginner:

The point is not whether the task is complex or not, but whether it needs to be implemented in a standard library. It would be a good idea to define a list of the main tasks when writing the EA and implement them for the developers, so that there is no need to watch how others do it, or wait until someone has time to write an article.
In any case, you will most likely have to wait for the company to solve higher priority tasks. Perhaps sometime in the near future it will be implemented. Here I decided not to wait, as I really don't like waiting and have already implemented it a long time ago. It didn't take long at all. Moreover, I did it at the very beginning of learning the language. You could write your request to the Service Desk. What if I do? ))
 
tol64:
... But what if I do? ))

No.

I'm sorry, but that's what the Standard Library is for, to contain standard solutions. Processing of trading errors greatly depends on trader's preferences.

So, dear friends, let's do it by ourselves.

 
tol64:
In any case, it will probably have to wait until the company has more priorities. Perhaps it will be implemented sometime in the near future. Here I decided not to wait, as I really don't like waiting and have already implemented it a long time ago. It didn't take long at all. Moreover, I did it at the very beginning of learning the language. You could write your request to the Service Desk. What if I do? ))
The implementation can be done by anyone, in any way. Are you sure that you did everything optimally, correctly and beautifully. Of course, there can be many variants, but only one typical of the developers to customize it to your needs or use as is.
 
beginner:
The implementation can be done by anyone and in any way. Are you sure that you have done everything optimally correctly and beautifully? Of course, there can be many variants, but one typical of the developers is enough to customize it to your needs or use it as it is.
Not yet tested on the real, but those who have tested (competent members of the forum) are quite satisfied. Just look at the finished version, it is available, but for MT4. It is the same on MT5. Victor Kirillin has already answered above, so it is better not to wait and do it. )) Exactly according to the pattern as you want.
 

Hello, I have 2 questions.

1) In the double CExpertSignal::Direction() method, to normalize the result across all filters, we divide the resulting total value by the number value. Suppose we use one single filter, then according to the code of the standard library, the value of number that =1 during initialization will increment +1 and become 2. So the result obtained from one filter is divided by 2. Question = is there an error?

double CExpertSignal::Direction()

{

CExpertSignal *filter;

long mask;

double direction;

double result=m_weight*(LongCondition()-ShortCondition());

int number=1; // number of "voted"

//---

int total=m_filters.Total();

//--- for debugging

//printf(__FUNCTION__+" : %s %d",EnumToString(m_period),total);

//--- loop by filters

for(int i=0;i<total;i++)

{

//--- mask for bit maps

mask=((long)1)<<i;

//--- check of the flag of ignoring the signal of filter

if((m_ignore&mask)!=0) continue;

filter=m_filters.at(i);

direction=filter.Direction();

//--- the "prohibition" signal

if(direction==EMPTY_VALUE) return(EMPTY_VALUE);

//--- check of flag of inverting the signal of filter

if((m_invert&mask)!=0) result=direction;

else result+=direction;

number++;

}

//--- normalization

result/=number;

//--- return the result

return(result);

}

2) Could you please tell me what m_adjusted_point variable means?

Thank you.

Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 
IlshatG:

Hello, I have two questions.


1) There is no fundamental error.

2) Correction for 3/5 digit quotes.

 
uncleVic:

No.

I'm sorry, but that's what the Standard Library is for, to contain standard solutions. The processing of trading errors greatly depends on the trader's preferences.

So, dear friends, it's a "do-it-yourself" thing.

What do your preferences have to do with it? Who knows the capabilities of the server configuration better than you? No one. You can define the adequate response - the typical one - and the trader will tweak it according to his taste and knowledge. The timings in the exchange protocols and so on? Does the trader trade or go deeper into studying the errors? The programmer should write algorithms or study the errors? The programmer should study the API for writing an emulator (for a glitchy one) of auto-trading in case of server failure or write the algorithms? How much time to spend on this instead of trading?
 

Hello.

I decided to write my own signal module purely for cognitive purposes. I have faced a problem. I have to set pending orders. I have understood that it can be done through CExpertSignal::OpenLongParams(...). But I have a problem - my tester warns about Invalid Expiration. Having dug the source code, I realized that we can't get any type time apart fromORDER_TIME_SPECIFIED and we would like ORDER_TIME_GTC.

I have made a smart move so far, but it's not quite right. I have corrected the function in the library:

bool CExpertTrade::SetOrderExpiration(datetime order_expiration)
  {
   if(m_symbol==NULL) return(false);
//---

   if (order_expiration == 0)
   {
      m_order_type_time =ORDER_TIME_GTC;      
   }
   else
        if(!SetOrderTypeTime(ORDER_TIME_SPECIFIED)) return(false);
//---
   m_order_expiration=order_expiration;
//---
   return(true);
  }

What can you advise

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