C # Method of reading the historical data of Tongda letter

Source: Internet
Author: User

Public Bar readbarmin (binaryreader br, int instrumentid, long size)
{

int date = br. ReadUInt16 ();
int min = br. ReadUInt16 ();
Stock 2, Treasury repurchase 3, 300ETF is 4-bit
Double open = convert.todouble (Convert.todecimal (BR). Readsingle ()));
Double high = convert.todouble (Convert.todecimal (BR). Readsingle ()));
Double low = convert.todouble (Convert.todecimal (BR). Readsingle ()));
Double close = convert.todouble (Convert.todecimal (BR). Readsingle ()));
Double amount = convert.todouble (Convert.todecimal (BR). Readsingle ())); Turnover not saved
int vol = br. ReadInt32 ();
int reserve = Br. ReadInt32 (); Reserved words

int year = date/2048 + 2004;
int month = date% 2048/100;
int day = date% 2048 100;

int HH = MIN/60;
int mm = min% 60;
if ((HH = = 9) && (mm = = 1 | | mm = = 5))
{
Daym = day;
Momm = month;

}
if ((hh>20) && (hh<24))
{
Day=daym;
month = Momm;
}

DateTime closedatatime = new DateTime (year, month, day, HH, MM, 0);
DateTime opendatetime = Closedatatime.addseconds (-size);

C # Method of reading the historical data of Tongda letter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.