[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 712

 
Mathemat:

A graph of an indictor? It's essentially the same thing. Extremes are only on the bars anyway, not in between.

The indicator is a separate window (if you draw it separately, under the price window). This window has the same coordinates - indicator value and time.

Thanks Alexey, looks like it's 99% clear now... :)

 
artmedia70:
Nah, I'm looking for extrema on the indicator chart, in this case A/D

So it's clear that it's not in your pocket.)) You're still going through the indicator readings on the bars in the EA.
 
Roger:

So it's clear that it's not in your pocket.))) You go through the indicator readings by bars in the Expert Advisor anyway.

:) It's a pity that no profit is taken out of the sleeve...

Here's a question: I've defined two arrays to store the time of the bar where the extremum was found:

datetime TimeDN, TimeUP;                        // Массивы для хранения баров экстремумов

So now the errors are falling out... Probably, I can't do that straightforwardly ? The errors are just when writing to these arrays:

if (TempIND[nBars-1]<TempIND[1])                // Если последний бар массива ниже первого - тенденция вверх
      {
         k=0;                                      // Инициализируем индекс массива донышков
         for (i=nBars-1; i>=2; i--)                // Пробежимся по массиву значений
            {
               if (TempIND[i-1]<TempIND[i] && 
                   TempIND[i-2]> TempIND[i-1])      // Нашли донышко
                  {
                     ArrayResize(PeakDN, k+1);
                     ArrayResize(TimeDN, k+1);
                     PeakDN[k]=TempIND[i-1];       // Заносим его значение в массив донышек...
                     TimeDN[k]=Time[i-1];       // ...и в массив времени  С ЭТОЙ СТРОКИ НАЧИНАЮТСЯ ОШИБКИ, ЗДЕСЬ - assignment expected
                     k++;                          // Увеличиваем индекс массива донышков
                  }
            }

What's wrong?

 
artmedia70:

Here is a question: I defined two arrays to store the time of the bar at which an extremum was found:
Now I'm getting errors... Probably, I can't do it that way. The errors are just when writing to these arrays:
What's wrong?

datetime TimeDN, TimeUP;                        // Массивы для хранения баров экстремумов

Isn't that better?

datetime TimeDN[], TimeUP[];                        // Массивы для хранения баров экстремумов

:)))

 
ToLik_SRGV:

Isn't that better?

:)))

Mother-my-grandmother!!!! Ay-yi-yi!!! I'm embarrassed... (Smiley face embarrassed)...
 
What is the difference between Time[] and iTime()???
 
artmedia70:
What is the difference between Time[] and iTime() ???
datetime iTime( string symbol, int timeframe, int shift) 
Accordingly, you can select a currency pair, and the desired timeframe.
 

The first is for a specific symbol and timeframe, the second is for any symbol.

I still don't understand why you need to draw arrows, you can see the peaks as it is.

 

The first is a predefined array (brackets are square). This array stores datetime of bar open times on the pair whose chart corresponds to window 0, i.e. the current one.

The second is a function for pulling open times, but now specifying a pair and a TF.

 
ToLik_SRGV:
Accordingly, you can select the currency pair, and the desired timeframe.
There! That would be better... Sorry for the basics, but... Is datetime essentially an int ?
Reason: