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

 

Reading the article, I involuntarily had an idea to implement a simplified system of position control. The idea is to store data about open positions in a comment and then parse it. But I don't know what is the maximum length of a comment for storing on the server? How guaranteed is the comment stored? It is an optional parameter. In general idea has a right to life?

 
avoitenko:

Reading the article, I involuntarily had an idea to implement a simplified system of position control. The idea is to store data about open positions in a comment and then parse it. But I don't know what is the maximum length of a comment that can be stored on the server? How guaranteed is the comment to be stored? It is an optional parameter. In general, the idea has a right to life?


About commentary in positions and orders.

Here is what was written in the dialogue - "Market Sell EURUSD TP 1.24622 SL 1.27134 (M30) - Test", and here is what was in the comment of an open position "Market Sell EURUSD TP 1.24622 S"...

Besides, the developers have not yet implemented the possibility to modify the comment (as far as I know).

PS

I think that comments will certainly not be suitable for this...

 
Interesting:

About commentary in positions and orders

Here is what was written in the dialogue - "Market Sell EURUSD TP 1.24622 SL 1.27134 (M30) - Test", and here is what was in the comment of an open position "Market Sell EURUSD TP 1.24622 S"....

Besides, the developers have not yet implemented the possibility to modify the comment (as far as I know).

PS

I think that comments will certainly not be suitable for this...

Why not, 31 characters in 256-character encoding is 6.146e+381 number of combinations, you can encode anything in such a string.

In fact, if you localise comments into a short encoded form, you don't need so many characters.

After all, instead of"wanted to open today in buy and opened by mistake in sell" you can write ob|ers ob- intention to open in buy, fact ers- by mistake in sell.

You don't need a microscope to crack nuts, then everything will work out.

 
Urain:

Why not? 31 characters in 256-character encoding is 6.146e+381 number of combinations, anything can be encoded into such a string.

In fact, if you localise comments into a short encoded form, you don't need so many characters.

After all, instead of"wanted to open today in buy and opened by mistake in sell" you can write ob|ers ob- intention to open in buy, fact ers- by mistake in sell.

You don't need a microscope to crack nuts, then everything will work out.

In my opinion, it is much easier to store everything in structures, assembled and arrays, and if necessary, save them to a file.

You can also think about Magik....

 
Interesting:

In my opinion it's much easier to store everything in assembled structures and arrays, and save them to a file if necessary.

You can also think about Magik....

Yes Magik is more reliable because it is not modifiable from the server side,

although less information will be stored there, because the Magik code is 10-binary, unlike strings, which are encoded in 256-binary code.

 
Urain:

Yes, magik is more reliable because it is not modified by the server,

although there will be less information there, because the magik code is 10-character, unlike strings, which are encoded with 256-character code.

I think that the comment should be left to the user, and let the information be there purely for him (whether he fills it in himself or an expert is not important for him).

But Magik should be used to the full programme (a lot of information can be hidden there if desired) + to all this create a certain structure in which to store the maximum amount of information about positions, orders and deals.

When starting the Expert Advisor, data on positions and closed deals can be read from a file or calculated in the initialisation block, including on the basis of magiks (if there is no data file).

At the end of work, of course, the information should be saved.

PS

Or something like that...

 

Hello Paul,

 

Thank you for this library.

 

It seems to me that no matter what I use for a Take Profit value a trade is never closed at that value, even when I run your FrAmaCross EA and optimize it with just the take profit the results never change.

 

I am I doing something wrong or is there a flag that needs to be set to use Take Profit?

When looking at your code the your call in OrderSend bSuccess=PositionChangeSizeAtServer(symbol,volume,ORDER_TYPE_BUY,stoploss); break;

doesn't  use the Take Profit value

 

Thank you for your Time

EK 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
 

I think - if we can have own VOM .. beter way to implement this in mt5 by MQ - id for local orders (#1,#2,#3) in mt5 terminal conected to 1 global order on mt5 server (#5423523).

We need only tree order 

+ #5423523 eurusd

- #1 buy

- # 2 buy

+ #5423533 usdjpy

- # 3 sell

- # 4 sell

+ #5423533 gbpjpy

- # 5 sell


Then on chart we have orders #1 , 2# etc..

 

Has anyone used this library?

The library looks useful. But there are some difficulties.

When compiling the sample Expert Advisor VirtualOrderManagerTester.mq5

gives errors:

'TRADE_RETCODE_REQUEST' - undeclared identifier StringUtilities.mqh 42 12

'TRADE_RETCODE_REQUEST' - constant expression is required StringUtilities.mqh 42 12

'ERR_TRADE_SELECT_TIMOUT' - undeclared identifier StringUtilities.mqh 112 12

'ERR_TRADE_SELECT_TIMOUT' - constant expression is required StringUtilities.mqh 112 12

How to remove them?

 
masharov:

Has anyone used this library?

The library looks useful. But there are some difficulties.

When compiling the example Expert Advisor VirtualOrderManagerTester.mq5

I get errors:

'TRADE_RETCODE_REQUEST' - undeclared identifier StringUtilities.mqh 42 12

'TRADE_RETCODE_REQUEST' - constant expression is required StringUtilities.mqh 42 12

'ERR_TRADE_SELECT_TIMOUT' - undeclared identifier StringUtilities.mqh 112 12

'ERR_TRADE_SELECT_TIMOUT' - constant expression is required StringUtilities.mqh 112 12

How to remove them?

These error codes are no longer relevant, you can simply comment out lines 42 and 112 in the StringUtilities.mqh file.

The article codes have been updated.