It works fine, with 10K units (if you use 200K units, then you’ll have to wait some time).
I added +5 to BARINDEX when displaying text, so it is plotted in the future (a feature added in v11) and doesn’t make a mess with data lines:
DefParam DrawOnLastBarOnly = true
H1 = DHigh(1)
L1 = DLow(1)
C1 = DClose(1)
PDC=c1
PDH=H1
PDL=L1
PPDAY = (H1 + L1 + C1) / 3
BCPR= (H1 + L1)/2
TCPR =(PPDay-BCPR)+PPDay
///////////////////////////////
If BCPR > TCPR then
BCPRT=((H1 + L1)/2 )+10
TCPRT=((PPDay-BCPR)+PPDay) -10
ELSIf TCPR > BCPR then
TCPRT=((H1 + L1)/2 )+10
BCPRT=((PPDay-BCPR)+PPDay) -10
ENDIF
//////////////////////////////
DRAWsegment(barindex-1,PPDay,barindex,PPDay)
DRAWsegment(barindex-1,BCPR,barindex,BCPR)
DRAWsegment(barindex-1,TCPR,barindex,TCPR)
DRAWsegment(barindex-1,BCPRT,barindex,BCPRt)
DRAWsegment(barindex-1,TCPRT,barindex,TCPRT)
drawtext("TCPR",barindex+5,TCPR,SansSerif,Bold,13)
drawtext("BCPR",barindex+5,BCPR,SansSerif,Bold,13)
drawtext("PPDay",barindex+5,PPDay,SansSerif,Bold,13)
drawtext("TCPRT",barindex+5,TCPRT,SansSerif,Bold,13)
drawtext("BCPRT",barindex+5,BCPRT,SansSerif,Bold,13)
//drawtext("PDC",barindex,PDC,SansSerif,Bold,13)
RETURN TCPR AS " TCPR" ,BCPR AS "BCPR", PPDay as "PPDay",TCPRT AS " TCPRT" ,BCPRT AS "BCPRT"