Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1359
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.