[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 658

 
sergeev:
For this task, you don't need to store the entire array. It is enough to store only two figures - the maximum and minimum from the order opening. But to do this, we should actually monitor the price only on the first minute bar, on which the order was opened. Thereafter the maximum and minimum are quite determined by the minute bars without constantly storing the price.


Thanks

Maybe you can show me an example of how to control the price on the first minute bar only, on which the order was opened, because I myself don't have a clue.

 

Is it possible to tell the preprocessor something like

#property indicator_color1 ColorNon

And then define the colour in the init?

SetIndexStyle (0,DRAW_LINE,0,0,Red);



 
valenok2003:

Is it possible to tell the preprocessor something like

And then define the colour in the init?


If you don't need it, you can simply not write these parameters, but specify everything in init() via SetIndexStyle(). In mql, CLR_NONE is written.

 

Please explain the difference between spelling:

double DeM5_1  =iDeMarker(NULL,PERIOD_M5, 14,1);

и

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,i);

I understand that the first one explicitly specifies the bar number from which the value is taken, while the second one creates a certain array whose element i points to the bar number.

The advantages and disadvantages of the two methods are of interest... What is the advantage, speed, convenience and so on and so forth... Thanks.

 

Can you please tell me how to limit the number of alerts?

I have attached an alert to the indicator, but it beeps very often when the desired condition occurs, until the condition disappears, or until I turn off the indicator ... . :)

How can I make the alert not go off more than 3-4 times and then ignore the condition?

 
zloy_monter:

Can you please tell me how to limit the number of alerts?

I have attached an alert to the indicator, but it beeps very often when the desired condition occurs, until the condition disappears, or until I turn off the indicator ... . :)

How can I make the alert not trigger more than 3-4 times and then ignore the condition?

I'd also like to see the code, so I don't have to search the astral... :)
 
artmedia70:

Please explain the difference between spelling:

и

I understand that the first one explicitly specifies the bar number from which the value is taken, while the second one creates a certain array whose element i points to the bar number.

The advantages and disadvantages of the two methods are of interest... What is the advantage, speed, convenience and so on and so forth... Thanks.



If only one element is calculated ( i only takes the value 1), the only difference is the writing...
 
artmedia70:

Please explain the difference between writing...

What makes you think i is an array? If it were an array element, the entry would look like this

double DeM5[i] =iDeMarker(NULL,PERIOD_M5, 14,array_name[i]);

and this is an ordinary variable.

Could you please tell me how to limit the number of alerts (signals)?
I attached an alert to an indicator, but it beeps very often when the right condition occurs, until the condition disappears or until I turn off the indicator ... . :)
how can I make the alert go off no more than 3-4 times and then ignore the condition?

With a simple counting tool:

static int count;
if(count != 3){
   Alert(...);
   count++;
   count2 = 0 //обнуление счета противоположенного алерта
}
and zeroing count in the opposite signal block. Otherwise, a code would of course be desirable :)
 
keekkenen:
If only one element is calculated ( i only takes the value 1), the only difference is the writing...
And if for a set of strategies packed in one EA a certain set of indicators is used, some of which wander from strategy to strategy, and from one (first) to three or four bars are used for calculation of indices, then how?
 
ToLik_SRGV:

A simple countdown:

And a zeroing count in the opposite signal block. Otherwise, a code would of course be desirable :)


And it would be desirable to make delay in seconds or in fractions of seconds, so that it wouldn't gurgle on every tick... All the more, they are uneven in relation to time...
Reason: