Hello guys,
I've got an MT4 indi which plot the lines (pic.1). Can you tell me, what do I have to change in the code to make it visible like on the pic.2? (square instead of lines)
You should post some code, bacause it's not clear if those lines are objects or indicator buffers.
Basically you can create rectangles something like this:
if(ObjectFind(rect) == -1) { ObjectCreate(rect, OBJ_RECTANGLE, 0, time1, price1, time2, price2); ObjectSet(rect, OBJPROP_BACK, true); ObjectSet(rect, OBJPROP_COLOR, c); }
You should post some code, bacause it's not clear if those lines are objects or indicator buffers.
Basically you can create rectangles something like this:
ohh sorry. I quess this reffers to:
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2,Black);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2,Black);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2,Black);
SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,2,Black);
ohh sorry. I quess this reffers to:
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2,Black);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2,Black);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2,Black);
SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,2,Black);
As far as I know, MT does not allow drawing rectangles by indicator buffers. So, I'd suggest to extract price values and bar times from the specified buffers and place rectangle objects on the chart by the code I provided earlier, using the extracted coordinates.
Thank you for your answer, but it's still mission impossible for me since my coding skills equals zero. Maybe someone can do it for me? I can pay via Skrill. PM me please.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello guys,
I've got an MT4 indi which plot the lines (pic.1). Can you tell me, what do I have to change in the code to make it visible like on the pic.2? (square instead of lines)
Thanks
F.