ADX calculation

how to create blocks for 5 period ADX ( high+low+close/3)…

can u pl detail out the requirement?