Errors, bugs, questions - page 1862

 
Slawa:

Yes, sorted by time. The initial entry is searched by binary search.

Isn't it logical to search for the last record the same way?

It's very stressful to organize the history. HFT in the tester is almost unrealistic. I've written several posts on the forum about it and made a request to the SD.


And another thing, if the terminal already has the history, why do you require using HistorySelect instead of SELECT_BY_POS in MT4? And it's not clear at all, why HistoryDealGet* is implemented through the ticket with appropriate O(N), when it is reasonable to use SELECT_BY_POS again?


Very interesting records

HistoryDealGetInteger(DealTicket, DEAL_TICKET);
HistoryOrderGetInteger(OrderTicket, ORDER_TICKET);
 
fxsaber:

Isn't it logical to look for the last entry in the same way?


Why?

From time to time. You find the start time, and then you go element by element. Up to the end time.

It would make sense if all records were in the same memory block. I have already told you in servisdesk that orders and transactions in the history are stored in block arrays, so that there is no memory reallocation, only redistribution

 
Slawa:

Why?

From time to time. The start time is found, and then it's copied element by element. Until the end time.

It would make sense if all records were in the same memory block. I already told you in servisdesk that orders and trades in the history are stored in block arrays, so that there is no memory reallocation, only redistribution

In order to copy in chunks and not piecemeal. I.e. through binary search we find both indexes, and then a chunk of the first block, all blocks completely to the last and the remaining chunk to the last.
 
fxsaber:

The organisation of the history work is very stressful. HFT in the tester is almost unrealistic.


Solved algorithmically.

For HFT you don't need to go to the history every time. Prepare necessary information during initialization and keep it ready to access very quickly

 
Slawa:

The solution is algorithmic.

For HFT, you don't need to go into the history every time. Prepare the necessary information during initialization and keep it ready to access very quickly

And find out how the last position was closed?
 
fxsaber:

and made an application to the SR.

I don't understand why. If you want a discussion, have it here. They don't teach programming at Service Desk
 
fxsaber:
And find out how the last position closed?

During initialisation go once and remember.

Save all the information you need on your own during the process. All tools are there

 
Slawa:
Now this is completely unclear as to why. You want a discussion, have it here. They don't teach programming at servicedesk

I've encountered a few times when developers, due to their circumstances, miss the message. It doesn't work like that in SD.


It's not about the level of programming skills. And it's probably not bad at me as far as MQL5 is concerned. I'm making an argument that working with history is very slow and strange, in terms of even the logic of use. HistoryDealGet*- O(N). Why did everyone do it this way? Why isn't there normal access to HIS history?

 
Slawa:

During initialisation, go once and remember.

Save all the information you need on your own during the process. All the tools are there

No, I'm not fooling around. How do I know that the position is closed TP or SL in the tester without accessing the history?

You want to memorize the TP/SL and check on the tick where the position is closed, if it satisfies the TP/SL-closing? Who satisfies - at that level the tester closed with a high probability. Right?

And the profit of the closed position? - In the same way? Then it is akin to writing your own tester.

 
fxsaber:

No, I am not playing dumb. How do you know if a position has closed on TP or SL in the tester without reference to history?

Are you suggesting to memorize the TP/SL and check on the tick, where the position is gone, whether it satisfies the TP/SL-closing? Who satisfies - at that level the tester closed with a high probability. Right?

And the profit of the closed position? - In the same way? Then it is akin to writing your own tester.

Apparently, I don't understand something about HFT. As far as I know, when you trade "very fast", you don't care about previous trades.
Reason: