Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1246

 
Could you tell me if it is possible to receive indicator data as a structure? For example, when calling an indicator from an Expert Advisor to receive not the data of indicator buffers, but the structure with these data, prepared in the indicator itself?
 
Fast235:
separately from the calculation you can assign to items

I'm not sure I understand...

 

only one buffer series can be retrieved from one buffer

 
Сергей Таболин:
Please advise, is it possible to receive indicator data as a structure? For example, when calling an indicator from an Expert Advisor, do not receive indicator buffer data, but a structure with these data, prepared in the indicator itself?

You can't.

 
Aleksey Vyazmikin:

You can't.

That's a pity.

Thank you.

 

Please advise how to make the MT5 alerts to have "Timeout 30 seconds" in it immediately when you set the alert. The default is 10 seconds there.

Alert

 
Good morning. I am a novice trader. I opened an account with a broker at Alpari. I have a little bit of a problem. I have installed the EA and the robot. I have a -SMILE- and Auto Trading is WHITE on the top of the panel. Expert Advisors - Strategy Tester hasGREEN line. The robot is not working for the fifth day now. What can be the reason ?
Toomas , ***
 
Сергей Таболин:
Dear colleagues, is it possible to receive the indicator data as a structure? For example, when you call the indicator from the Expert Advisor, do not receive the indicator buffers data, but the structure with these data, prepared in the indicator itself?

when it is not possible, but you really want to, you can bypass it...

union Pad {

  MyStruct data;

  double buffer[N]; // N=sizeof(MyStruct)/sizeof(double)+(0!=(sizeof(MyStruct)%sizeof(double))); то есть буферов должно хватать

};

on the indicator side you put structure and put it into buffers; on the EA side you put buffers and pull out structure; only structure must not contain rows, din arrays and references to objects; just compact packing structure into buffers, not one field into each buffer

mega-large structures and arrays can be dragged through an external base - indicator makes a record and puts its uniq_id into the buffer. When EA needs, it will take id from the buffer and structure from the database.

 
Maxim Kuznetsov:

when it is not possible, but you really want to, you can bypass it...

union Pad {

  MyStruct data;

  double buffer[N]; // N=sizeof(MyStruct)/sizeof(double)+(0!=(sizeof(MyStruct)%sizeof(double))); то есть буферов должно хватать

};

on the indicator side you put structure and put it into buffers; on the EA side you put buffers and pull out structure; only structure must not contain rows, din arrays and references to objects; just compact packing structure into buffers, not one field into each buffer

mega-large structures and arrays can be dragged through an external base - indicator makes a record and puts its uniq_id into the buffer. When the EA needs, it will take the id from the buffer and structure from the database by it.

Thank you.

 

Good evening everyone!

In my old age I'm trying to master the basics of MQL5. My curiosity is killing me - I wonder if I can't master programming if I'm about 60. Although, I have made friends with simple HTML, I even created my own web-sites in it. Simple, really, but still... If my questions will cause irritation, then tell me immediately, then I will not ask more naive questions and will not irritate people.

So, opened the first code I saw. I commented out the meaning of one line of this code using Google Translator and MQL5 Reference. What do I ask from the community? Look at the comments and if they are not true, please correct my thinking:

if(PositionSelect(_Symbol)) // если выбираем открытую позицию на графике текущего символа

It's an open book to some, but to me it looks like the same Chinese characters. Please don't laugh too hard.

Why am I doing this? Thus, I'm just trying to find out for myself how hopeless I am in programming.

Sincerely, Vladimir.

Reason: