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 6
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. You have certainly done a great and necessary work. For what you have a huge human thank you! But there is a question. The Expert Advisor that you use for tests when working on the account modifies all orders and positions regardless of the majiks and differences of currency pairs. I.e. you put it Eurobucks and at the same time another owl stands on another currency and holds there its orders and positions. you click on your advisor modification of profit or stop and it pulls not only Eurobucks, but everything that is in the terminal. It's not kosher. Thanks for understanding.
Hello. The Expert Advisor is intended only for testing the material in the article. Each article comes with a test Expert Advisor, and each Expert Advisor can be tested only for what it was made for - the library described in the article, from the files of which the Expert Advisor is taken.
When the whole series of articles is finished, you will be able to easily create your own programmes using the described library.
Artem I replayed the situation.
The script closed all yesterday's open positions. I did not put any orders on the account, but yesterday's ones are closed. There are records of deleting orders. And not just one. There was a record "This event is already in the list" three times.
Then I placed three more positions and closed them with the script again. Everything happened again. Three positions closed ... three attempts to delete a position that is already in the history.
Even though you don't like logs, I'll put it directly from the "Experts" tab.
At the moment of USDJPY opening (bottom line of records) there were no open positions and pending orders.Reproduced, found, corrected.
In the Refresh() method of the CEventCollection class you need to add in line 233 (the line may have a different number, as I have everything in constant development):
This fix will be included in article 12Thank you. I added it. The line number has not changed.
Good
I am writing in a different line.
Thank you, Artem, for such a wonderful and informative series of articles
I'm writing in a different line.
Thank you, Artem, for such a wonderful and informative series of articles
You're welcome, Alexei. We've been on a first-name basis for a long time.....
Thank you all for the responses. I understand the purpose of this panel perfectly. I just liked the panel. By the way, I solved my question by sorting position sheets and orders by magic. Honestly, I was too lazy to get into the code right away.
Well, that's good.
Indeed, now you can already get all lists, and from them any object. And the lists can be sorted as needed and filtered by any of the values. To do this, CSelect() is used for the obtained list - there are examples in the library class methods.
As a result, easy access, selection and filtering will be organised. So far only the creation of the necessary database is in progress.
The idea is good. But I think it has already been implemented by fxsaber.
You can use the works of fxsaber