I would like to see the implementation of several TCs using this library and alternative ones.
And comparative analysis, of course. In particular, performance in the Tester/Optimiser, code size and speed of its writing.
I would like to see the implementation of several TCs using this library and alternatives.
And comparative analysis, of course. In particular, performance in the Tester/Optimiser, code size and speed of its writing.
It's still early. At the moment we haven't prepared the necessary functionality to realise the declared simplicity of creating our own programs. The necessary base is still being created. In the eighth part the functionality for tracking other events, such as modification of orders and positions, their stop levels, is implemented and described. The next article is being prepared, which will start the finalisation for compatibility with MQL4. The next step will be to create full-fledged trading classes, then work with symbols and accounts. And then we will create user-case functions for easy and quick access to any data collected and controlled by the library. And this will not be the final stage, as a set of possibilities of using new graphical objects integrated into the library is being prepared, with access to them as standard ones. That is, the library will have the ability to create its own graphical objects, and have its own graphical shell on the canvas + the possibility of creating from this set of its own graphical elements for its programmes. This is from the previously planned, but there are still plans for implementation.
And realisation of TC - it will be possible in particular after creation of user-case-functions. Although, of course, it is possible to do something even now, but not quickly and easily - because it requires direct access to lists and library objects by pointers, and this is not "take and get" - however, such access is partially organised in the examples of advisors attached to the articles.
... And this will not be the final stage, as a set of possibilities to use new graphical objects integrated into the library is being prepared, with the usual access to them - as to standard ones. I.e., the library will have the ability to create its own graphical objects, and have its own graphical shell on the canvas + the ability to create from this set of its own graphical elements for its programmes....
Will you be writing a graphics library on canvas?
Yes, of course. Not only on it. Some "composite" objects from the set of standard graphical objects will be available for creation, plus there will be offered forms for creating your own GUI with full access to all data collected and controlled by the library - some set of ready-made objects, plus the possibility to build your own GUI from them. Naturally, everything is done so that the user has full access to any needs from one library - "out of the box" so to speak. Plug in one library and you have all the necessary functionality to fully create any of your desires - without searching for the required solutions written and published somewhere.
Yes, of course. Not just on it. There will be available for creation some "composite" objects from the set of standard graphical objects, plus there will be offered forms for creating your own GUI with full access to all data collected and controlled by the library - some set of ready-made objects, plus the possibility to build your own GUI from them. Naturally, everything is done so that the user has full access to any needs from one library - "out of the box" so to speak. Plug in one library, and you have all the necessary functionality to fully create any of your desires - without searching for the required solutions written and published somewhere.
That is, you will create a multiplatform software environment with a full set of possibilities for creating any EAs. Universal library for both platforms with graphics on canvas.
...without finding the required solutions written and published somewhere.
Does that mean the library will become a staff library?
No. This means that one library will be quite sufficient.
Artem, thank you!
In the method:
//+------------------------------------------------------------------+ //|| Updates the order list| //+------------------------------------------------------------------+ void CMarketCollection::Refresh(void)
A "market order" is created dynamically
#else //--- Positions int total_positions=::PositionsTotal(); for(int i=0; i<total_positions; i++) { ulong ticket=::PositionGetTicket(i); if(ticket==0) continue; CMarketPosition *position=new CMarketPosition(ticket); if(position==NULL) continue; //--- Add a position object to the list of market orders and positions if(!this.AddToListMarket(position)) continue; //--- Get the control order index by ticket and position identifier int index=this.IndexControlOrder(ticket,position.PositionID()); //--- If the order is not in the list of control orders - add it if(index==WRONG_VALUE) { if(!this.AddToListControl(position)) { ::Print(DFUN_ERR_LINE,TextByLanguage("Failed to add control position ","Failed to add a control position "),position.TypeDescription()," #",position.Ticket()); } } //--- If the order already exists in the list of control orders - check it for property changes else if(index>WRONG_VALUE) { this.OnChangeEvent(position,index); } } //--- Orders int total_orders=::OrdersTotal(); for(int i=0; i<total_orders; i++) { ulong ticket=::OrderGetTicket(i); if(ticket==0) continue; ENUM_ORDER_TYPE type=(ENUM_ORDER_TYPE)::OrderGetInteger(ORDER_TYPE); //--- Market Order if(type<ORDER_TYPE_BUY_LIMIT) { CMarketOrder *order=new CMarketOrder(ticket); if(order==NULL) continue; //--- Add market order object to the list of market orders and positions if(!this.AddToListMarket(order)) continue; } //--- Pending order else { CMarketPending *order=new CMarketPending(ticket); if(order==NULL) continue; //--- Add a pending order object to the list of market orders and positions if(!this.AddToListMarket(order)) continue; //--- Get the control order index by ticket and position identifier int index=this.IndexControlOrder(ticket,order.PositionID()); //--- If the order is not in the list of control orders - add it if(index==WRONG_VALUE) { if(!this.AddToListControl(order)) { ::Print(DFUN_ERR_LINE,TextByLanguage("Failed to add control order ","Failed to add a control order "),order.TypeDescription()," #",order.Ticket()); } } //--- If the order already exists in the list of control orders - check it for property changes else if(index>WRONG_VALUE) { this.OnChangeEvent(order,index); } } } #endif
Then it is passed by reference to the method :
//--- Add market order object to the list of market orders and positions if(!this.AddToListMarket(order)) continue;
In the method"AddToListMarket" the market order is not taken into account in the hash_sum "hash_sum" then why do we need to enter and control it?
Please explain why we need it, if we can find out all the information from the position or pending order?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Library for easy and quick development of MetaTrader programs (part VII): StopLimit order activation events, preparing the functionality for order and position modification events has been published:
In the previous articles, we started creating a large cross-platform library simplifying the development of programs for MetaTrader 5 and MetaTrader 4 platforms. In the sixth part, we trained the library to work with positions on netting accounts. Here we will implement tracking StopLimit orders activation and prepare the functionality to track order and position modification events.
To test the implemented improvements, we will use the EA from the previous article. Simply rename the TestDoEasyPart06.mq5 EA from the \MQL5\Experts\TestDoEasy\Part06 folder to TestDoEasyPart07.mq5 and save it in the new \MQL5\Experts\TestDoEasy\ Part07 subfolder.
Compile the EA, launch it in the tester, place a StopLimit order and wait for its activation:
Author: Artyom Trishkin