Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 477

 
Leo59:
What code should be written in the Expert Advisor, so that when it is installed on a chart, the indicator attached to the Expert Advisor will be automatically installed in the sub-window?

What are templates for? If the template is named like the Expert Advisor, it will be automatically opened in the tester
 
What code should be written in the Expert Advisor, so that when it is installed on a chart, the indicator attached to the Expert Advisor will also be automatically installed in a subwindow?
The Expert Advisor is alternately using several indicators from the set of indicators connected to it. It is necessary to output in the subwindow those indicators that have been selected by the Expert Advisor at the moment.
If you have seen an example of the code for automatically changing the indicators displayed by the Expert Advisor and creating (deleting) sub-windows, please provide a link.
 
In the new version of mql4 is it possible to draw a vertical histogram on indicator buffers? I have been suffering with graphical objects for half a year, the terminal hangs up, etc...
 

Dear.

After updating the terminal when compiling a warning: "not all control paths return a value" indicating a line with a closing parenthesis.

What has changed in the syntax and how can I fix the code to avoid displaying this warning?

Thank you.

 

I've found the answer. You need to write return(0);

Thank you all.

 
S.A.Heavy:

Dear.

After updating the terminal when compiling a warning: "not all control paths return a value" indicating a line with a closing parenthesis.

What has changed in the syntax and how can I fix the code to avoid displaying this warning?

Thank you.


The syntax itself has little to do with it, the compiler is stricter, yes. You should check in the function that the compiler points to to see if the value is always returned, or if there are cases where the return will not work.
 
What should be written instead of a dotted line in the subwindow where the "Ind.mq4" indicator is installed?
1. display an indicator, e.g. MACD
2. Remove the MACD from the subwindow
// Есть пустой индикатор с именем "Ind.mq4"

#property  indicator_separate_window   // Индикатор рисуется в дополнительном окне
int start()
  {
   return(0);
  }
//--------------------------------------------------------------------
// Есть эксперт установленный в основном окне

int start()
  {
   window();
   return(0);
  }

void window()       
  {
   int Win_ind=WindowFind("Ind"); 
   ..................................
  }
?

PS This MACD already exists
 
Leo59:
What should be written instead of a dotted line in the subwindow where the "Ind.mq4" indicator is installed?
1. display an indicator, e.g. MACD
2. Remove the MACD indicator from the subwindow
?

PS This MACD already exists

I gavea link here a while ago. It may come in handy. But it will not work in the subwindow of the triggering indicator itself. Each one will have its own subwindow.
 
Zhunko:
I gave you this link the other day. It may come in handy. But it will not work in the subwindow of the triggering indicator itself. Each subwindow will have its own subwindow.


Thank you! Looking...

What do you mean, "Everyone will have their own subwindow."?
 
artmedia70:

Borj, you've got to be kidding me. You're welcome:

Thank you, Artem! I thought I'd write you in private so as not to "tease the geese"!