Discussion of article "Library for easy and quick development of MetaTrader programs (part XXIII): Base trading class - verification of valid parameters" - page 2
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
What is meant by "expert status"?
Suppose I have a TS with 2 indicators, but I trade on one indicator all the time, on the other indicator only 2 times after the start and further I will open orders after the last loss on the 1st indicator.....
it doesn't matter which TS, but a certain TS with which orders are placed according to an independent principle, but the moment of switching on the second TS is important, i.e. multi-expert can be called, or 2 TS in one EA ...
if you overload the terminal, you can complicate the algorithm of searching for starting orders, because we may not know which TS started working first?
as in your large EA, there may be a need to save data, that's why I'm asking, will there be or have there been already written or are there no classes/functions for saving complex data formats?
the library can.
The same information is not available in the MT4 trading history.
The same information is not available in the MT4 trading history.
Yes, it is not. But there is (at the moment) in the list of events. It is recorded during the Expert Advisor operation. And everything is available in it.
Naturally, after reloading the terminal or restarting the Expert Advisor, the current history of the Expert Advisor will be lost. But this is only for now, because in the future all important elements of all lists will be saved to files and read from them when restarting. Not in the tester, of course.
Suppose I have a TS with 2 indicators, but I trade on one indicator all the time, on the other indicator only 2 times after the start and in future I will open orders after the last loss on the 1st indicator.....
it doesn't matter which TS, but some kind of TS with which orders are placed according to the independent principle, but the moment of switching on the second TS is important, i.e. multi-expert can be called, or 2 TS in one EA....
if we overload the terminal, we can complicate the algorithm of searching for starting orders, because we may not know which TS started working first?
as in your large Expert Advisor, there may be a need to save data, that's why I'm asking if there will be or have already been written or are there no classes/functions for saving complex data formats?
I don't really understand to be honest. How can a library know about the logic of an EA that hasn't been created yet? It is intended to facilitate creation of programs for terminals, and it doesn't know at all what programmes will be created with its help.
At the same time, if something is difficult to define programmatically, it is quite likely that it will be easy to do it with the help of the library, and then it will be possible for the expert writer to control everything quickly.
I need not an abstract example to understand itbetter.
I don't really understand it to be honest. How can a library know about the logic of a not yet created Expert Advisor? It is intended to facilitate creation of programs for terminals, and it doesn't know at all what programs will be created with its help.
At the same time, if something is difficult to define programmatically, it is quite likely that it will be easy to do it with the help of the library, and then it will be possible for the expert writer to control everything quickly.
I need not an abstract example to understand itbetter.
It is enough for you to implement it:
Naturally, after reloading the terminal or restarting the Expert Advisor, the current history of the Expert Advisor will be lost. But this is only for now, because in the future all important elements of all lists will be saved to files and read from them when restarting. Not in the tester, of course.
at first glance this is a simple task, but there are a lot of problems: synchronisation with a file, timely recording, logic of recovery after restart..... there are a lot of nuances in which I would like to see the implementation of writing complex data types
is enough for you to realise
Naturally, after reloading the terminal or restarting the Expert Advisor, the current history of the Expert Advisor will be lost. But this is only for now, because in the future all important elements of all lists will be saved to files and read from them when restarting. Not in the tester, of course.
at first glance this is a simple task, but there are a lot of problems: synchronisation with a file, timely recording, logic of recovery after restart..... there are a lot of nuances in which I would like to see the implementation of recording complex data types
So this has been planned for a long time - you can say that from the beginning. I will implement it when all necessary data collections will be created - to do everything at once.
But what was written about - that it is necessary to understand when which TC was the first to trade - it does not need such complexity. After all, the library sees the entire history of the terminal from account replenishment to the present time. For MetaTrader4 it is important to resolve the entire history in the terminal. I didn't do it with the help of dll - I plan to provide possible possibilities (pun intended) with standard tools, that's why I didn't consider dll and won't consider it.
Therefore, you can always quickly find all deals of each TS for any time period and compare them. Which deal is the first - that TS and slippers.
MQL4 does not store the history of triggered pending orders, you can only define in the history of orders:
I tested this functionality of the library on mql4. History has nothing to do with it, the library catches the very fact of pending order activation and at this moment all properties of an open position are available.
I tested this library functionality on mql4. History has nothing to do with it, the library catches the very fact of activation of a pending order and at this moment all properties of an open position are available.
Not only at this moment. The history of all triggered orders (and in general - all trading events) is stored in the library and is available throughout the work. That is, you can always find the whole history of a position - from setting a pending order to its complete closing.
However, it is not yet implemented to save the history of the Expert Advisor to a file - after restarting the Expert Advisor, the history of all its trading events will be lost and will start accumulating again after the next trading event. But this behaviour is temporary - initially it was planned to save all important information to files. This will be done later - after creating all the necessary data collections.
CEngine has a method GetListAllOrdersEvents(), which returns to the control program a complete list of all trading events that have occurred on the account since the launch of the library-based programme.
To get the full list of trading events belonging to an Expert Advisor (or its positions with a certain magician), you should filter the obtained list by the necessary magician:
And then in a loop through the obtained list you can get all trade events from the list one by one and work with them.
Not only at this moment. The history of all triggered orders (and in general - all trading events) is stored in the library and is available throughout the entire work. That is, you can always find the entire history of a position - from setting a pending order to its complete closing.
However, it is not yet implemented to save the history of the Expert Advisor to a file - after restarting the Expert Advisor, the history of all its trading events will be lost and will start accumulating again after the next trading event. But this behaviour is temporary - initially it was planned to save all important information to files. This will be done later - after creating all the necessary data collections.
CEngine has a method GetListAllOrdersEvents(), which returns to the control program a complete list of all trading events that have occurred on the account since the start of the programme based on the library.
To get the full list of trade events belonging to an Expert Advisor (or its positions with a certain magician), you need to filter the obtained list by the required magician:
And then in a loop through the obtained list you can get all trade events from the list one by one and work with them.
I said only what is important for me at the moment. And what has been tested. Thank you for the clarifications, when there will be a need I will torment you with questions.
far into library improvements (resources, sounds, etc.) and I think you missed the basic tasks.
Thank you, the library is very much needed.