0

How to convert nTime to TimeSpan?

uint nTime = 9012245; // 9 = Hour  01 = Minutes  22 = Seconds 45 = Milliseconds

tickdata[0] = {9010145,Price,Volume}  
tickdata[1] = {9010253,Price,Volume}  
tickdata[2] = {9010253,Price,Volume}  
tickdata[3~7] = {....}  
tickdata[8] = {9015945,Price,Volume}  
tickdata[9] = {9020045,Price,Volume}  
tickdata[100] = {9030145,Price,Volume}  
// [0~8] = 90100 ~ 90159 1min

I want quick count every 1min(or 5min or 10min...) tickdata's OHLC, and write to tickOf1min like below :

tickOf1min[0] = {90100,Open,HighL,Close}  
tickOf1min[1] = {90200,Open,HighL,Close}  
tickOf1min[2] = {90300,Open,HighL,Close}  
DavidLu
  • 33
  • 1
  • 7

0 Answers0