Hello Alain,
The code has no values, a candle is drawn only.
In the code below you will find the values you are looking for:
//ALE - 28.06.2018
//update -30.03.2020
//@PROREALCODE
/////////
//HeikinPeriod =40
//AverageType =5
//ChannelPeriod=10
//TransParency =15
//ColouredCandle= 0-1 on/off
/////////
IF BarIndex=0 THEN
xClose = (open+high+low+close)/4
xOpen = open
xHigh = high
xLow = low
ELSE
xClose = (open+high+low+close)/4
xOpen = (xOpen[1]+xClose[1])/2
xHigh = Max(max(high, xOpen), xClose)
xLow = Min(min(Low, xOpen), xClose)
endif
//Smoothed Heikin-Ashi
xxclose=Average[max (1,HeikinPeriod),AverageType](xclose)
xxOpen = Average[max (1,HeikinPeriod),AverageType](xOpen)
xxHigh = Average[max (1,HeikinPeriod),AverageType](xHigh)
xxLow = Average[max (1,HeikinPeriod),AverageType](xLow)
IF ColouredCandle then
//Colour Setting
MyDi = xxclose-xxclose[1]
MyDi=MyDi*(1/pointsize)
r=50+(200-MyDi*100)
g=50+(200+MyDi*100)
b=50+(0+MyDi*30)
ELSE
IF xxClose>xxOpen then
R=0
G=255
B=0
ELSE
R=255
G=0
B=0
ENDIF
ENDIF
if range>0 then
AVGr=Average[channelperiod](range)
endif
//Build channel with Highest and Lowest of Heikin-Ashi smoothed candle
DRAWCANDLE(xxOpen, (xxHigh+(xxHigh-xxlow)/2)+avgr, (xxlow-(xxHigh-xxlow)/2)-avgr, xxClose) Coloured (R,G,b,MAX(50,Transparency*10))
return xxOpen coloured (255,255,255,0) as "open",(xxHigh+(xxHigh-xxlow)/2)+avgr coloured (255,255,255,0) as "high",(xxlow-(xxHigh-xxlow)/2)-avgr coloured (255,255,255,0) as "low",xxClose coloured (255,255,255,0) as "close"
ignored, HHigh, ignored, ignored = CALL "Heikin_Candle_smoothed"[40, 5, 10, 15, 0]
c1 = (HHigh> close)
ignored, ignored, LLow, ignored = CALL "Heikin_Candle_smoothed"[40, 5, 10, 15, 0]
c2 = (LLow< close)
Thanks
Ale