(二)钱龙代码表文件格式
沪市代码表文件路径:默认为ML30/DATA/SHASE/NAMETBL.SHA深市代码表文件路径:默认为ML30/DATA/SZNSE/NAMETBL.SZN
First0:ShortInt; //1字节,只能为00Name: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 0x23
struct APD_stock_data{ // in 199YMMDD.DATunsigned char data_id; // =0x73 with min_data,// =0x09 without min_data,// =0x20 is deletedunsigned char stock_type; // many be a,b,c,d or A,B,C,Dunsigned char stock_code[6]; // stock codeunsigned char stock_name[8]; // name of the stockunsigned 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 sharesunsigned long cur_price; // price of every minutesunsigned long total_volume; // summary volume by this minuteunsigned int average_percent; // swing percent of the average value};
struct APD_index_min{ // store data for indexunsigned long cur_price; // index of every minutesunsigned long total_volume; // summary volume by this minuteunsigned int average_percent; // swing percent of the average indexunsigned int buy_vigour; // the vigour value of buyingunsigned int sell_vigour; // the vigour value of selling};
// Develop data files by appdata structured upwards
struct Data_5min{ // in .nmn filesunsigned long min_off; // Format is MMDDHHMMunsigned long open_price; // 0.001unsigned long high_price; // 0.001unsigned long low_price; // 0.001unsigned long close_price; // 0.001unsigned long min_amount; // 100unsigned long min_volume; // 100unsigned long time_count; // sum trade timeunsigned char share_value; // share valueunsigned char share_number; // share break numberunsigned int share_bonus; // share bonusunsigned long shares_number; // sum number};
struct His_data{ // in lonhis.???unsigned long cur_price;unsigned long total_volume; // total volumeunsigned long total_value; // total value by this minuteunsigned long buy_volume; // initiactive total buy volumeunsigned long sell_volume; // initiactive total sell volumeunsigned int rise_num; // summary rise shares of this minuteunsigned int fall_num; // summary fall shares of this minuteunsigned int average_percent; // swing percent of the average indexunsigned int buy_vigour; // the vigour value of buyingunsigned int sell_vigour; // the vigour value of sellingunsigned int value_ADL; // the value of current ADL indexunsigned 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 stockunsigned char data_tag; // always be 0 to idunsigned 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 HXTWunsigned char stock_code[6];unsigned char reserved[20];unsigned long reserved2;};
// some dynamic data files structured upwards
struct Data_day{ // in .day filesunsigned long day_date; // Format is YYYYMMDDunsigned long open_price; // 0.001unsigned long high_price; // 0.001unsigned long low_price; // 0.001unsigned long close_price; // 0.001unsigned long day_amount; // 1000unsigned long day_volume; // 100unsigned long time_count; // sum trade timeunsigned char share_value; // share valueunsigned char share_number; // share break numberunsigned int share_bonus; // share bonusunsigned long shares_number; // sum number};
struct Slon_para{ // in file slonpara.datunsigned int sh_A_para; // Offset of SH_A stockunsigned 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 Slonunsigned long day_date; // Format is YYYYMMDDunsigned long open_price; // 0.001unsigned long close_price; // 0.001unsigned long high_price; // 0.001unsigned long low_price; // 0.001unsigned long day_amount; // 1000unsigned long day_volume; // 100unsigned int reserved[6]; // Some infomation I don't know};
struct Slon_HS{ // in lonhs.dat of Slonunsigned int data_tag1; // Some infomation I don't knowunsigned char stock_type; // =0xff is delete, =0x64 is OKunsigned long stock_code; // number of stock codeunsigned char stock_name[8]; // name of stockunsigned char data_tag2; // =0x0, Some infomation I don't knowunsigned int data_tag3; // =0x64, Some infomation I don't knowunsigned int last_close_price;unsigned int open_price;unsigned long PMA5_volume; // The volume of 5day averageunsigned int high_price;unsigned int low_price;unsigned int close_price;unsigned long data_tag4; // Some infomation I don't knowunsigned long total_volume1; // Total volumeunsigned long total_volume2; // Total volumeunsigned int buy_1_price; // The price of buying nowunsigned char buy_2_sub; // The offset of buy 1 and buy 2 priceunsigned char buy_3_sub; // The offset of buy 1 and buy 3 priceunsigned long buy_1_volume;unsigned long buy_2_volume;unsigned long buy_3_volume;unsigned int sell_1_price; // The price of selling nowunsigned char sell_2_add; // The offset of sell 1 and sell 2 priceunsigned char sell_3_add; // The offset of sell 1 and sell 3 priceunsigned 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 07unsigned 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];};