Errors, bugs, questions - page 1861
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
another question - is it normal that there are no flags? build 1585
Alpari
fxopen
Bid and/or Ask
Last and Volume
all ticks
if everywhereCOPY_TICKS_ALL =COPY_TICKS_INFO +COPY_TICKS_TRADE
then what does it equal at Alpari?
Alpari
fxopen
They have no flags.
it is clear, but then what is added to getCOPY_TICKS_ALL?
because they haveCOPY_TICKS_TRADE=0
and the ticks in the story with the missing flags are the unknownCOPY_TICKS_TRADE ?
it is clear, but then what is added to getCOPY_TICKS_ALL?
because they haveCOPY_TICKS_TRADE=0
and the ticks in the history with missing flags is unknownCOPY_TICKS_TRADE ?
HistoryDealGet* and HistoryOrderGet*-functions are written very strangely, in terms of performance.
When I make HistorySelect, for example, for 100K individual records. The HistoryDealGet-function shall require as the first argument not the number of records in the history table, and a ticket. And the table is sorted by time, and not by ticket. Therefore, the first thing the HistoryDealGet function does, each time it executes, is to run through the table and look for a matching ticket.
Why such a waste of resources! It turns out that the very first ticket and the most recent one will be executed at different speeds. And to get all characteristics of the last deal, HistoryDealGet-functions will run through the whole table each time.
Why not make it normal?
And how can HFT-robot be tested, if in order to get the amount of commission of the current position, we have to climb into the slow history every time through HistorySelect, and in no case through HistorySelectByPosition? The slippage of the pending order turns into a performance trash!
ACCOUNT_PROFIT in the tester shows nonsense.
Now we run an Expert Advisor that opens and closes the position immediately
The result is
ACCOUNT_PROFIT shows zero, but in fact it is -56.44. As a consequence, equity, drawdown, etc. are estimated incorrectly.
PositionGetDouble(POSITION_PROFIT) - same thing.
And how can an HFT-robot be tested, if in order to know the commission size of the current position, you need to get into the history through HistorySelect and in no case through HistorySelectByPosition? To see the slippage of a pending order turns into a performance trash!
Does HistorySelect work through a binary search of the requested time interval or not? I.e. O(N) or O(log(N))?
No. Binary search is not applicable in this case
So internally both stories (Orders and Deals) are sorted by time.
I'm sorry, I got a little excited.
Yes, they are sorted by time. The initial record is searched with a binary search.