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... :)
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++; // Увеличиваем индекс массива донышков
}
}
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[]; // Массивы для хранения баров экстремумов
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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... :)
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.
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:
So now the errors are falling out... Probably, I can't do that straightforwardly ? The errors are just when writing to these arrays:
What's wrong?
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?
Isn't that better?
:)))
Isn't that better?
:)))
What is the difference between Time[] and iTime() ???
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.
Accordingly, you can select the currency pair, and the desired timeframe.