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

 

Hello.


Can you tell me how I can control the number of open trades through global variables in the terminal. For example, each chart adds +1 to the global variable when a trade is opened. In a separate Expert Advisor global variables are created and destroyed. There is also checked acceptable number of trades (for example, when it exceeds, the flag is also global to 0, and all EAs check this flag when they open).

My question is how do I get the number of trades from each terminal... Increase it on opening and decrease it on closing? It is too difficult. Since I have to set an analogue of OnTradeTransaction for the same close. As far as I understand, the global variables may only be of simple types. If it were an array or, better, an array of structures, it would be easier.

Please advise, maybe I don't understand something. Thank you.

 

Please advise.
The 32 bit permvar.dll (from https://fx1.net/permvar.php ) was working on MT4.
Tried to use it in MT5.
Website says : Use permvar.dll for Tradestation, Metatrader < 0550, Metatrader5.

Attempting to call it in MT5_64 - message says it is not 64bit.
Is this a verdict or can this conflict be resolved somehow ?
Thanks.

FX1 | PermVar - Persistent Data Storage
  • fx1.net
PermVar can persistently store basic types of data in the registry, such as strings, integers, doubles, and booleans. Reading and writing is easy with its one-touch command. No need for complicated frameworks. All you need is one file to use PermVar. It’s compatible with any application that uses DLL. If you need a key/value storage similar to...
 
procomK:

Please advise.
The 32-bit permvar.dll (from https://fx1.net/permvar.php) worked on MT4.
Tried to use it in MT5.
The site says : Use permvar.dll for Tradestation, Metatrader < 0550, Metatrader5.

Attempting to call it in MT5_64 - message says it is not 64bit.
Is this a verdict or can this conflict be resolved somehow ?
Thanks.

it can, ideally, be wrapped with an intermediate 64 DLL. If the parameters that are passed allow it.

 

Thanks, that's reassuring.

But to me, as a dummy, what a poor handshake.

Mikhail Dovbakh:

It's possible to wrap it with an intermediate 64 DLL. If the parameters that are passed allow it.

 

MathExp and MathPow are essentially the same - they take a number to a specified power


Except that in MathExp you can only specify a power. What's the point?


I'm just studying an example from an article and it has exp, and I can't understand what and why

 
Alexandr Sokolov:

MathExp and MathPow are kind of the same in essence - they take a number to a specified power


Except in MathExp you can only specify the degree. What is the point?


I'm just looking at an example from an article and there's exp, and I can't figure out what and why

they're different functions, read the descriptions, and google "number e"

 
Taras Slobodyanik:

these are different functions, read the descriptions, and google "number e"

Thank you very much! I didn't think of google.

 

I've lost row and column numbers in the mt4 compiler, how can I turn them on?

It used to write where the cursor is, but it hasn't in recent months, what could I have done?

 
Seric29:

I've lost row and column numbers in the mt4 compiler, how can I turn them on?

It used to show where the cursor is, but it hasn't shown up for the last months, what could I have done?

Make a mistake, try to compile and then the row and column numbers will appear.

Help says that these columns are warning, for errors.


 
Well there is such a thing, but before for example it used to write error row and column numbers I would put the cursor there and move it by numbers, numbers were displayed before, it was very handy maybe my head is wrong but the values were there too. I'm talking about MetaEditor4
Reason: