Thanks a lot @Nicolas.
It worked. Here is the full code
defparam drawonlastbaronly=true
p1 = (dhigh(1)+dlow(1)+dclose(1))/3
p2 = (dhigh(2)+dlow(2)+dclose(2))/3
p3 = (dhigh(3)+dlow(3)+dclose(3))/3
r11 = 2*p1 - dlow(1)
r12 = 2*p2 - dlow(2)
r13 = 2*p3 - dlow(3)
s11 = 2*p1 - dhigh(1)
s12 = 2*p2 - dhigh(2)
s13 = 2*p3 - dhigh(3)
r21 = p1 + (dhigh(1)-dlow(1))
r22 = p2 + (dhigh(2)-dlow(2))
r23 = p3 + (dhigh(3)-dlow(3))
s21 = p1 - (dhigh(1)-dlow(1))
s22 = p2 - (dhigh(2)-dlow(2))
s23 = p3 - (dhigh(3)-dlow(3))
r31 = r11+(dhigh(1)-dlow(1))
r32 = r12+(dhigh(2)-dlow(2))
r33 = r13+(dhigh(3)-dlow(3))
s31 = s11-(dhigh(1)-dlow(1))
s32 = s12-(dhigh(2)-dlow(2))
s33 = s13-(dhigh(3)-dlow(3))
DRAWLINE(barindex-1,p1,barindex,p1) coloured(153,153,0)
DRAWLINE(barindex-1,p2,barindex,p2) coloured(153,153,0)
DRAWLINE(barindex-1,p3,barindex,p3) coloured(153,153,0)
DRAWLINE(barindex-1,r11,barindex,r11) coloured(170,153,0)
DRAWLINE(barindex-1,r12,barindex,r12) coloured(170,153,0)
DRAWLINE(barindex-1,r13,barindex,r13) coloured(170,153,0)
DRAWLINE(barindex-1,s11,barindex,s11) coloured(170,153,0)
DRAWLINE(barindex-1,s12,barindex,s12) coloured(170,153,0)
DRAWLINE(barindex-1,s13,barindex,s13) coloured(170,153,0)
DRAWLINE(barindex-1,r21,barindex,r21) coloured(170,153,0)
DRAWLINE(barindex-1,r22,barindex,r22) coloured(170,153,0)
DRAWLINE(barindex-1,r23,barindex,r23) coloured(170,153,0)
DRAWLINE(barindex-1,s21,barindex,s21) coloured(170,153,0)
DRAWLINE(barindex-1,s22,barindex,s22) coloured(170,153,0)
DRAWLINE(barindex-1,s23,barindex,s23) coloured(170,153,0)
DRAWLINE(barindex-1,r31,barindex,r31) coloured(170,153,0)
DRAWLINE(barindex-1,r32,barindex,r32) coloured(170,153,0)
DRAWLINE(barindex-1,r33,barindex,r33) coloured(170,153,0)
DRAWLINE(barindex-1,s31,barindex,s31) coloured(170,153,0)
DRAWLINE(barindex-1,s32,barindex,s32) coloured(170,153,0)
DRAWLINE(barindex-1,s33,barindex,s33) coloured(170,153,0)
return