create an OHLC data from Date, time, price using C#

﹥>﹥吖頭↗ 提交于 2019-12-06 07:53:17

You have the data "tick by tick" you have one line per trade. To create the Open, Low, High, Close, you need to create a logic that process each tick.

for each tick: - If is the first tick of the day, "open" price" = price, low = price, high = price. The close price of the previous day equals the last price. - If not first tick of the day, update low if the price is smaller than low. - If not first tick of the day, update high if the high price is greater than high.

Also, is a good idea to accumulate "Volume" for each day. It's a very important indicator, since if you have a big difference o prices with almost no volume, is a signal of possible market manipulation.

In technical terms, it's just CSV parsing and simple logic. If you have trouble with the logic, please, let me know. I'm suposing that your problem is to understand the market logic, not the C# logic.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!