I am developing a Custom Indicator and had the following queries. I use two buffers to draw the line indicators.
a) Possibility / Workarounds available to draw a line indicator on a single bar, ie the start point and the end point of the indicator line will be on the same bar
b) Any MQL4 function available to set the depth of the indicator lines, ie I want to draw the Indicator lines on top of bars
Thanks in advance
a. Do you mean a Histogram ?
b. Put the chart on the background, i.e. not on foreground - F8, Common, Chart on foreground --> unticked.
Thanks for the response.
On a) I want to draw a line indicator (not histogram) for a single bar, ie start point of the line will be H, and end point of the line will be L.
Heiken Ashi for example do like this .. repaint the bar in other color/style.
I guess he mean something like this.
So, AnkaSoftware, take a look at the code how is done in Heiken Ashi
"Repaint the bar" in my posting before was not correct.
It paint something over the Bar in the chart :-)
Had a look at the Heiken Ashi code . . . . it uses Histograms ;-)
SetIndexStyle(0, DRAW_HISTOGRAM, 0, 1, color1);
SetIndexStyle(1, DRAW_HISTOGRAM, 0, 1, color2);
SetIndexStyle(2, DRAW_HISTOGRAM, 0, 2, color3);
SetIndexStyle(3, DRAW_HISTOGRAM, 0, 2, color4);
SetIndexArrow(0,4); // En Dash symbol (-)
Thanks for the posts.
I also draw the indicators across bars, ie start point of the line on bar T+2, and end point on T0. Using DRAW_HISTOGRAM has the limitation that it cannot be drawn across bars, isnt it?