钱龙数据数据结构
 
(一)钱龙日线文件数据结构沪市日线文件路径:默认在ML30\DATA\SHASE\DAY下。
深市日线文件路径:默认在ML30\DATA\SZNSE\DAY下。日线文件命名规则:股票代码.DAY每个日K线为40字节,具体如下:
Date:LongInt; //日期
OPen:LongInt; //开盘(元/1000)
High:LongInt; //最高价(元/1000)
Low:LongInt; //最低价(元/1000)
Close:LongInt; //收盘(元/1000)
Money:LongInt; //成交额(千元)
Volume:LongInt; //成交量(手)
Nouse1:LongInt; //没用
Nouse2:LongInt; //没用
Nouse3:LongInt; //没用(二)钱龙代码表文件格式沪市代码表文件路径:默认为ML30\DATA\SHASE\NAMETBL.SHA
深市代码表文件路径:默认为ML30\DATA\SZNSE\NAMETBL.SZNFirst0:ShortInt; //1字节,只能为00
Name:array [1..8] of Char;
Kind:ShortInt;
Code:array [1..6] of Char;//代码深圳为XXXX__
YesClose:LongInt;//昨收
Open:LongInt;//开盘
High:LongInt;//最高
Low:LongInt;//最低
Close:LongInt;//收盘
Volume:LongInt;//总手
Money:LongInt;//金额
Buy1M:LongInt;//买一价
Buy1V:LongInt;//买一量
Buy2M:LongInt;//买二价
Buy2V:LongInt;//买二量
Buy3M:LongInt;//买三价
Buy3V:LongInt;//买三量
Sale1M:LongInt;//卖一价
Sale1V:LongInt;//卖一量
Sale2M:LongInt;//卖二价
Sale2V:LongInt;//卖二量
Sale3M:LongInt;//卖三价
Sale3V:LongInt;//卖三量
Per:SmallInt;//只能为100??
NowV:LongInt;//现手(三)钱龙网络版动态数据格式(即ml30\lond\dat下的数据格式)// Set the default value
#define EXCH_MIN 240
#define EXCH_A 9*60+30
#define EXCH_AE 11*60+30
#define EXCH_B 13*60+00
#define EXCH_BE 15*60+00
#define SEP_TAG 0xffffffff
#define TRA_MAXN 1000
#define INFO_PARA 0x84
#define TYPE_NUM 0x4
#define FALSE 0x0
#define TRUE 0x1
#define SLHS_SIZE 0x300
#define SH_ZS 'a'
#define SH_AG 'b'
#define SH_BG 'c'
#define SH_ZQ 'd'
#define SZ_ZS 'A'
#define SZ_AG 'B'
#define SZ_BG 'C'
#define SZ_ZQ 'D'
#define DH_ZS 0x10
#define DH_AG 0x11
#define DH_BG 0x12
#define DH_ZQ 0x13
#define DZ_ZS 0x20
#define DZ_AG 0x21
#define DZ_BG 0x22
#define DZ_ZQ 0x23struct APD_stock_data{ // in 199YMMDD.DAT
unsigned char data_id; // =0x73 with min_data,// =0x09 without min_data,// =0x20 is deleted
unsigned char stock_type; // many be a,b,c,d or A,B,C,D
unsigned char stock_code[6]; // stock code
unsigned char stock_name[8]; // name of the stock
unsigned long last_close_price;
unsigned long open_price;
unsigned long high_price;
unsigned long low_price;
unsigned long close_price;
unsigned long total_volume;
unsigned long total_value;
};struct APD_stock_min{ // store data for normal shares
unsigned long cur_price; // price of every minutes
unsigned long total_volume; // summary volume by this minute
unsigned int average_percent; // swing percent of the average value
};struct APD_index_min{ // store data for index
unsigned long cur_price; // index of every minutes
unsigned long total_volume; // summary volume by this minute
unsigned int average_percent; // swing percent of the average index
unsigned int buy_vigour; // the vigour value of buying
unsigned int sell_vigour; // the vigour value of selling
};// Develop data files by appdata structured upwardsstruct Data_5min{ // in .nmn files
unsigned long min_off; // Format is MMDDHHMM
unsigned long open_price; // 0.001
unsigned long high_price; // 0.001
unsigned long low_price; // 0.001
unsigned long close_price; // 0.001
unsigned long min_amount; // 100
unsigned long min_volume; // 100
unsigned long time_count; // sum trade time
unsigned char share_value; // share value
unsigned char share_number; // share break number
unsigned int share_bonus; // share bonus
unsigned long shares_number; // sum number
};struct His_data{ // in lonhis.???
unsigned long cur_price;
unsigned long total_volume; // total volume
unsigned long total_value; // total value by this minute
unsigned long buy_volume; // initiactive total buy volume
unsigned long sell_volume; // initiactive total sell volume
unsigned int rise_num; // summary rise shares of this minute
unsigned int fall_num; // summary fall shares of this minute
unsigned int average_percent; // swing percent of the average index
unsigned int buy_vigour; // the vigour value of buying
unsigned int sell_vigour; // the vigour value of selling
unsigned int value_ADL; // the value of current ADL index
unsigned int swing_flag; // the flag of rise or fall
};struct Tra_data{ // in lontra.???
unsigned int time_off;
unsigned long cur_price;
unsigned long total_vol;
unsigned long buy_price;
unsigned long sell_price;
};struct Info_data{ // in loninfo.???
unsigned char stock_id; // This byte is to id stock
unsigned char data_tag; // always be 0 to id
unsigned int stock_num;
unsigned int start_num;
unsigned int max_tra;
unsigned int min_exch;
unsigned int exch_min;
unsigned int A_begin_time;
unsigned int A_end_time;
unsigned int B_begin_time;
unsigned int B_end_time;
};struct Cdp_data{ // shacdp.dat of HXTW
unsigned char stock_code[6];
unsigned char reserved[20];
unsigned long reserved2;
};// some dynamic data files structured upwardsstruct Data_day{ // in .day files
unsigned long day_date; // Format is YYYYMMDD
unsigned long open_price; // 0.001
unsigned long high_price; // 0.001
unsigned long low_price; // 0.001
unsigned long close_price; // 0.001
unsigned long day_amount; // 1000
unsigned long day_volume; // 100
unsigned long time_count; // sum trade time
unsigned char share_value; // share value
unsigned char share_number; // share break number
unsigned int share_bonus; // share bonus
unsigned long shares_number; // sum number
};struct Slon_para{ // in file slonpara.dat
unsigned int sh_A_para; // Offset of SH_A stock
unsigned int sh_B_para;
unsigned int sh_C_para;
unsigned int sh_total_para;
unsigned int sz_A_para;
unsigned int sz_B_para;
unsigned int sz_C_para;
unsigned int sz_total_para;
unsigned int data_tag[3];
};struct Slon_day{ // in .day files of Slon
unsigned long day_date; // Format is YYYYMMDD
unsigned long open_price; // 0.001
unsigned long close_price; // 0.001
unsigned long high_price; // 0.001
unsigned long low_price; // 0.001
unsigned long day_amount; // 1000
unsigned long day_volume; // 100
unsigned int reserved[6]; // Some infomation I don't know
};struct Slon_HS{ // in lonhs.dat of Slon
unsigned int data_tag1; // Some infomation I don't know
unsigned char stock_type; // =0xff is delete, =0x64 is OK
unsigned long stock_code; // number of stock code
unsigned char stock_name[8]; // name of stock
unsigned char data_tag2; // =0x0, Some infomation I don't know
unsigned int data_tag3; // =0x64, Some infomation I don't know
unsigned int last_close_price;
unsigned int open_price;
unsigned long PMA5_volume; // The volume of 5day average
unsigned int high_price;
unsigned int low_price;
unsigned int close_price;
unsigned long data_tag4; // Some infomation I don't know
unsigned long total_volume1; // Total volume
unsigned long total_volume2; // Total volume
unsigned int buy_1_price; // The price of buying now
unsigned char buy_2_sub; // The offset of buy 1 and buy 2 price
unsigned char buy_3_sub; // The offset of buy 1 and buy 3 price
unsigned long buy_1_volume;
unsigned long buy_2_volume;
unsigned long buy_3_volume;
unsigned int sell_1_price; // The price of selling now
unsigned char sell_2_add; // The offset of sell 1 and sell 2 price
unsigned char sell_3_add; // The offset of sell 1 and sell 3 price
unsigned long sell_1_volume;
unsigned long sell_2_volume;
unsigned long sell_3_volume;
unsigned int refx;
unsigned int refy;
unsigned int hisfptr;
unsigned int numppg;
unsigned char pgnum;
unsigned int hisptr00;
unsigned int hisptr01;
unsigned int hisptr02;
unsigned int hisptr03;
unsigned int hisptr04;
unsigned int hisptr05;
unsigned int hisptr06;
unsigned int hisptr07;
unsigned int hisptr08;
unsigned int hisptr09;
unsigned int data_tag5;
unsigned long cur_volume;
unsigned char reserved1[12];
unsigned int minfptr;
unsigned int minsize;
unsigned long data_tag6;
unsigned long out_volume;
unsigned char reserved2[133];
unsigned char data_tag7; // always 07
unsigned char reserved3[145];
unsigned char end_hour;
unsigned char end_minute;
unsigned int lastmin_vol;
unsigned int data_tag8;
unsigned long total_volume3;
unsigned int cur_price;
unsigned long average_price;
unsigned char reserved4[82];
};