If it's not possible, should i connect all the point a-b-c-d, with a color, and then repaint only the others a-b-c-d?
For MT4 I use:
- One buffer has the value, color set to CLR_NONE so not shown on chart, (but in data window and pop up.)
- Two buffers, one color each, with SetIndexLabel(i, NULL) so they don't show in data window.
- Then you need to connect the lines on color change. downBuffer[i]=value[i]; if(downBuffer[i+1]==EMPTY_VALUE) downBuffer[i+1]=value[i].
MT4 only draws lines between candles. Therefor, using the above, if only bc is red, it can not be done; bc will be continuous green.(b is the ending green and c is the starting green, thus continuous.)
The alternative is not to connect ab, then there will be a gap ab and a red bc.
HOW CAN I hide CONNECTION lines of plots? (ttt) - MQL4 programming forum (2016)
On MT5 you can place end points between lines if you Check Tools → Options (control+O) → Charts → precise time scale
Is it possible not to snap to the grids? - MQL5 programming forum #5 (2018)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have two buffers which I would like to color depending on a condition. In the following simple example the condition is on the close price.
The script seems to work but I have an issue when, between two candles, the price change direction (see image attached).
Note that the problem doesn't exist when the price takes more than two candles to change direction.
I try to explain the issue:
* suppose a trend up-down-up /\/ where the vertices are called a-b-c-d;
* the two buffers will be something like this:
upBuffer = {a, b, c, d}
dnBuffer = { , b, c, }
MT4 simply connects all the adjacent points that are present in the buffers and if there is an EMPTY_VALUE it leaves a gap.
The question is how can I specify that I want connect a-b and c-d?
If it's not possible, should i connect all the point a-b-c-d, with a color, and then repaint only the others a-b-c-d?