how to use ColorCandleBull()?

Hi, I want to program an indicator just like the candlesticks style in main chart. So, how to use

ColorCandleBull() to define the color of a candlestick? 

itibet:

Hi, I want to program an indicator just like the candlesticks style in main chart. So, how to use

ColorCandleBull() to define the color of a candlestick? 

 

add: can find the mt5's  *.mq5  of candlesticks indicator?

Look at custom indicator ColorCandlesDaily in standard delivery. It might be helpfull.
Step on New Rails: Custom Indicators in MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.

alexvd:
Look at custom indicator ColorCandlesDaily in standard delivery. It might be helpfull.

thanks.  

In mq5's doc, it says

" 

ColorCandleBull (Set Method)
Sets new value for "ColorBarBull" property.
bool ColorCandleBull(
color new_color // new color for bull candle body
)
Parameters
new_color
[in] New color of the bull candle body.
Returned value
true if successful, false if color hasn't changed.

" 

but in the MetaEditor, "ColorCandleBull"  does not change color, it seems this function don't exist?

itibet:

Hi, I want to program an indicator just like the candlesticks style in main chart. So, how to use

ColorCandleBull() to define the color of a candlestick? 

Hi itibet,

Beside what Alexvd point at, here's several sample of candles with color thing :

1. https://www.mql5.com/en/docs/customind/indicators_examples/draw_candles

2. https://www.mql5.com/en/docs/customind/indicators_examples/draw_color_candles

3. Heikin Ashi in MetaEditor is probably what you need to get started. ;) 

Have fun :)

:D 

Documentation on MQL5: Custom Indicators / Indicator Styles in Examples / DRAW_CANDLES
  • www.mql5.com
Custom Indicators / Indicator Styles in Examples / DRAW_CANDLES - Documentation on MQL5