MnAParticipant
New
Hello, I m looking for help coding an indicator using Renko closing prices. I want to code a Weighted Moving Average and a Hull Average using closing Renko prices.
Everytime I try, the indicator ignores Renko and instead uses the candlestick closing price not the renko closing price.
The renko code I found already as per below
Median renko boxes on price
Is there anyone who has coded indicators using closing Renko prices?
Thank you
You need to make calculations using TopPrice or BottomPrice as a replacement for close:
//parameters :
boxsize = 50
once topprice = close
once bottomprice = close - boxsize*ticksize*2
ONCE RenkoClose = close
if(close > topprice + boxsize*2) THEN
topprice = close
RenkoClose = topprice
bottomprice = (topprice[1] + bottomprice[1])/2
ELSIF (close < bottomprice - boxsize*2) THEN
bottomprice = close
RenkoClose = bottomprice
topprice = (topprice[1] + bottomprice[1])/2
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
Sma100 = average[100,0](RenkoClose)
RETURN topprice as "box top", bottomprice as "bottom box",Sma100 AS "Sma100"