Can anyone help me test and run the official sample script

 

Can anyone help me test and run the official sample script: Scripts/Examples/Canvas/Chart/HistogramChartSample.mq5

Normally it should be displayed

But what I get is:

This may be a bug in the official code.

 
Please save the compiled HistogramChartSample.ex5 first. This is the normal display script. When you recompile the script code, it will be as shown in the screenshot above.
 
m_scale_y=(m_v_scale_max!=m_v_scale_min) ? (m_y_min-m_y_max)/(m_v_scale_max-m_v_scale_min) : 1;

I have confirmed that this line of code in ChartCanvas.mqh caused the issue: The latest version of the code was changed to: This is incorrect: m_y_max-m_y_min

Auto-translation applied by moderator. On the English forum, please write in English.

 
hini #I have confirmed that this line of code in ChartCanvas.mqh caused the issue: The latest version of the code was changed to: This is incorrect: m_y_max-m_y_min

Yes, at line 863 of the file "ChartCanvas.mqh", changing ...

... from:

m_scale_y=(m_v_scale_max!=m_v_scale_min) ? (m_y_max-m_y_min)/(m_v_scale_max-m_v_scale_min) : 1;

... to:

m_scale_y=(m_v_scale_max!=m_v_scale_min) ? (m_y_min-m_y_max)/(m_v_scale_max-m_v_scale_min) : 1;

... seems to correct the issue.

However, since I have never used this code before, I do not know what the correct behaviour should be.

Can I kindly ask the admin/dev @Ilyas, to look into this?

 
Fernando Carreiro # :
However, since I have never used this code before, I do not know what the correct behaviour should be.
The real problem is that HistogramChart.mqh does not use the new coordinate formula. Only ChartCanvas.mqh was modified, but some codes in HistogramChart.mqh and LineChart.mqh were not modified.
 
Fernando Carreiro #:

Yes, at line 863 of the file "ChartCanvas.mqh", changing ...

... from:

... to:

... seems to correct the issue.

However, since I have never used this code before, I do not know what the correct behaviour should be.

Can I kindly ask the admin/dev @Ilyas, to look into this?

Reported.