Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1088

 
Maksims Ignatovs:

Interesting solution for the general case. It is clear that for a particular key, you can go through all possible combinations (language, caps, etc.) to see what happens and even try to draw some conclusions from it,
BUT, this issue should be reflected in the documentation. For mouse events it is - everything is available in documentation. What about the keyboard?

You could do something like this:

if(lparam==(StringGetChar("w",0)))
 
There is no counterpart to the MaxOrders() function in mt4?
 
Maksims Ignatovs:

For mouse events this is the case - everything is available in the documentation. What's wrong with the keyboard?

Especially considering the number of keyboard variants by design and nationality. You'll have to grasp the vastness of the world.

 
Yevhenii Levchenko:
There is no counterpart to the MaxOrders() function in mt4?

Where is there such a function? And what does it do?

 

Hi @ Artyom Trishkin,

Is it possible to know when a user closes a trade manually, in MQL4 / MT4?

I know it works in MQL5 using OnTradeTrasaction () function, but I couldn't see such functionality in MQL4. So how can I achieve it?

 
Artyom Trishkin:

Where is there such a function? And what does it do?

In MT5, it returns the maximum number of orders allowed...
 
Yevhenii Levchenko:
In MT5, it returns the maximum number of orders allowed...

This is not in MT5, but in SB in CExpert there is a method

This is how you can get the maximum number of orders allowed:

void OnStart()
{
   printf("MaxOrders = %i",AccountInfoInteger(ACCOUNT_LIMIT_ORDERS));
}
 
Yevhenii Levchenko:
In MT5, it returns the maximum number of orders allowed...

This is from the CExpert class of the standard library. That is, it is not a function built into the language.

Look in AccountInfoInteger(), SymbolInfoInteger()

Документация по MQL5: Информация о счете / AccountInfoInteger
Документация по MQL5: Информация о счете / AccountInfoInteger
  • www.mql5.com
Информация о счете / AccountInfoInteger - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Igor Makanu:

This is not in MT5, but in SB in CExpert there is a method

This is how you can get the maximum number of orders allowed:

This only applies to Limit orders, right? You need the maximum possible number of orders that can be in the market... Or will it be the same number?
 
Yevhenii Levchenko:
This only concerns Limit orders? You need the maximum possible number of orders that may be in the market... Or will it be the same number?

Open the MT4 help, it's all there, I didn't make up the name of the constant ACCOUNT_LIMIT_ORDERS

Reason: