MT5 and speed in action - page 21

 
fxsaber:

Left only the 0-INT_MAX variant in combat robots. Stopped noticing the brakes.

What do you then do with this history?

Of course I can change the sub-account every month to limit the order history to some hundred thousand, but that's not the solution :)

 
Dmi3:

What do you then do with this history?

I could of course change the sub-account every month to limit the order history to a hundred thousand, but that's not the answer :)

  static ulong IsHistoryDeals( const long TimeMsc )
  {    
    ulong Res = 0;
/*    
    if (_B(::HistorySelect(TimeMsc / 1000, INT_MAX), 5))
    {
      const int Total = _B(::HistoryDealsTotal(), 1);
      
      if (Total > 100)
        ::Alert("::HistoryDealsTotal() = " + (string)Total + ", TimeMsc = " + NEWTICKS::TimeToString(TimeMsc));
                
      for (int i = Total - 1; !Res && (i >= 0); i--)
      {
        const ulong Ticket = _B(::HistoryDealGetTicket(i), 1);
        
        if ((_B(::HistoryDealGetInteger(Ticket, DEAL_TIME_MSC), 1) >= TimeMsc) &&
            (_B(::HistoryDealGetString(Ticket, DEAL_SYMBOL), 1) == _Symbol))        
          Res = Ticket;
      }
    }    
*/    
    if (_B(::HistorySelect(0, INT_MAX), 1)) // 
    {
      const int Total = _B(::HistoryDealsTotal(), 1);
      
      for (int i = Total - 1; !Res && (i >= NEWTICKS::PrevTotal); i--)
      {
        const ulong Ticket = _B(::HistoryDealGetTicket(i), 1);
        
        if (_B(::HistoryDealGetInteger(Ticket, DEAL_TIME_MSC), 1) < TimeMsc)
          break;
        else if (_B(::HistoryDealGetString(Ticket, DEAL_SYMBOL), 1) == _Symbol) 
          Res = Ticket;
      }
      
      NEWTICKS::PrevTotal = Total;
    }    
    
    return(Res);
  }
 
fxsaber:
At the moment I see that in 99% of cases only HistorySelect(0, INT_MAX) must be used. Try not to use the other options.

Probably enough not to move the start of the cache, i.e. always query from the same date (and whether it's 0 is irrelevant).

We need to check.

 
Andrey Khatimlianskii:

Probably enough not to move the start of the cache, i.e. always query from the same date (and whether it's 0 is irrelevant).

It needs to be checked.

Possibly. It's hard to be a tester for a long time.

 
fxsaber:


Result.


On every tick there is a problem.


SZY installed Win10, LatencyMon shows everything is fine.

Why are you pretending to be so naive?

You're trying to show that it's not ok to kill cache in the first place, it's your own fault. It is your own fault that you are killing the cache on a big story. And it's solely your problem to purposely tweak your position. You can find many opportunities to kill/delete a bunch of caches in MQL5 environment.

We are not going to help you - in any programming language there are a huge number of options to shoot yourself in the foot and head.

You would be treated normally if you explicitly pointed out "look - this is me poisoning the cache on purpose and shooting myself".
 
Andrey Khatimlianskii:

Probably enough not to move the start of the cache, i.e. always query from the same date (and whether it's 0 is irrelevant).

It needs to be checked.

This is exactly what I explicitly described.

If you're sampling by date, don't try to do a different from sample on every request. And with to date try to put it forward.

We specifically control to position and automatically reduce it to INT_MAX if it exceeds or equals current date.

 
Renat Fatkhullin:

You are trying to show that killing the cache is not the norm, both before and now. It's your own fault for killing the cache on a big story. And it's solely your problem to specifically tweak from a position. You can find many opportunities to kill/delete a bunch of caches in MQL5 environment.

One library uses HistorySelect from TimeCurrent. The other is from zero. Why the fuck should I get into the guts of libraries to find out that they are not compatible with each other for performance?

A succinct example is figuring out why harmless libraries might interfere with each other. Finally, engage in critical thinking.

 
fxsaber:

One library uses HistorySelect from TimeCurrent. The other is from zero. Why the fuck should one have to get into the guts of libraries to find out that they are not compatible with each other for performance?

A succinct example is figuring out why harmless libraries might interfere with each other. Turn on your critical thinking at last.

It's so fucked up that it's your personal problem that you use libraries and turn your head off.

 
Renat Fatkhullin:

It's your own fucking problem to use libraries and turn your head off.

Why don't you go and write everything from scratch in Asm yourself? It turns out that it's OK when each of the libraries flies separately. But as soon as you start using both of them at once, you start to get sluggish.

 

We have successfully reported bugs to Microsoft, but we have never written or accused them that there are about N million opportunities to kill ourselves on their API.

Especially while using other people's libraries in the process.