The candle strength indicator measure the “strenght” of the current candlestick by comparing its OHLC value between them.
Red and green histogram are created depending of the direction of the candlestick (bullish or bearish ones).
Code converted from MT4 version by a request in the ProBuilder french forum.
//PRC_Candle Strength| indicator
//26.10.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
value = 100*(Open-Low)/(High-Low)-50
if (Close > Open) then
buffer1 = value
buffer2 = 0
else
buffer1 = 0
buffer2 = value
endif
return buffer1 coloured(0,255,0) style(histogram), buffer2 coloured(255,0,0) style(histogram),0 style(dottedline),50 style(dottedline),-50 style(dottedline)