[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 118

 
alsu:
set the degree of regression to 1, it will become straightforward.

Thank you, I don't need a straight line. I'll do a two-way standard deviation to get STOPS
 
 
why does the indicator stop drawing? randomly, after 10-30 bars, sometimes more
Files:
rsi2.mq4  9 kb
 
eddy:
Why does the indicator stop drawing? randomly, after 10-30 bars, sometimes more
it's written in such a way, that it's better not to put it into your terminal)
 

Any advice?

How to get the value of Zig-Zaga peaks into the EA.

I found a sample reference to a custom zig-zag but I don't know what the last two digits in brackets mean

Val= iCustom(Symbol(), 0, "ZigZag", ExtDepth, ExtDeviation, ExtBackstep, 0, 1);

Val= iCustom(Symbol(), 0, "ZigZag", ExtDepth, ExtDeviation, ExtBackstep, 2, idx);

Are these numbers related to the zig-zag peaks in any way?

 

mode - number of the buffer to which the data is output

shift - number of bar from which the signal is taken

 
Help me please!!! When I test with visualisation, it works, but when I tick optimisation, something is wrong!!!
 
Really, pro, tell me!!! What could it be?
 
granit77:

mode - buffer number in which data is output

shift - number of bar from which the signal is drawn


I have such a fragment in my tutorial.

I myself am a humanitarian and mathematical terms are not very good in my head. With the zig-zag I understand that the indicator does not store turning point values and I have to compute them by creating loop of line values on each bar from 0 to required value, fixing the value when changes in line direction.

I already built it when writing an Expert Advisor with a corridor breakout - I defined the width and values of top and bottom of the corridor.

The problem here is in understanding the practical purpose of the "mode" parameter - the number of buffer for the zig-zag is what? How do I determine the number I need? What will change if I set "mode" = "0", "1" or "2"?

 

I've got a question that's perfect for this thread :)

Open the meta-editor's help on array functions. We see:

int ArrayRange(object array[], int range_index)

Параметры:
array[] - Проверяемый массив
range_index - Индекс измерения.

Now open the help for the other function:

int ArrayResize(object&array[], int new_size)

Параметры:
array[] - Массив для изменения размеров.
new_size - Новый размер для первого измерения.

In both cases, the first parameter is an array name. Only in the first case, the parameter is described as "object array[]", while in the second case, it is "object&array[]". A logical question arises: what is the difference between these two entries? I mean, if the parameters are specified in the same way, why the hell do we need an ampersand "&" when specifying a parameter in ArrayResize()? Does the ampersand play some role here, or it does not matter at all and this is the developers' fault?

P.S.

What do I need it for? I am making a tip on function parameters in Notepad++ for MQL4 - it's rather inconvenient to look through the MetaEditor's help when working with this editor. I will post it here on the website soon. Anyway, it's a dead end - whether the ampersand is important or not, I still don't understand.