Object Trendlines Properties

 
I've created a trendlines into a small vertical line to fill the candle body, so that I can change the body colour of some candle if they meet a particular condition. When I increased the thickness of the line to fill the body, the line ends become so rounded that it extends beyond the body of the candle to the top and bottom. Pls is there a property to set to make the line ends sharp or an alternative to achieving my objective.
Thanks
 
Clemence Oluwatobi Aderinwale: I've created a trendlines into a small vertical line to fill the candle body, so that I can change the body colour of some candle if they meet a particular condition. When I increased the thickness of the line to fill the body, the line ends become so rounded that it extends beyond the body of the candle to the top and bottom. Pls is there a property to set to make the line ends sharp or an alternative to achieving my objective.

Why did you that when MQL5 already offers you a way to draw proper candles directly? ... DRAW_CANDLES, DRAW_COLOR_CANDLES

Even MQL4 can use the DRAW_HISTOGRAM work-around to draw candles.

 
Fernando Carreiro #:

Why did you that when MQL5 already offers you a way to draw proper candles directly? ... DRAW_CANDLES, DRAW_COLOR_CANDLES

Even MQL4 can use the DRAW_HISTOGRAM work-around to draw candles.

I'm actually using the mql4 DRAW_HISTOGRAM
 
Clemence Oluwatobi Aderinwale #: I'm actually using the mql4 DRAW_HISTOGRAM

No, you wrote "created a trendlines into a small vertical line to fill the candle body". They are not the same things.

Also, if this is about MQL4, then please post in the correct section next time, or else our answers will not match your issue.

I will move the thread to the MT4/MQL4 section now, so please don't create a another duplicate thread.

 

Search the CodeBase for Indicator code that creates Heikin Ashi (or others) so you can study how to create candles with DRAW_HISTOGRAM in MQL4.

Here is my example ...

Code Base

Dōteki Heikin Ashi (Dynamic Average Foot/Bar)

Fernando Carreiro, 2018.10.15 17:08

A dynamic version of the standard Heikin Ashi indicator (code compatible with both MQL4 or MQL5).
 
Fernando Carreiro #:

No, you wrote "created a trendlines into a small vertical line to fill the candle body". They are not the same things.

Also, if this is about MQL4, then please in the correct section next time, or else our answers will not match the issue.

I will move the thread to the MT4/MQL4 section, now so please don't create a another duplicate thread.

I didn't know forum were in section. Anyway this is what I'm working on
void DrawHistogram(string name, datetime cur_time, double bodyhigh, double bodylow, color col, long width)
{
   if(ObjectFind(name)<0)
     {
         ObjectCreate(0, name, DRAW_HISTOGRAM, 0, cur_time, bodyhigh, cur_time, bodylow);
         ObjectSetInteger(0, name, OBJPROP_WIDTH, width);
         ObjectSetInteger(0, name, OBJPROP_COLOR, col);
         ObjectSetInteger(0, name, OBJPROP_RAY, false); 
         ObjectSetInteger(0, name, OBJPROP_SELECTABLE, false);
         ObjectSetInteger(0, name, OBJPROP_STYLE, 0);   
         //ObjectSetInteger(0, name, OBJPROP_BACK, true);  
      }  
      
   
         ObjectSetInteger(0, name, OBJPROP_WIDTH, width);  
          
}


 
Fernando Carreiro #:

Search the CodeBase for Indicator code that creates Heikin Ashi (or others) so you can study how to create candles with DRAW_HISTOGRAM in MQL4.

Here is my example ...

Thanks, I'll check this out
 
Clemence Oluwatobi Aderinwale #: I didn't know forum were in section. Anyway this is what I'm working on

"DRAW_HISTOGRAM" is not for creating Graphical Objects. It is for Indicator buffer drawing types. Don't mix the two. There is no "histogram" graphical object type!

 
Fernando Carreiro #:

"DRAW_HISTOGRAM" is not for creating Graphical Objects. It is for Indicator buffer drawing types. Don't mix the two. There is no "histogram" graphical object type!

I noticed that in the heikin ashi indicator code. The indicator functions.
What I'm working on is an EA, and the candle body colour part is just a part of it. Can the objective be achieved in an EA 
 
Clemence Oluwatobi Aderinwale #I noticed that in the heikin ashi indicator code. The indicator functions. What I'm working on is an EA, and the candle body colour part is just a part of it. Can the objective be achieved in an EA. 
An EA's job is to automate trading. An indicator's job is to display visual data. Don't use an EA do to an Indicator's job.
 
Fernando Carreiro #:
An EA's job is to automate trading. An indicator's job is to display visual data. Don't use an EA do to an Indicator's job.
I get that. 
Is there anyway to make line ends flat, so the whole thing looks like a rectangle instead of the rounded ends