refactor candlestick initialize