azolotta: OK, then how do I rework the code if I need, for example, to select the highest high from the last 3 bars (which meet the conditions in if) and place a point on it (right on this high!), then also find the low point.
Unfortunately shift offset is not the right option. I'm thinking maybe I should try inserting my code into standard-zigzag. I'm trying it now, but so far to no avail. What do you think, can I go through zigzag? Because at the end I need to find vertices connected alternately, like high-low-high, and if I meet an option high-high, or low-low, then these second highs and lows do not include in the array, and wait for the opposite.
Unfortunately, shift offset is not a suitable option. I'm thinking maybe I should try inserting my code into the standard zigzag. Now I'm poking around, but so far to no avail. Do you think it's possible to go through zigzag? Because at the end I need to connect found tops alternately, like high-low-high, and if I meet an option high-low or low-low, then these second highs and lows should not include in arrays, and wait for the opposite.
No. The previous one should be zeroed out, and the current one should be added to the indicator buffer.
Unfortunately, shift offset is not a suitable option. I'm thinking maybe I should try inserting my code into the standard zigzag. Now I'm poking around, but so far to no avail. What do you think, can I go through zigzag? Because at the end I need to find vertices connected alternately, like high-low-high, and if I meet an option high-high, or low-low, then these second highs and lows do not include in the array, and wait for the opposite.
In any case, there will be a lag, i.e. until the conditions for 2-3 previous bars are met - it won't draw.
I understand that we need a zig-zag from the high to the low?
In any case, there will be a lag, i.e. until the conditions for 2-3 previous bars are met - it won't draw.
I guess I need to zig-zag from highs to lows?
Yes, ideally we need a zig-zag from highs to lows (so these highs and lows are in my conditions in if, and if there are two or more highs/lows in a row, then these second highs/lows should not be displayed, and we should wait for the reversal). It is enough for me to display the last 6 lowes and 6 highs in the indicator. And then I want to call these found zig-zag points in the script/advisor for further needs.
Yes, ideally we need a zig-zag from highs to lows (so that these highs and lows are in my conditions in if, and if there are two or more highs/lows in a row, then these second highs/lows should not be displayed, but wait for a reversal). It is enough for me to display the last 6 lowes and 6 highs in the indicator. And then I want to call these found zig-zag points in the script/advisor for further needs.
I'm not a programmer and don't know how to help yet, but I'll think about it...
MakarFX: I'm not a programmer and don't know how to help yet, but I'll think about it...
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, |//+----------------------------------------------------------------------------+//| Версия : 07.10.2006 |//| Описание : Возвращает экстремум ЗигЗага по его номеру. |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента (NULL или "" - текущий символ) |//| tf - таймфрейм ( 0 - текущий ТФ) |//| ne - номер экстремума ( 0 - последний) |//| dp - ExtDepth |//| dv - ExtDeviation |//| bs - ExtBackstep |//+----------------------------------------------------------------------------+double GetExtremumZZPrice(string sy="", int tf=0, int ne=0, int dp=12, int dv=5, int bs=3) {
if (sy=="" || sy=="0") sy=Symbol();
double zz;
int i, k=iBars(sy, tf), ke=0;
for (i=1; i<k; i++) {
zz=iCustom(sy, tf, "ZigZag", dp, dv, bs, 0, i);
if (zz!=0) {
ke++;
if (ke>ne) return(zz);
}
}
Print("GetExtremumZZPrice(): Экстремум ЗигЗага номер ",ne," не найден");
return(0);
}
customZigZagindicator and returns its price level. The function accepts the following optional parameters:
sy- Name of the instrument."" orNULL- current symbol. Default value isNULL.
tf- Timeframe. Default value 0- current symbol.
ne- Extreme number. 0- last, 1- previous, 2- previous, etc.
Я не буду перечислять все новые возможности и особенности нового терминала и языка. Их действительно много, и некоторые новинки вполне достойны освещения в отдельной статье. Вы не увидите здесь кода, написанного по принципам объектно-ориентированного программирования — это слишком серьезная тема для того, чтобы просто быть упомянутой в контексте как дополнительная вкусность для кодописателей. В этой статье остановимся подробней на индикаторах, их строении, отображении, видах, а также особенностях их написания по сравнению с MQL4.
OK, then how do I rework the code if I need, for example, to select the highest high from the last 3 bars (which meet the conditions in if) and place a point on it (right on this high!), then also find the low point.
Try it this way, but not sure
Try it this way, but I'm not sure
Unfortunately shift offset is not the right option. I'm thinking maybe I should try inserting my code into standard-zigzag. I'm trying it now, but so far to no avail. What do you think, can I go through zigzag? Because at the end I need to find vertices connected alternately, like high-low-high, and if I meet an option high-high, or low-low, then these second highs and lows do not include in the array, and wait for the opposite.
Unfortunately, shift offset is not a suitable option. I'm thinking maybe I should try inserting my code into the standard zigzag. Now I'm poking around, but so far to no avail. Do you think it's possible to go through zigzag? Because at the end I need to connect found tops alternately, like high-low-high, and if I meet an option high-low or low-low, then these second highs and lows should not include in arrays, and wait for the opposite.
No. The previous one should be zeroed out, and the current one should be added to the indicator buffer.
Unfortunately, shift offset is not a suitable option. I'm thinking maybe I should try inserting my code into the standard zigzag. Now I'm poking around, but so far to no avail. What do you think, can I go through zigzag? Because at the end I need to find vertices connected alternately, like high-low-high, and if I meet an option high-high, or low-low, then these second highs and lows do not include in the array, and wait for the opposite.
In any case, there will be a lag, i.e. until the conditions for 2-3 previous bars are met - it won't draw.
I understand that we need a zig-zag from the high to the low?In any case, there will be a lag, i.e. until the conditions for 2-3 previous bars are met - it won't draw.
I guess I need to zig-zag from highs to lows?Yes, ideally we need a zig-zag from highs to lows (so these highs and lows are in my conditions in if, and if there are two or more highs/lows in a row, then these second highs/lows should not be displayed, and we should wait for the reversal). It is enough for me to display the last 6 lowes and 6 highs in the indicator. And then I want to call these found zig-zag points in the script/advisor for further needs.
Hello!
Can anyone advise why no values are showing through debug mode?
Looks like after updating the mt5 program, the problem started
And what does red mean in the column - Values?
Hello!
Can anyone advise why no values are showing through debug mode?
Looks like after updating the mt5 program, the problem started
And what does the red colour of the value in the column - Values mean?
1. Please give minimal information (first three lines from the journal tab after restarting the terminal)
2) Update the build
Yes, ideally we need a zig-zag from highs to lows (so that these highs and lows are in my conditions in if, and if there are two or more highs/lows in a row, then these second highs/lows should not be displayed, but wait for a reversal). It is enough for me to display the last 6 lowes and 6 highs in the indicator. And then I want to call these found zig-zag points in the script/advisor for further needs.
I'm not a programmer and don't know how to help yet, but I'll think about it...
customZigZagindicator and returns its price level. The function accepts the following optional parameters:- sy- Name of the instrument."" orNULL- current symbol. Default value isNULL.
- tf- Timeframe. Default value 0- current symbol.
- ne- Extreme number. 0- last, 1- previous, 2- previous, etc.
- dp,dv,bs- ZigZaga parameters: ExtDepth, ExtDeviation, ExtBackstep.
customZigZagindicator and returns its price level. The function accepts the following optional parameters:- sy- Name of the instrument."" orNULL- current symbol. Default value isNULL.
- tf- Timeframe. Default value 0- current symbol.
- ne- Extreme number. 0- last, 1- previous, 2- previous, etc.
- dp,dv,bs- ZigZaga parameters: ExtDepth, ExtDeviation, ExtBackstep.