Discussion of article "A Virtual Order Manager to track orders within the position-centric MT5 environment"

 

New article A Virtual Order Manager to track orders within the position-centric MT5 environment is published:

This class library can be added to an MT5 Expert Advisor to enable it to be written with an order-centric approach broadly similar to MT4, in comparison to the position-based approach of MT5. It does this by keeping track of virtual orders at the MT5 terminal, while maintaining a protective broker stop for each position for disaster protection.

Figure 7. Two EAs with opposing virtual orders and no position is open at the broker

Author: Paul

 
I have been waiting for that article, thanks.
 

Really nice article

Bravo 

 
Virtual orders are the best way to model MQL4 trading functions in the new MT5 terminal.
Thanks to the author for the idea and the article.
Документация по MQL5: Торговые функции
Документация по MQL5: Торговые функции
  • www.mql5.com
Торговые функции - Документация по MQL5
 
Just the other day I thought that sooner or later one bright head will create such a library. Thank you very much - this is what I need and what stopped me at this stage from mastering version 5. In my case there is just the joint work of several experts on one tool
 

badass

 
What can I say, ours (ruskaphones) were only whining and crying on the forums that their favourite locs were being deprived. And here, the foreign-speaking part of the MT community has done it. A striking contrast, as it is not sad, in the approach to solving the problem.
 

There seems to be a flaw with VOM.

I loaded the FraMA Cross EA VOM.mq5 EA to EURUSD H1 chart and manually opened a Sell order.  With the open sell order, there is no Comment() on chart. Pic attached.

/+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
// Need to include this line in all EAs using CVirtualOrderManager  
   VOM.OnTick();
   Comment(VOM.m_OpenOrders.SummaryList());


I also tested this Comment() in EA with 1 open sell order and Comment line on chart was "Open Orders = 0".

/+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
// Need to include this line in all EAs using CVirtualOrderManager  
   VOM.OnTick();
   Comment("Open Orders = ",VOM.OpenOrders());
Files:
vom_ea-pic.jpg  70 kb
 
wackena:

There seems to be a flaw with VOM.

I loaded the FraMA Cross EA VOM.mq5 EA to EURUSD H1 chart and manually opened a Sell order.  With the open sell order, there is no Comment() on chart. Pic attached.


I also tested this Comment() in EA with 1 open sell order and Comment line on chart was "Open Orders = 0".




 

That's correct, wackena.  What you have done is to go direct to the server to with a conventional order, so there is no virtual order open.  You would need to use the VirtualOrderManagerTester to issue a manual virtual order.

 I should have made it clear in the article that if a VOM EA is introduced on a particular symbol, then all other EAs trading that symbol must also be VOM-enabled.  This is because of the Disaster Protection SL code in the VOM.

 Paul 

 
Rosh писал(а)  :

Virtual Order Manager for managing orders in MetaTrader 5 terminal positions has been published:

Author: Paul

Thank you for your kind words and interest. I don't know how to write in Russian, but I hope Google translate accurately represent what I'm saying.

I think very highly of the Russian Metatrader community and hope that somehow we can work together to improve the PTO library. It will always be open source, non commercial, and I think it is important for its survival at least at first that when it is updated the code is not broken into multiple versions. I have no problems at all with it being used in commercial EAs.

Please leave comments and questions, either here on the English mql5 site or on the blog http://paulsfxrandomwalk.blogspot.com/, and I promise to spend time making V1.1, V1.2 even better.

Paul
Regularly emailing the status of an account
  • 2012.06.14
  • Paul
  • paulsfxrandomwalk.blogspot.com
Prompted by a query, I thought I'd post a useful little utility that I have used for ages which emails the status of the account every hour.  After lengthy deliberation I decided to call it .... EmailStatus.  With only a small modification it could be used to log the status to a file, and the time...
 
HideYourRichess:
What can I say, ours (ruskaphones) were only whining and crying on the forums that their favourite locs were being deprived. And here, the foreign-speaking part of the MT community has done it. A striking contrast, as it is not sad, in the approach to solving the problem.

There are enough whiners everywhere, regardless of language :) The rest of us work on the problems as much as we can and, as a result, we don't see any striking contrasts.

As for the authors who publish their developments - a huge respect and esteem!