Errors, bugs, questions - page 2

 
Interesting:

It works, tested on three brokerage houses (search for all instruments traded on the brokerage house)

Try it like this

  for(int li=0; li<SymbolsTotal(true); li++)
  {
  PrintFormat(SymbolName(li,true));
  } 
For OnTick, this is just an example.
 
ddd06:

That's what I'm saying: true doesn't work!

  for(int li=0; li<SymbolsTotal(false); li++)
  {
  PrintFormat("%s",SymbolName(li,false));
  }
This is the right way to do it. since you are using the function to output the information
PrintFormat(....) не путать с Print(.......)
 
sergey1294:
This is the right way to do it. as you are using a function to output the information
Thanks, I just didn't understand them, but the question remains:)
 
ddd06:
Thanks, I just did not understand them, but the question remains:)

On real quotes (real, demo and probably bidding) this code works fine tested on 3 terminals (called during initialization)

  for(int li=0; li<SymbolsTotal(true); li++)
  {
  //PrintFormat(SymbolName(li,true));
  //Так конечно правильней, но первый вариант тоже проходит за милую душу...
  PrintFormat("%s",SymbolName(li,true));
  } 

I have shown 15 pairs that are in market review.


In normal testing only symbols specified in tester parameters are considered (if other symbols are needed it should be taken as false and array of my symbols), in "all symbols selected ..." optimisation will probably show all symbols (but most likely one by one changing them).


PS

If your EA is multicurrency, you should have your own list of symbols in the tester and compare it with a list of symbols presented in your brokerage company.

 

That's cool, but I think it's an oversight.

Thanks for figuring it out.

Interestingly, what about the first post, so far no one responded, type of could write - We'll fix in the next build.

 

The number of orders and trades in the history is not returned:

TerminalInfoInteger(TERMINAL_BUILD) 279
void OnStart()
  {
    Print("+---------------------------------------------------------+");    
    Print("PositionsTotal() ",PositionsTotal());
    Print("HistoryDealsTotal() ",HistoryDealsTotal());
    Print("OrdersTotal() ",OrdersTotal());
    Print("HistoryOrdersTotal() ",HistoryOrdersTotal());    
  }

priming

Order history

 
Urain:

The number of orders and trades in the history is not returned:


You have to first load the history using the function:

HistorySelect(0,TimeCurrent())
 
Valmars:

I have to download the history first with the function:


Yes thanks, it works, I will go on reading the manual :o)

I just couldn't think that there is a separate flow for user and EA,

I thought that if the history is displayed, it means that it should be read by the Expert Advisor,

But this is more correct - the terminal creates its own space for Expert Advisors,

The terminal creates its own space for Expert Advisors,

This is similar to what was implemented in mql-4 in the form of a buffer that was periodically loaded with history.

 
Urain:

Yes thanks, everything works, I will go on reading the manual :o)

I just couldn't think that there is a separation of threads for user and EA,

I thought that if the history is displayed, it means it should be read by an EA,

But this is more correct - the terminal creates its own space for Expert Advisors,

the information selection is performed in its own format and is much faster,

The analogue of that was implemented in mql-4 in the form of a buffer where history was periodically loaded.


Unfortunately, the space for the scripts, EAs and the terminal is common. You can make sure of it if you call the terminal history for the last day (day) and then run the above function from the script or Expert Advisor. And you will see that the history in the terminal also changed to 'All history'. I think this is a flaw in the terminal. Imagine that you have several Expert Advisor scripts running, and each one is requesting its own history. The history in the terminal will bounce (visually). You need to have the 'History' tab display the current state regardless of the Expert Advisors.

Besides, history in the terminal is often updated with a delay, i.e. a trade is executed, a position is closed but it does not appear in the 'History' tab. Once I was purposely waiting for the history to be updated. It was minutes..... I never waited. It only appears after executing a context command to request history from the 'History' tab or a script requesting history.

 
ddd06:

That's cool, but I think it's an oversight.

Thanks for figuring it out.

It's interesting, that with the first post, still no one answered, they could write - We'll fix it in the next build.

The flaw is that you use PrintFormat without explicitly using the format string.

What should we fix in the next build?

Документация по MQL5: Общие функции / Print
Документация по MQL5: Общие функции / Print
  • www.mql5.com
Общие функции / Print - Документация по MQL5
Reason: