package Ġorg . k ent unc . bit tr ader . c andle . api . domain . model . c andle Ċ Ċ import Ġorg . k ent unc . bit tr ader . common . domain . model . c andle . C andle Ċ import Ġorg . k ent unc . bit tr ader . common . domain . model . c andle . C andle List Ċ import Ġorg . k ent unc . bit tr ader . common . domain . model . time . DateTime Factory Ċ import Ġorg . ta 4 j . core . Bar Ċ import Ġorg . ta 4 j . core . Bar Series Ċ import Ġorg . ta 4 j . core . Base Bar Ċ import Ġorg . ta 4 j . core . Base Bar Series Ċ Ċ private Ġfun ĠC andle . to Bar (): ĠBar Ġ{ ĊĠĠĠ Ġreturn ĠBase Bar ( ĊĠĠĠĠĠĠĠ Ġid . duration . to Temporal Unit (). duration , ĊĠĠĠĠĠĠĠ ĠDateTime Factory . getZ onedDateTime ( id . dateTime . to LocalDateTime ()), ĊĠĠĠĠĠĠĠ Ġopen . to BigDecimal (). toDouble (), ĊĠĠĠĠĠĠĠ Ġhigh . to BigDecimal (). toDouble (), ĊĠĠĠĠĠĠĠ Ġlow . to BigDecimal (). toDouble (), ĊĠĠĠĠĠĠĠ Ġclose . to BigDecimal (). toDouble (), ĊĠĠĠĠĠĠĠ Ġvolume . to BigDecimal (). toDouble () ĊĠĠĠ Ġ) Ċ } Ċ Ċ fun ĠC andle List . to Bar Series (): ĠBar Series Ġ{ ĊĠĠĠ Ġval Ġbars Ġ= Ġthis . toList () ĊĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġit . to Bar () Ġ} ĊĠĠĠ Ġreturn ĠBase Bar Series ( bars ) Ċ } Ċ