Try to create a separate object for each button and add it to the dialogue after creation. Otherwise the dialogue understands that it has only one button inside.
Try to create a separate object for each button and add it to the dialogue after creation. Otherwise the dialogue understands that it has only one button inside.
I tried it, it throws a critical error "Array out of range"
We should first make this array of objects, and then use its elements in a loop, calling the Create method for them. I can't write an example right now
Yuriy Bykov #: We should first make this array of objects, and then use its elements in a loop, calling the Create method for them. I can't write an example right now
// Глобальный массив
CButton btns[];
...
int total = SymbolsTotal(true);
ArrayResize(btns, total);
for(int i=0; i<total;i++){
btns[i].Create(0,"btn"+(string) i,0,0,0+BTN_HEIGHT+btn_left,0,0+BTN_WIDTH*btn_line);
ExtDialog.Add(btns[i]);
}
Usually create your own dialogue class by inheriting from CAppDialog. Then btns can be a field of this class. Otherwise you should make it a global variable.
Check also that you have correctly calculated the coordinates of the next button placement - the i index should somehow participate in their calculation.
This is probably a stupid question, but I am a newbie and I haven't figured it all out yet. can you please tell me how to limit the time an EA can work? I want to give the EA for 1-2 weeks for a test. How to write it in the code of the Expert Advisor? It is necessary that after X time it should give a message EA working time has expired contact the author or something like that.
Check also that you have correctly calculated the coordinates of the next button placement - the i index should somehow participate in their calculation.
Lucum #: This is probably a stupid question, but I am a newbie and I haven't figured it all out yet. can you please tell me how to limit the time an EA can work? I want to give the EA for 1-2 weeks for a test. How to write it in the code of the Expert Advisor? It is necessary that after X amount of time it should give a message EA working time has expired contact the author or something like that.
That's funny, but okay.
The easiest option is to add this code to OnTick().
Hello Friends. I wonder if you have used real time real account expert bitlite. It is very good in testing. And if you know a similar expert at a lower price, thank you
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello!
Try to create a separate object for each button and add it to the dialogue after creation. Otherwise the dialogue understands that it has only one button inside.
Hello!
Try to create a separate object for each button and add it to the dialogue after creation. Otherwise the dialogue understands that it has only one button inside.
I tried it, it throws a critical error "Array out of range"
We should first make this array of objects, and then use its elements in a loop, calling the Create method for them. I can't write an example right now
Got it, thanks!
Somehow, I guess:
Usually create your own dialogue class by inheriting from CAppDialog. Then btns can be a field of this class. Otherwise you should make it a global variable.
Check also that you have correctly calculated the coordinates of the next button placement - the i index should somehow participate in their calculation.
Check also that you have correctly calculated the coordinates of the next button placement - the i index should somehow participate in their calculation.
Everything works! Thank you very much!
This is probably a stupid question, but I am a newbie and I haven't figured it all out yet. can you please tell me how to limit the time an EA can work? I want to give the EA for 1-2 weeks for a test. How to write it in the code of the Expert Advisor? It is necessary that after X amount of time it should give a message EA working time has expired contact the author or something like that.
That's funny, but okay.
The easiest option is to add this code to OnTick().