How can i change the color of histogram, please help

 
for(int i=start; i<rates_total && !IsStopped(); i++)
{

      ExtSignalBuffer[i]=( low[i]-open[i])*1000000;
      if (open[i]-close[i] > 0) // in case bear
      indicator_type2[i] = clrAqua;//change color
      ExtSignalBuffer[i]=(low[i]-close[i])*1000000;
 } 
 

It's numeric, you define the colors in the property 

take your time to read it:

https://www.mql5.com/en/docs/customind/indicators_examples/draw_color_histogram


In the code example it shows:

#property indicator_color1  clrRed,clrGreen,clrBlue,clrYellow,clrMagenta,clrCyan,clrMediumSeaGreen,clrGold

that means clrRed is 0

clrGreen is 1

clrBlue is 2

and so on

Documentation on MQL5: Custom Indicators / Indicator Styles in Examples / DRAW_COLOR_HISTOGRAM
Documentation on MQL5: Custom Indicators / Indicator Styles in Examples / DRAW_COLOR_HISTOGRAM
  • www.mql5.com
The DRAW_COLOR_HISTOGRAM style draws a histogram as a sequence of colored columns from zero to a specified value. Values are taken from the...
 
import matplotlib.pyplot as plt

# Sample data
data = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]

# Create a histogram with a specified color
plt.hist(data, bins=5, color='skyblue', edgecolor='black')

# Add titles and labels
plt.title('Histogram')
plt.xlabel('Value')
plt.ylabel('Frequency')

# Show the plot
plt.show()