[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 534

 
TheXpert:
It makes no difference. This is one of the implicit features.

Could you please write in more detail how to do this... I can't get it to display.....
 
I am struggling with it for a month. No pro can write a simple line, lots of explanations, abstruse words, but to no avail. Please write a line when from line 0 to takeprofit goes up 20 pips or more (or not there at all), then the EA should open an order with takeprofit of 10 pips. And I will not ask any more silly questions. thanks

 

How do I make an expandable array?

The tutorial has Mas_Ord_New [31] [9].

And I need these 31 to change their number by themselves? I've seen somewhere that this can be set, but I don't know exactly how.

 
Lisi4ka330:
Could you please write more about how to do it... I couldn't get it to display.....


1) Make a new window with the required currency pair.

2) Attach the required indicator.

3) Right-click on the graphic and select PATTERN. And save the new template.

4) Go to the Templates folder where Metatrader is installed (I have G:\DISTR\Akmos MetaTrader\templates)

5) Find a saved template. Right click on it and select menu "open with...". Then select BLOCKNOT.

6) This will show up and you need to pull the indicator from a separate window and paste it into the price chart window:


 
Chiripaha:

How do I make an expandable array?

The tutorial has Mas_Ord_New [31] [9].

And I need these 31 to change their number by themselves? I've seen somewhere that this can be done, but I'm not sure how.

It's not quite clear under what conditions the array's size should be increased. Alternatively, you may do the following:

    int li_size = ArraySize (Array),
        li_N;            // новый размер массива
    //---- Какой-то код, определяющий новый размер массива
    //----
    if (li_size != li_N) ArrayResize (Array, li_N);

Whenever an event occurs, the array's size could be increased by 1:

    int li_size = ArraySize (Array);
    bool lb_Condition = false;        // условие на увеличение размера массива
    //---- Какой-то код, определяющий lb_Condition
    //----
    if (lb_Condition) ArrayResize (Array, li_size + 1);
 
TarasBY:

It is not quite clear under what conditions the size of the array should increase. Alternatively, you could do the following:

you could increase the size of the array by 1 when some event occurs:


I need to consider orders - their number may be floating. In order not to overload the system or limit its ability to count orders, I wanted to make the array floating. I've encountered somewhere that, if I didn't set the size, or if I had put some value there, the arrays would expand on their own.

(this is about conditions - under what conditions).

I think it was mentioned in some C++ workshop.

But I guess not everything that is C-like is suitable for MCL? I'm "swimming" in this question - what is compatible and what is not.

 
Chiripaha:

I need to account for orders - their number may be floating. In order not to overload the system or limit its ability to count orders, I wanted to make the array floating. I've encountered somewhere that, if I didn't set the size, or if I had put some value there, the arrays would expand on their own.

(this is about conditions - under which conditions).

I think it came up in some C++ workshop.

But I guess not everything that is C-like is suitable for MCL? I'm "swimming" in this question - what is compatible and what is not.

The dynamic array is controlled explicitly through ArrayResize().
 
Noterday:

1) Make a new window with the required currency pair.

2) Attach the required indicator.

3) Right-click on the graphic and select PATTERN. And save the new template.

4) Go to the Templates folder where Metatrader is installed (I have G:\DISTR\Akmos MetaTrader\templates)

5) Find a saved template. Right click on it and select menu "open with...". Then select BLOCKNOT.

6) This will appear and you need to pull the indicator from the separate window and insert it in the window with the price chart:




thanks)))
 

Good day to all.I have an indicator (the upper indicator in the figure), which gives ONLY these signals.A I need these signals to transform into a "solid" signal (bottom indicator in the figure).Himself do not work.Help, if anyone knows how to do it!

P.S.

The MACD indicator in the figure is only used to illustrate my problem.





 
MK07:

Good day to all.I have an indicator (the upper indicator in the figure), which gives ONLY these signals.A I need these signals to transform into a "solid" signal (bottom indicator in the figure).Himself do not work.Help, if anyone knows how to do it!

P.S.

The MACD indicator in the picture I use only to illustrate the problem.

You fill the indicator buffer, if there is no value in it, with the previous (not empty) value:

    if (gda_BUF1[pos] == EMPTY_VALUE) if (gda_BUF2[pos] == EMPTY_VALUE)
    {
        if (gda_BUF1[pos+1] != EMPTY_VALUE) gda_BUF1[pos] = gda_BUF1[pos+1];
        else if (gda_BUF2[pos+1] != EMPTY_VALUE) gda_BUF2[pos] = gda_BUF2[pos+1];
    }

something like this.

Reason: