Download MetaTrader 5

#property indicator_type / SetIndexStyle, DRAW_COLORCANDLE question!

To add comments, please log in or register
d.bignotti
119
d.bignotti  

I'm making an Indicator that recognize candle, trying to paint the candle and i see that there's a DRAW_COLORCANDLE  option, but nothing on Documentation to help me understand how it works.

 

Right now i'm using histogram like the file in here (https://www.mql5.com/en/code/10623) . But the main problem is that histogram needs to change size the more i zoom in our out!

 

Any suggestion is appreciated! Thank you. 

Keith Watford
Moderator
10615
Keith Watford  
I believe that DRAW_COLORCANDLE   is only available in mq5
d.bignotti
119
d.bignotti  

Ok, but i get this if i try to write DRAW_ ....

 

Keith Watford
Moderator
10615
Keith Watford  

Yes, when they added some mq5 features to mq4, they also added some auto completes that have not been implemented in mq4,

I think that only DRAW_ARROW in your drop-down list is relevant to mq4. 

d.bignotti
119
d.bignotti  
Ok thank you, any suggestion to change thiickness of histogram when i zoom in or out?
Keith Watford
Moderator
10615
Keith Watford  
d_bignotti:
Ok thank you, any suggestion to change thiickness of histogram when i zoom in or out?

In OnChartEvent()

check id CHARTEVENT_CHART_CHANGE and check zoom value with

  long zoom=ChartGetInteger(0,CHART_SCALE,0);

 and if it has changed, re-size the histogram accordingly

d.bignotti
119
d.bignotti  
Thank you very much!
To add comments, please log in or register