Download MetaTrader 5

How to extend the Event data

To add comments, please log in or register
Ex Ovo Omnia
3351
Ex Ovo Omnia  

The custom event can carry only very tiny data. The MQL4 event data is limited to three numbers (short, long, double) and a string (up to 65 characters), inclusive the event identification. Not really much for working with objects.

I would like to append a custom structure to the custom event.

How do you append more data to the event? (a question for coders, not the local spammers). I do not intend to use a DLL for passing a pointer of the structure. I am afraid that I cannot avoid storing the data structure to an MQL file, which is somewhat ugly design.

Alain Verleyen
Moderator
33358
Alain Verleyen  
Ovo:

The custom event can carry only very tiny data. The MQL4 event data is limited to three numbers (short, long, double) and a string (up to 65 characters), inclusive the event identification. Not really much for working with objects.

I would like to append a custom structure to the custom event.

How do you append more data to the event? (a question for coders, not the local spammers). I do not intend to use a DLL for passing a pointer of the structure. I am afraid that I cannot avoid storing the data structure to an MQL file, which is somewhat ugly design.

If you can not hold you to show openly your contempt for most members of this forum, there is no need to waste your time here. This is my last warning.
Ex Ovo Omnia
3351
Ex Ovo Omnia  
angevoyageur:
If you can not hold you to display openly your contempt for most members of this forum, there is no need to waste your time here. This is my last warning.


It is your private fight, Angevoyageur.

It is not me, it is you who keeps offending people here. You may remove this topic, I am not interested in nervous offtopic discussions with a moderator.

Alain Verleyen
Moderator
33358
Alain Verleyen  
Ovo:


It is your private fight, Angevoyageur.

It is not me, it is you who keeps offending people here. You may remove this topic, I am not interested in nervous offtopic discussions with a moderator.

Take it as you wish. Next time you will be banned.
Alain Verleyen
Moderator
33358
Alain Verleyen  

Just a reminder of the rules, so each one can judge if it's a "private fight" :

  1. Please, be polite communicating in this forum. Any posts which may offend other visitors of the forum are forbidden.
  2. Discussions of any banking, brokerage or other financial companies or institutions are prohibited. Such messages are subject to removal
  3. Any discussions about personal relations between the participants of the forum are forbidden.
  4. Any use of obscene expressions is forbidden.
  5. Posting of advertising messages, spamming and flooding are forbidden.
  6. Numerous breakings of rules, ignoring moderators' remarks and furthermore open disrespect for administration will result in banning from the forum without any explanations.
  7. The administration has the right to change these rules if necessary.
Ex Ovo Omnia
3351
Ex Ovo Omnia  
You are right. In that case I do apologise to local spammers. They are welcome to discuss the topic, too.
whroeder1
15930
whroeder1  
Ovo:

The custom event can carry only very tiny data. The MQL4 event data is limited to three numbers (short, long, double) and a string (up to 65 characters), inclusive the event identification. Not really much for working with objects.

I would like to append a custom structure to the custom event.

How do you append more data to the event? (a question for coders, not the local spammers). I do not intend to use a DLL for passing a pointer of the structure. I am afraid that I cannot avoid storing the data structure to an MQL file, which is somewhat ugly design.

You can't modify the MQL structure and there is no need to
myObject* gObjects[];
OnEvent(int i){ gObjects[i].OnEvent(); }
Use the number to select your object. Don't try to pass an object to MQL4 only to get it back.
To add comments, please log in or register