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

 
Vinin:

Operations with graphs


Yes, yes exactly. Where's the pattern editing (or adding an indicator, like in MT5)? No. So the DLL is needed, right? Or are there any other methods to add an indicator to an MT4 chart other than template editing?


The question was about adding an indicator with the help of an Expert Advisor, here

 
evillive:

The task is not for beginners, to be honest. It is necessary to save everything that is on the chart in a template, then add the required indicator with all parameters to this template and load a new template back to the chart. The saving and loading of the template is possible by means of MQL, but for editing the template file you probably need to write a DLL, I am not sure that the custom script has access to writing the template files.

What if I open the required indicators in a separate window, save it all in a template. Then I run the program in an "empty" chart and open this template?
 
waroder:

What if I open the indicators I need in a separate window, save it all to a template. Then I run the program on an "empty" chart and open this template. will all indicators open as well? or do I have to prescribe the opening of indicators in the template itself?

After you apply the template, all indicators will be automatically attached to the given chart window.
 
barabashkakvn:

After applying the template, all indicators will automatically be attached to this chart window.


oceans) got it) thanks, others

 
waroder:

What if I open the indicators I need in a separate window, save it all to a template. then I run the program on an "empty" chart and open this template. all indicators will also open? or do I need to prescribe the opening of indicators in the template itself?
you also need to add the prog to the template, otherwise it will be unloaded when loading the template itself, because it is not prescribed there. This is a good method of turning off an EA, by the way ;)
 
Send me an indicator to beep when two cars cross)
 

Question 1 - In the new builds of EA external parameters (ME5 Build 934; MT4 Build 646), comments are displayed instead of variable names. How to get rid of it? Please do not suggest not to write comments - I need them (see question 2).

Question 2 - As far as I understand, comments are intended for the programmer himself/herself to write down his/her thoughts, notes and the like while writing code. If this is so (and this is what they teach in books and courses), then it is a unique task. And we are taught: one function - one task. Consequently, when this task has another task - this is exactly the pun intended for what is done in the new builds - you get a vinaigrette. - Is this the right thing to do? Otherwise, how then do I write my comments, which I need, and I don't want anyone else to see them at all. Because if my comments are reflected in the publicity, then what kind of comments are they? That's a completely different task.

So we have two different tasks: "commenting for myself while writing code" and "describing external variables".

It seems that for the new task "description of external variables", another independent compiler option should be allocated. Or at least make this option the user's choice (although, this already contradicts basic programming principles).

If I'm wrong, correct me.

 
Chiripaha:

Question 1 - In the EA external parameters in the new builds (ME5 Build 934; MT4 Build 646), comments are displayed instead of variable names. How to get rid of it? Please do not suggest not to write comments - I need them (see question 2).

Question 2 - As far as I understand, comments are intended for the programmer himself/herself to write down his/her thoughts, notes and the like while writing code. If this is so (and this is what they teach in books and courses), then it is a unique task. And we are taught: one function - one task. Consequently, when this task has another task - this is exactly the pun intended for what is done in the new builds - we get a vinaigrette. - Is this the right thing to do? Otherwise, how then do I write my comments, which I need, and I don't want anyone else to see them at all. Because if my comments are reflected in the publicity, then what kind of comments are they? That's a completely different task.

So we have two different tasks: "commenting for myself while writing code" and "describing external variables".

It seems that for the new task "description of external variables", another independent compiler option should be allocated. Or, at least, make this option the user's choice (although, this already contradicts basic programming principles).

If I'm wrong, correct me.


So it is convenient that external variables can be made more readable for oneself and/or users.

And to make comments on external variables not visible (visible only in code), you can just write them as a second line.

So, for example, instead of:

input double AbcD=1.2345;//Хочу профит на отметке:

make it into two lines:

input double AbcD=1.2345;
//Желаемый уровень профита

In the first case, instead of Abcd, the external variables would display:"I want to profit at: 1.2345",

in the second:"AbcD 1.2345"

 
DiPach:

It's convenient that you can make external variables more readable for yourself and/or your users.

And so that comments to external variables are not displayed (only visible in code), you can simply write them as a second line.

So, for example, instead of:

make it into two lines:

In the first case, instead of Abcd, the external variables would display:"I want to profit at: 1.2345",

in the second case:"AbcD 1.2345".


Yes, I don't mind at all, which is convenient. Moreover, I understand what they wanted to achieve. But you can't implement one task while killing another.

It is less convenient to write in 2 lines, because if there are 5-10 variables, we can stand it (though, again, why should we stand it?). But what if there are about 200 of these variables? In this case the size of the code will get much larger.
On the other hand, if it's another option, you will still have to increase the code's size at the expense of the variable description. So perhaps the solution you suggest is more optimal and concise than introduce the 2nd option. I'm ready to agree.

If I guess correctly, carriage translation is a constraint for variable description?

And I have an additional question:

Would it be possible to make the descriptions optionally available in multiple languages of choice? That would be even more convenient. : )) In this case it's better to make an optional anyway, rather than using the usual comments for the description.

By the way. These descriptions of variables are sparingly displayed in the options dialog anyway, since the column sizes don't retain any stretching andmost of the description is "eaten up" by the narrowness of the description column. But there is unreasonably much space for variable values. So, we wanted to make it better... But this is also a step forward. : ))

 

Guys! Hasn't anyone encountered this phenomenon?

The called indicator does not work in the Expert Advisor, in particular, periods of the iCustom function do not work!

example:

double Volna = iCustom(NULL,PERIOD_M5, "Awesome",0,0); this indicator has no input parameters, but has 3 buffers. With this period, the tester doesn't see the indicator when tested on TF M1. Only"0 or PERIOD_CURRENT" works (current period). !!!!!!!

Can anyone at least have a clue as to the cause?

Reason: