Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Hi,

I have collection of data into my csv.

VB
Stock,BarDateTime,Open,High,Low,Close
3045,2012-10-10 09:15:00.000,2255.00,2261.80,2254.15,2256.25
3045,2012-10-10 09:16:00.000,2256.65,2261.85,2256.65,2261.85
3045,2012-10-10 09:17:00.000,2262.05,2263.00,2261.15,2261.15
3045,2012-10-10 09:18:00.000,2261.20,2261.20,2258.15,2259.00
3045,2012-10-10 09:19:00.000,2257.70,2259.55,2257.70,2258.90
3045,2012-10-10 09:20:00.000,2258.80,2259.70,2256.20,2257.00
3045,2012-10-10 09:21:00.000,2257.15,2257.15,2255.20,2255.80
3045,2012-10-10 09:22:00.000,2254.55,2254.55,2250.60,2251.20
3045,2012-10-10 09:23:00.000,2251.30,2251.30,2249.60,2249.60
3045,2012-10-10 09:24:00.000,2249.60,2250.90,2249.00,2250.90
3045,2012-10-10 09:25:00.000,2250.90,2253.60,2250.90,2252.80
3045,2012-10-10 09:26:00.000,2252.60,2252.60,2251.50,2252.00
3045,2012-10-10 09:27:00.000,2252.70,2255.00,2252.45,2252.85
3045,2012-10-10 09:28:00.000,2252.85,2252.85,2252.10,2252.10
3045,2012-10-10 09:29:00.000,2253.80,2254.85,2253.80,2254.45
3045,2012-10-10 09:30:00.000,2254.25,2254.25,2252.00,2252.00
3045,2012-10-10 09:31:00.000,2252.10,2252.10,2251.20,2252.00
3045,2012-10-10 09:32:00.000,2252.65,2254.40,2252.65,2254.35
3045,2012-10-10 09:33:00.000,2255.05,2256.95,2255.05,2256.05
3045,2012-10-10 09:34:00.000,2255.55,2257.90,2255.55,2256.85
3045,2012-10-10 09:35:00.000,2256.00,2257.00,2255.10,2256.60
3045,2012-10-10 09:36:00.000,2256.50,2256.50,2255.25,2255.40
3045,2012-10-10 09:37:00.000,2255.10,2255.10,2254.40,2254.40
3045,2012-10-10 09:38:00.000,2254.00,2257.50,2253.30,2256.30
3045,2012-10-10 09:39:00.000,2256.30,2258.95,2255.60,2257.60
3045,2012-10-10 09:40:00.000,2258.00,2258.00,2256.35,2257.05


As you can see periodicity of this data is 1 Minute interval(See second column BarDateTime "yyyy-mm-dd HH:MM:SS.SSS"). I want to convert this data into other custom periodicity like 3,5,7 Minute interval with OHLC calculated accordingly. Is there any C# dll or program which can convert collection of this data into any other custom periodicity, by using lowest loops iteration for better performance. I want output this data into dynamic array cause i will be adding data to this collection in realtime mode.
Above data in my C# application, creating dataset from CSV file.
Please let me know if you know any such readily available program or dll.
Posted

1 solution

If someone has a program doing exactly this, by some reason, and if this individual is a reasonable person, this developer would be ashamed to publish this code and make it available. Spamming busy and hard-working people would be not a good idea. If someone published such code in CodeProject anywhere but this Questions & Answers forum, it would not live long. Many members like myself would report it as having no value, and such post would be "closed", as it happens from time to time with spam, plagiarizing or just pointless post.

Now, if you think that you have a considerable odds of having the piece of work doing exactly the same and already available software, it would tell us about your serious lack of judgement. Even if you don't need exactly the same but hope to have something which could help you somehow. In fact, writing the code your need from scratch would be less costly then even looking at the available similar code in case someone finds it out for you.

I gave you some arguments to show that nothing in your request makes any practical sense. I even seriously doubt the whole work you refer to makes any practical sense. Dealing with ad-hoc data and file format, in ad-hoc manner, with ad-hoc requirements and changes in requirements…

—SA
 
Share this answer
 
Comments
wizardzz 10-Oct-12 14:13pm    
" Dealing with ad-hoc data and file format, in ad-hoc manner, with ad-hoc requirements and changes in requirements…"
I don't exactly see where he is saying this?
Sergey Alexandrovich Kryukov 10-Oct-12 15:18pm    
He is not saying it anywhere; this is what I think looking at the data sample and question. It's all ad-hoc stuff, can't you see it, too?
--SA
wizardzz 10-Oct-12 15:27pm    
Honestly, I don't see it as ad-hoc. It's time series data with summary statistics.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900