added tick type parameter and ohlc duration