Lorentzos Roussos: I'm guessing you are trying to create a "Map" of where the highs are and where the lows are for future fast access.
Provided you are starting the scan from right to left , keep a value of the previous found point (high or low,bar value) and when you find a high or low with the zigzag then pass the point of the current high/low (bar value) into your storing array. The HighsMap and the LowsMap must be a series array just like OHLC arrays so that HighsMap[0] corresponds to bar 0. Now since data is always coming into the chart , the Map must be constructed as a distance from the next high/low (hence the right to left scan)isi
is it possible for u to show me in term of how the coding should be, conceptually.
that we don`t know where they come from. Are they globals? are they initialized correctly? If you are new to MQL5, take a look at Variables Scope. Maybe this is your problem.
;)
u r right this is part of the standard zigzag code from mql5.com, i left out the whole code to focus on the part i'm having problem with.
the Highmapbuffer[i] is the value of the high bar and i is the bar number or position of that corresponding high bar produced by other part of zigzag code
the comments are part of what i'm trying to extract the high values from this section of the code, any idea of what i might have done wrong?
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.
I'm guessing you are trying to create a "Map" of where the highs are and where the lows are for future fast access.
Provided you are starting the scan from right to left , keep a value of the previous found point (high or low,bar value) and when you find a high or low
with the zigzag then pass the point of the current high/low (bar value) into your storing array.
The HighsMap and the LowsMap must be a series array just like OHLC arrays so that HighsMap[0] corresponds to bar 0.
Now since data is always coming into the chart , the Map must be constructed as a distance from the next high/low (hence the right to left scan)isi
is it possible for u to show me in term of how the coding should be, conceptually.
your code is incomplete.
You are mentioning 2 arrays
that we don`t know where they come from. Are they globals? are they initialized correctly? If you are new to MQL5, take a look at Variables Scope. Maybe this is your problem.
;)
u r right this is part of the standard zigzag code from mql5.com, i left out the whole code to focus on the part i'm having problem with.
the Highmapbuffer[i] is the value of the high bar and i is the bar number or position of that corresponding high bar produced by other part of zigzag code
the comments are part of what i'm trying to extract the high values from this section of the code, any idea of what i might have done wrong?