The proper way to convert market data ticks to OHLC

(Last Updated On: April 19, 2016)
Learn the Secret

Get  our 2 Free Books

Get these now which land directly to their inbox.
Invalid email address

The proper way to convert market data ticks to OHLC

After my email of:

Convert tick data to OHLC?

I got this response from a long standing newsletter subscriber:

Super busy but my quick answer. A “bar” is just a collection of ticks of some kind. To build a “Minute” bar, you would collect ticks as they come in and store their values in the data structure of your choice. While building that collection you have you have to mark the O and C price and the H and L can change on tick as the structure fills. That data structure is usually an array of DateTimeOHLCV objects of some kind.

HOWEVER, most commercial trading software or developer API’s allow you to import data and have bar structures built out already(as you know). If the person asking the question needs to program bars, they plan on building a trading system scratch and if you can do that you can build a List<> object with values, I would imagine as the tick data structure is the backbone..literally. It sounds like this person should be using trading software like NinjaTrader or TradeStation, ect.. – those are very flexable/extendable and can import data. But there is an API with common trading functionality to write higher level code against as well.
Hope all is awesome!
Another response:
There is a plethora of similar questions and answers at. Stackover Flow  That’s where I’d start.

http://stackoverflow.com/questions/17952082/converting-tick-data-to-ohlc-bars-using-r

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
This entry was posted in Uncategorized and tagged , , , , on by .

About caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at youtube.com/quantlabs