Developed a library of API functions for MetaTrader 4 - page 6

 
<br / translate="no"> Also note that Omega "doesn't know" definitions from Mforex.h file. I.e., for example, when calling the function of position opening, you should specify the operation code for, say, Sell - 1, instead of OP_SELL, etc. For more details, see the DevKit documentation, which describes the way omega works with external libraries.
Good luck!


I have the documentation for DevKit, but I haven't found anything there, English is a dark forest.
But there is an extract from mforex.n document,
Orders
enum { OP_BUY=0,
OP_SELL,
OP_BUY_LIMIT,
OP_SELL_LIMIT,
OP_BUY_STOP,
OP_SELL_STOP,
OP_BALANCE,
OP_CREDIT
};

does it mean that if
OP_BUY=0 then
OP_SELL=1 and
OP_BUY_LIMIT=2 etc.?

If so, it's not difficult.

What about the Tool name?
 
<br / translate="no"> What about the name of the Tool?

You've pretty much got it all figured out yourself. The tool name must be in inverted commas, as it is passed to MT4 unchanged. When I created the MFOREX library, I initially wanted to number all available pairs in the same way, but then it turned out that the standard ways cannot provide a list of traded instruments! So, we just write "USDCHF" or "GBPUSD".
You can also pass the name of the pair in a string variable.
Good luck!
 
Thank you very much, less of a problem with the Omega so far.
I have found a bigger problem:
The Expert Advisor in MT4 is broken, i.e. it does not work by itself, it is grey in the list, what to do?
I have downloaded it again and it has not changed.

I downloaded it from HELP:

Once the development is complete, you need to compile the EA. To do this, run the "File - Compile" menu command in the EA editor, press F9 or click the toolbar button. As a result of successful compilation, an executable file of the program with the *.EX4 extension will be created and it will be automatically placed to the /EXPERTS folder. The list of compiled Expert Advisors can be viewed in the "Navigator - Expert Advisors" window of the client terminal. If compilation is not successful, icon of the Expert Advisor will be grayed out. It means it cannot be used.
 
As a result of successful compilation, an executable program file with *.EX4 extension is created, which is automatically placed in /EXPERTS folder. The list of compiled EAs can be viewed in the Navigator-Advisors window of the client terminal. If compilation is not successful, icon of the Expert Advisor will be grayed out. It means that it cannot be used. <br / translate="no">

You are wrong here. The Expert Advisor is fully viable. The gray colour also means that there is no *.MQ4 source file. Most commercial EAs are distributed this way in compiled form. Try to delete the source of any Expert Advisor and restart the terminal - the Expert Advisor will become gray.
In addition, I advise to replace Mem.dll file with new one. I have converted the latter one to the new build of the 197 trading terminal. Mem.dll has already been changed to the new version in the files on my site:
http://www.min2006.ru
Good luck!
 
Good afternoon, I have this question:
if I want to enter the market by market, do I still have to specify a price?
 
Good afternoon, so I have this question:<br/ translate="no"> if I want to enter the market by market, do I still need to specify a price?

Hi, this is a standard procedure. All Expert Advisors work in this way: first, you get the current price (the TikKot function) and then you form a new order at this price (NewPos). If you open a Buy order, you will take the Ask price, and if you sell an order, you will take the Bid price.
Look at the example on my site in C++ or Delphi. There you can find variants of position opening.
Good luck!
 
So yesterday I was running DLL in Omega all day with different functions and found that Omega constantly hangs from DLL. The computer number window pops up and even a few, I don't know if this is a problem only in the demo or what? So I'm not really bothered by the number window, but the Omega hangs makes it impossible to work...
 
So yesterday I was running DLL in Omega all day with different functions and found that Omega constantly hangs from DLL. The computer number window pops up and even a few, I don't know if this is a problem only in the demo or what? So the window with the number doesn't really bother me, but the omega hangs makes it impossible to work... <br/ translate="no">

I can't answer anything specific. I haven't tested the library with Omega. Apparently the problem is an incorrect function call from the library. Have you reserved memory for returned data arrays? I can also recommend you to investigate carefully the logs of MT4 and the library itself (it creates the file Protokol.dat when it works).
The window with computer number pops up only in demo version. Good luck!
 
Have you reserved memory for the returned data sets? <br / translate="no">


How is this done?
 
<br/ translate="no">How is this done?

It's a standard procedure for any programming language. Look in the Omega documentation. You need to declare an array for its subsequent use. For example, to get the history of quotes you need 2000-5000 array elements. For the array, before the operation, we need to use Omega to allocate the necessary space in memory.
Have you seen what's in the logs?
Reason: