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

 

I have been using the VOM ever since I first wrote it, have fixed a number of bugs, mostly with the handling of the protective stop, and also changed the code to match changes in MT5.  Attached are the updated files.  

Comments very welcome.

Paul 

Files:
VOM2p0.zip  609 kb
 
phampton:

I have been using the VOM ever since I first wrote it, have fixed a number of bugs, mostly with the handling of the protective stop, and also changed the code to match changes in MT5.  Attached are the updated files. 

New version is attached to the article.
 
Paul, thanks for the new version of vom. Many thanks for the quick update and for the quick replies too.
 

I've been inventing a bicycle for a week, I've succeeded quite well, and then bam! Here it is - ready, and what a gorgeous one!

Paul, thank you very much! I wish the project development!

 
phampton:

I have been using the VOM ever since I first wrote it, have fixed a number of bugs, mostly with the handling of the protective stop, and also changed the code to match changes in MT5.  Attached are the updated files.  

Comments very welcome.

Paul 

 

This newer version also doesn't contain a proper file "Supports and Resistances..." but only a second copy of another EA. Also the "...Order Manager Tester" is actually entitled "...Order Tester". Is this the right file?

Thanks!

 

Hi Paul,

Can y please help me here.

I am getting a Lots error but as you see below, the lots is hardcoded and even like this it is not working (pict atached).

Can y please help me if possible ?

Regards,

MRC 

      if(glOrder==-1)
        {
         mrequest.type=ORDER_TYPE_SELL;
         mrequest.price=NormalizeDouble(price_info.bid,_Digits);
         mrequest.sl=NormalizeDouble(price_info.bid+StopLoss,_Digits);
         mrequest.tp=NormalizeDouble(price_info.bid-TakeProfit,_Digits);
         mrequest.comment="SELL";

         VOM.Sell(Ativo,5.0,(int)StopLoss,(int)TakeProfit);

         if(UsaRelatorio==true) Report("B VENDA");
        }

 2014.07.21 16:05:10.497 YouBotG3VOM (WINQ14,H1) CVirtualOrderManager::OrderSend error: failed to adjust position at server, returning -1

2014.07.21 16:05:10.497 YouBotG3VOM (WINQ14,H1) CVirtualOrderManager::PositionChangeSizeAtServer error: Problem with OrderSend TRADE_ACTION_DEAL, return code Autotrading disabled by client terminal. OrderCheck() returned Trading by Expert Advisors prohibited

2014.07.21 16:05:10.495 YouBotG3VOM (WINQ14,H1) CVirtualOrderManager::PositionChangeSizeAtServer(WINQ14,5.00,ORDER_TYPE_BUY,57765)


 

"The VOM controls this risk by maintaining a server-based stop at a configurable distance away from the tightest virtual stop."

That's sounds fine at first, but (in some cases) what happen is that the server-based stop end up being tighter than the loosest virtual stop.

It's specially true if you decrease de distance, like:

Config.ServerStopLossMargin=1;

 Also, it would be great to have the same security system to keep the profits, maintaining a server-based take profit. Don't you think?

 

I've spent the last few days trying to get this working, but I am always getting the same type of error as Marcelo has mentioned above.  Does anyone know if this works anymore?  The error happens whenever I try to open a trade, even when using the examples supplied with VOM.  Is anyone able to help me get it working?  Any help would be much appreciated.

2018.01.31 07:49:36.762 VirtualOrderManagerTester (AUDCAD,H1)   CVirtualOrderManager::OnTick - startup tick or first local time tick of new day
2018.01.31 07:49:43.683 VirtualOrderManagerTester (AUDCAD,H1)   CVirtualOrderManager::PositionChangeSizeAtServer(AUDCAD,0.10,ORDER_TYPE_BUY,0.99455)
2018.01.31 07:49:43.686 VirtualOrderManagerTester (AUDCAD,H1)   CVirtualOrderManager::PositionChangeSizeAtServer error: Problem with OrderSend TRADE_ACTION_DEAL, return code Invalid request
 
kenshin71:

I've spent the last few days trying to get this working, but I am always getting the same type of error as Marcelo has mentioned above.  Does anyone know if this works anymore?  The error happens whenever I try to open a trade, even when using the examples supplied with VOM.  Is anyone able to help me get it working?  Any help would be much appreciated.

This library is now mostly obsolete as MT5 is providing hedging account. You can still need it on netting account, but is it really worth it.