Chart Operations on OBJ_CHART

 

Hi,


whats the syntax for setting CHART_SHOW_OHLC --> false, on a Chart object that was created as OBJ_CHART?


Thank you, Sven

 
svengralla:

Hi,


whats the syntax for setting CHART_SHOW_OHLC --> false, on a Chart object that was created as OBJ_CHART?


Thank you, Sven

https://www.mql5.com/en/forum/13297
How to change colors of bar and candle in chart object
How to change colors of bar and candle in chart object
  • www.mql5.com
I also wanted to know how to hide OHLC values in the upper left corner.
 

Hi,

thanks for the response. I tried ...


long mini_chart_id;
mini_chart_id=ObjectGetInteger(0,"mini_chart_1",OBJPROP_CHART_ID);
ChartSetInteger(mini_chart_id, CHART_SHOW_OHLC, false);


But this doesnt work. What am I missing?

 
svengralla:

Hi,

thanks for the response. I tried ...



But this doesnt work. What am I missing?

Is mini_chart_id gets a correct value ?

Check the returned value of ChartSetInteger() and print the error code if needed.

 
angevoyageur:

Is mini_chart_id gets a correct value ?

Check the returned value of ChartSetInteger() and print the error code if needed.


long mini_chart_id;
mini_chart_id=ObjectGetInteger(0,"mini_chart_1",OBJPROP_CHART_ID);
Print("id ",mini_chart_id);
Print(ChartSetInteger(mini_chart_id, CHART_SHOW_OHLC, false));
2014.04.30 20:56:30.157    chart_mini (EURUSD,M1)    585
2014.04.30 20:56:30.157    chart_mini (EURUSD,M1)    true
2014.04.30 20:56:30.154    chart_mini (EURUSD,M1)    id 130427029228697791
 
svengralla:


2014.04.30 20:56:30.157    chart_mini (EURUSD,M1)    585
2014.04.30 20:56:30.157    chart_mini (EURUSD,M1)    true
2014.04.30 20:56:30.154    chart_mini (EURUSD,M1)    id 130427029228697791


("chart_mini"?)

ChartRedraw(mini_chart_id);
 
angevoyageur:

Yes, that's it.

Thank you.


I had the "ChartRedraw" issue already before, working on a different indicator.

So, thats something definitely to be kept in mind.

Interestingly, it's not an issue on Mt4.

Reason: