Discussion of article "Library for easy and quick development of MetaTrader programs (part X): Compatibility with MQL4 - Events of opening a position and activating pending orders" - page 4
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
No. Just read the articles
Sorry, but I don't know that many letters. )))
And this is what happened:
While I was running this code on the demo, a limit order was set and deleted.
And suddenly, during the next mocking, one position was modified, one position was opened and one position was closed. But where did the record of deleting a long deleted order come from?
Did you replace the library with the files I gave you? The library in this article is not finished yet - it has this flaw - when two events have the same criteria for MQL4. In the eleventh article, porting of the current functionality of the library to MQL4 has been completed. And the version from this article has this bug, and its presence is indirectly indicated by the final words in the article:
What's Next
In the next article, we will make position closing tracking and fix the errors that may occur in the current implementation of event tracking for MQL4 - because the installation and deletion of orders is tracked by the code for MQL5, and there may be some nuances that need to be taken into account when working under MQL4.Did you replace the library with the files I gave you? The library in this article is not finished yet - it has this flaw - when two events have the same criteria for MQL4. In the eleventh article, porting of the current functionality of the library to MQL4 has been completed. But the version from this article has this bug, and its presence is indirectly indicated by the final words in the article:
What's Next
In the next article, we will make position closing tracking and fix the errors that may occur in the current implementation of event tracking for MQL4 - because the installation and deletion of orders is tracked by the code for MQL5, and there may be some nuances that need to be taken into account when working under MQL4.Yes, I did. I have already described the sequence
Forum on trading, automated trading systems and testing trading strategies.
Discussion of the article "Library for easy and fast creation of programmes for MetaTrader (Part X): Compatibility with MQL4 - Events of position opening and pending order activation"
Alexey Viktorov, 2019.05.27 17:59
And here is such an incomprehensible thing happened:
While I was running this code on the demo a limit order was set and deleted
And suddenly during the next mocking was modified one position, one open and one close. But that's where the record of deleting a long deleted order came from?
At 15:01:14 I deleted a limit order placed earlier.
Until 18:29 I was doing my own business. The Expert Advisor stood on the chart.
At 18:29:21 I modified the previously set position.
At 18:33:02 I put Sell
At 18:34:11, I closed this Sell.
And at that moment I received the second record that the limit that was deleted at 15:01:14 has been removed.
Yes, I did. I already described the sequence, didn't I?
You did:
And this is what happened:
While I was running this code on the demo, a limit order was set and deleted.
And suddenly during the next mocking one position was modified, one position was opened and one position was closed. But that's where the record of deleting a long deleted order came from?
And what is the sequence of these actions?
You wrote:
What is the sequence of these actions?
I have completed the previous message.
Yes, I did. I already described the sequence, didn't I?
I can't get this error in any sequence.
Please describe the sequence leading to it.
It is better not in the log - there are a lot of debugging records there now, which interfere with quick perception, but right here in a numbered list.
I have completed the previous message.
At 15:01:14 I deleted the limit order placed earlier.
Until 18:29 I was doing my own things. The Expert Advisor stood on the chart.
At 18:29:21 I modified the previously set position.
At 18:33:02 I put Sell
At 18:34:11, I closed this Sell.
And at that moment I received a second record that the limit that was deleted at 15:01:14 has been deleted.
I.e., you need to:
At 15:01:14 I deleted the limit order placed earlier.
Until 18:29 I was doing my own things. The Expert Advisor stood on the chart.
At 18:29:21 I modified the previously set position.
At 18:33:02 I put Sell
At 18:34:11, I closed this Sell.
And at that moment I received the second record that the limit that was deleted at 15:01:14 has been removed.
I.e., I need to:
No, watch your hands.
Limit set at 14:54:10 and removed at 15:01:14.
Then a long break in broadcasting. Everything goes silent.
Then several movements in a row, at 18:. listing only minutes 29, 33 and 34. At 34, this event that happened three and a half hours ago comes through.
Here's the list of positions.
They're all open in the morning and at lunchtime. At 18 minutes, only Sell was open and almost immediately closed.No, well, watch your hands
Limit set at 14:54:10 and deleted at 15:01:14.
Then a long break in broadcasting. Everything goes silent.
Then several movements in a row, at 18:. listing only minutes 29, 33 and 34. Now, at 34, this event that happened three and a half hours ago.
Here's a list of positions.
They're all open in the morning and at lunchtime. At 18 minutes, only Sell was open and almost immediately closed.Well, there you go:
At 15:01:14, I deleted a limit order placed earlier.
Until 18:29 I was doing my own business. The Expert Advisor stood on the chart.
At 18:29:21 I modified the previously set position.
At 18:33:02 I put Sell
At 18:34:11 I closed this Sell.
Earlier - is it BEFORE setting the limit order? Or after? When it was opened? "Earlier" is not specific. There's probably significance in the timing of all actions - everything is saved to the list, after all. Somewhere there are equal conditions, since the removal of the old limit order is determined again at the moment of closing the position - the position was closed, we checked the conditions (it is described directly in the code) and determined the type of event based on these conditions. And then the list is sorted by the type of a certain order in the event and the event is sent to the programme - so there is an overlap of conditions in MQL4 that they turn out to be equal for the library. Although this is what I have removed in the 11th article, which is still being tested.
Well, here you are writing:
At 15:01:14 I deleted a limit order placed earlier.
Until 18:29, I did my own thing. The Expert Advisor stood on the chart.
At 18:29:21 I modified the previously set position.
At 18:33:02 I put Sell
At 18:34:11 I closed this Sell.
Previously - is that BEFORE the limit order was set? Or after? When it was opened? "Earlier" is not specific. There's probably significance in the timing of all the actions - everything is saved to the list, after all. Somewhere there are equal conditions, since the removal of the old limit order is determined again at the moment of closing the position - the position was closed, we checked the conditions (it is described directly in the code) and determined the type of event based on these conditions. And then the list is sorted by the type of a certain order in the event and the event is sent to the programme - so there is an overlap of conditions in MQL4 that they turn out to be equal for the library. Although this is what I have removed in the 11th article, which is still being tested.
Forum on trading, automated trading systems and testing trading strategies
Discussion of the article "Library for easy and fast creation of programmes for MetaTrader (Part X): Compatibility with MQL4 - Events of position opening and pending orders activation"
Alexey Viktorov, 2019.05.27 18:50
No, well watch your hands
Limiter put at 14:54:10 and deleted at 15:01:14
Then a long break in broadcasting. Everything goes silent.
Then several movements in a row, at 18:. listing only minutes 29, 33 and 34. Now, at 34, this event that happened three and a half hours ago.
Here's the list of positions.
They're all open in the morning and at lunchtime. At 18 minutes, only one was open, Sell, and almost immediately closed.Modified only one, the highlighted position. There's no doubt about it. It was placed in the morning. Modified it several times. I didn't care which one I modified. I had already set a takeout on this one. That's what I was trying to do.
Here are all the limiters and the last Sell.
The deleted limiters and the Sell are highlighted. The deletion event must have been left somewhere. But why did it "wake up" not with the opening of this Sell, but only with the closing of the Sell?