Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1114
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
hello! can you tell me if it's realistic to parse data from herehttps://www1.oanda.com/lang/ru/forex-trading/analysis/forex-order-book
so that the data can be collected in Excel for further calculations?
see oanda api - if I am not mistaken in the picture it is PositionBook
ChartNavigate()
It works, but there are constant "glitches". The graph is positioned n times and then jumps to the end. And I have to rewind manually to see the found figure. Is it supposed to be like that or is it an error of MT?
There is no other way to position the chart?
It works, but there are constant "glitches". The graph is positioned n times and then jumps to the end. And I have to rewind manually to see the found figure. Is it supposed to be like that or is it an error of MT?
There is no other way to position the chart?
You have to disable graph autoscrolling. And remember that it is an asynchronous command.
Good evening.
Can you please tell me if it is appropriate to compare the order opening sequence from the history by ticket number? (As it is done in known video tutorials)
Doubts arose because OrderSend() returns int type, which is not infinite, and, I assume, is reset at some point.
Good evening.
Can you please tell me if it is appropriate to compare the order opening sequence from the history by ticket number? (As it is done in known video tutorials)
Doubts arose because OrderSend() returns int type, which is not infinite, and, I assume, is reset at some point.
in general, it is incorrect. It's just historically so and so far it's supported. Int overflow is a tricky thing :-)
Besides overflow, it's a security-bug, I think that in some future releases it will be "broken" and all IDs will become unpredictable.
for saving the sequence there are timestamps, if they are not enough magic and comments will help
PS/ by the way even in 4 it's possible situations when later order will get lower ticket without integer overflow. For example two EAs working simultaneously on different charts in the same strategy.
Good evening.
Can you please tell me if it is appropriate to compare the order opening sequence from the history by ticket number? (As it is done in known video tutorials)
Doubts arose because OrderSend() returns int type, which is not infinite, and, I assume, is reset at some point.
No, it is not. Consistency is not guaranteed in order of increasing ticket numbers.
A chain of orders
MarketBuy #1, MarketBuy #2, PendingBuyLimit #3, MarketBuy #4, PendingSellLimit #5, MarketSell #6, MarketSell #7, MarketBuy #8
can have a sequence of positions
Buy #1, Buy #2, Buy #4, Sell #6, Sell #7, Sell #5, Buy #3, Buy #8
I'm writing this code by looping through the history. I take only the most recently closed trade
Why does the symbol return as a number?
I'm writing this code by looping through the history. I take only the most recently closed trade
Why does the symbol return as a number?
Because that's what you do- you get a code for every character in the string, not starting with the first, and output the codes in the commentary on the chart.
Because that's exactly what you're doing - getting the code of every character in the string, not starting with the first, and displaying the resulting codes in the comment on the chart.
Yeah. I'm in full meltdown. Artem, thank you very much.