IF BarIndex = 0 THEN
XClose = TotalPrice
XOpen = (Open + Close) / 2
ELSE
XClose = TotalPrice
XOpen = (XOpen[1] + Xclose[1]) / 2
ENDIF
if xclose>xopen and xclose[1]<xopen[1] then
myindex=barindex
endif
dis=averagetruerange[10](close)*1.2
if barindex-myindex=2 and xclose[0]>xopen[0] then
drawtext ("3", barindex[0], low[0]-dis, dialog , standard, 16) coloured(0,0,0)
endif
if barindex-myindex=4 and xclose[0]>xopen[0] then
drawtext ("5", barindex[0], low[0]-dis, dialog , standard, 16) coloured(0,0,0)
endif
if barindex-myindex=7 and xclose[0]>xopen[0] then
drawtext ("8", barindex[0], low[0]-dis, dialog , standard, 16) coloured(0,0,0)
endif
if barindex-myindex=9 and xclose[0]>xopen[0] then
drawtext ("10", barindex[0], low[0]-dis, dialog , standard, 16) coloured(0,0,0)
endif
if barindex-myindex=10 and xclose[0]>xopen[0] then
drawtext ("11", barindex[0], low[0]-dis, dialog , standard, 16) coloured(0,0,0)
endif
if barindex-myindex=12 and xclose[0]>xopen[0] then
drawtext ("13", barindex[0], low[0]-dis, dialog , standard, 16) coloured(0,0,0)
endif
if xclose<xopen and xclose[1]>xopen[1] then
myindex=barindex
endif
if barindex-myindex=2 and xclose[0]<xopen[0] then
drawtext ("3", barindex[0], high[0]+dis, dialog , standard, 16) coloured(255,0,0)
endif
if barindex-myindex=4 and xclose[0]<xopen[0] then
drawtext ("5", barindex[0], high[0]+dis, dialog , standard, 16) coloured(255,0,0)
endif
if barindex-myindex=7 and xclose[0]<xopen[0] then
drawtext ("8", barindex[0], high[0]+dis, dialog , standard, 16) coloured(255,0,0)
endif
if barindex-myindex=9 and xclose[0]<xopen[0] then
drawtext ("10", barindex[0], high[0]+dis, dialog , standard, 16) coloured(255,0,0)
endif
if barindex-myindex=10 and xclose[0]<xopen[0] then
drawtext ("11", barindex[0], high[0]+dis, dialog , standard, 16) coloured(255,0,0)
endif
if barindex-myindex=12 and xclose[0]<xopen[0] then
drawtext ("13", barindex[0], high[0]+dis, dialog , standard, 16) coloured(255,0,0)
endif
return