Indicators: Size of a candle (histogram)

 

Size of a candle (histogram):

The indicator displays the candlestick size (High-Low) and its direction in the form of a colored histogram.

Size of a candle (histogram) M5

Author: Vladimir Karputov

 

Hi,

I am new to MT5 and trying to learn. 

1) Why does "Size of a candle (histogram) work but not if I change "calculations=high[i]-low[i]" to "calculations=open[i]-close[i]?

2) What does "int g=0" do?

Any help would be appreciated.

Thanks

Rudy

 
mt1709051017 :

Hi,

I am new to MT5 and trying to learn. 

1) Why does "Size of a candle (histogram) work but not if I change "calculations=high[i]-low[i]" to "calculations=open[i]-close[i]?

2) What does "int g=0" do?

Any help would be appreciated.

Thanks

Rudy

What does "not work" mean? Show the settings. Show symbol and timeframe. Show the indicator data in the 'Data Window'.

 

Maybe 2-3 years late for the comment above but...i'm looking for an indicator that will do this as well, basically this exact same indicator but for candle body (open/close) size not high/low.

I want to set level lines on it so i can avoid trading in low pip value areas (looking only at candle close), volume indicators (kind of) do this but they take market sentiment/momentum into account and i only want raw pip/point value of of each individual candle body size as a histogram, any chance you could add that as an option or point me in the direction of another indicator?

 
@Ravayen #: i'm looking for an indicator that will do this as well, basically this exact same indicator but for candle body (open/close) size not high/low.

Just change the line ...

double calculations=high[i]-low[i]; 

to this ...

double calculations=fabs(close[i]-open[i]);