- Rectangle to fill or not to fill?
- Strategy Tester Trade levels issue
- Vertical line.
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.
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.
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 ...
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).
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.
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); }
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 ...
"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!
"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!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use