- 金币:
-
- 奖励:
-
- 热心:
-
- 注册时间:
- 2004-11-1
|
|
楼主 |
发表于 2005-4-10 22:46
|
显示全部楼层
希望大家能各有所得,有所悟更好:)
我是觉得自己渺小的不得了:(
继续转
To :新股友。
股票:对交易者来说,股票是低价买入、高价卖出以搏取市场波动差价的筹码;对市场来说股票是买方卖方拍卖时的一种标的。国际、国家政治形势、经济状况、上市公司业绩等等都会影响它的“价值”,但根本还是由它的内在规律来决定的。所以要关注外在因素造成影响,但根本上的问题是你必须去研究股市的运行规律。
经验:“初学三年,天下无敌;再学三年,寸步难行”。也就是说入行三年是一个人最嚣张的时候,到了这个时候,往往让人不知天高地厚,写书的写书、带学员的带学员、收会费的收会费。恕不知到此时人往往已经走到了一个极限位。你大概是已经意识到了这点,所以先行“困惑”了。这是我全力支持你的主要原因。
方方面面:股市是一个系统工程,它有它方方面面的特征,有社会的、财务的、技术的、人文的。所以在股市里研究基本面者有之,研究财务指标者有之,研究技术面者有之,研究消息面者有之。而且不同角度的研究者、参与者都能从自己的角度出发对股市发生的事作出一定程度的解释,对股市运行作出适当的应对,在股市得到适当的回报。可是如果你要作为一个职业股民,单单依赖对那一个或其中几个方面的研究、理解往往会是局部的、片面的、不求甚解的,甚至会让人百密一巯、挂一漏万。
基本面:大家都说中国大陆是政策市,也就是说基本面很重要。那么你看,去年下半年,如果沪指不是从2300跌到1300,而是从2300涨到3300甚或4300,那么可爱的股评家们也可以在基本面上分析得头头是道,什么申奥成功啦,什么加入WTO啦、什么APCE会啦,嘿嘿,结果呢是从2300跌到了1300,大家也一如既往的说呀、写呀,解释得头头是道。
财务面:上市公司的财务指标算是跟其股票联系较密切的了。我们暂且不去理会数据的真实性。单就上年的业绩是一个固定的数字,而股价却可以在这一年中涨升一倍也可能又跌去一半这一点来说,也不可以单单依据财务指标来分析股票。
纵观所有的“面”,比较起来,我兼重于技术分析。
技术分析:
规律和原因: 建议你重点研究股市运动的规律,不要去研究股市运动的原因。按照科学思路一般的原则是:感觉(经验)解决不了的问题用科学技术来解决,科学技术解决不了的问题用哲学来解决,哲学解决不了的问题用宗教来解决。在股市,这最后一步我们就不要走了,如果执意去研究原因就会象牛顿、江恩晚年一样,陷于宗教的、“神”的迷圈。
研究股市运动的规律,掌握股市目前处于什么状态(是要开涨了、开跌了,是涨升中、是下跌中,是涨得差不多了、跌得差不多了等等),从而决定自己的立场和操作取向(是买入、卖出,还是执股、观望)。
对数据的分析,要循序渐进,开始可以从常规的笔算、计算器算。而后可以试着用EXECL等软件去分析,然后再用SAS、SPSS等统计软件去分析。最后你再自己建立模型去分析。这些过程原则上都不要省,都要认真去做。因为你会发觉自己对市场的理解会随着自己分析手段的每一次升级而逐渐深入、透彻。自编软件时关于数据库建议用Delphi,分析软件建议用C++。
要重点掌握一门分析方法。常规的KDJ、RSI等指标是对市场的具体描述,波浪理论是对市的哲学思考,四度空间是对市场禅的顿悟。江恩理论适合在一波级别不变的行情中计算上涨、下跌、回调的时间、价位。
心态:
粗粗分类,可以把股民分成两大类,一类是拿钱买刺激,一类是用寂寞来赚钱。股市有中长级趋势,也有日间波动。日间波动,呈现在股民面前,就是许多让人心动让人觉得可以大把赚钱的“机会”,这些机会是美丽动人的、绚丽多彩的,所以许多股民对短线操作乐此不疲。书店里、论坛中那些介绍短线、盘口操作的东东大受欢迎,这就是其中一个原因。当然最后结果是大多数股民在得到这些“机会”的同时付出的是自己的钱已经被转换成“机会成本”了。只有好好把握好中长期趋势,才能美美的赚一把,但这要付出的首选就是“失去、放弃”许多小机会,要放弃这许多小机会,你就要承受别人所不会、不愿承受的压力、孤独和寂寞。
从众:从众可以让人节省精力,可以让自己变得很轻松。不从众会让人导致对立的情绪,让人不好确立参照的准则。股市是个极少数人赚钱的地方,所以从众往往是失败的原因之一。所以你必须充满自然活力,学会从拒绝周围环境、拒绝他人的认同中获得强烈快感。
因为看到你对股市如履薄冰的态度是那么到位,或者说你已经具有一个股民所需要的心态素质。如果你也象有些网友那样在论坛上一个劲的喊什么自己又赚了多少,又测准了几回,又抓住了几只黑马,甚或说自己是什么中国第几,那我就会劝你离开股市。
虽然股市没有象上述网友那么样好玩于掌股之间,但也没有你想象的那么恐怖。进一步证实你进入迷茫的“寸步难行”的阶段,恭喜你,走过这一步也就阳光灿烂了。
你在股市是小学生,我在社会也是小学生。我还没来得及上大学呢。我一生下来就很忙,一生下来就跟着毛主席闹革命,后来跟邓爷爷老鼠,现在你知道的-玩泡沫。所以我好羡慕你都能学大学老师。
致使做到了,当然不一定就成功,成功需要受到太多太多因素、条件制约。但要做一个职业股民,那些是起码(!)要做到事情。
你说中国有6千万股民,能做到又有几个。要记住:80%以上的股民是来亏钱的。正所谓“一将功成百骨枯”。这就是我常说的“做股票是很痛苦的”的缘由。
好多人在市场只是一只无头苍蝇,整天打听利好利空,买了股票也不敢拿,拿了钱又怕空仓,亏了钱也不知道问题出在哪。更就无从去检讨自己,只要骂政府、骂股评、骂市场的份。
专业+专家,他不是职业股民。他们在市场是文人,职业股民在市场是武士;他们在市场是赚工资、是卖水的,职业股民在市场靠自己去市场抢钱、是淘金的;他们只是在干一份工作(work),而职业股民却是干一份无薪水的*;他们追求多对,职业股民追求的是少错。
我原文中本来有这段的,只是考虑圈子里大家都是朋友,不说也罢,现在还是让你给逼出来了,说了就说了,我也没什么恶意,是吗。
要将商品行情软件的数据导入自己的数据库,除了要知道商品软件数据的数据结构,同时还与你自己数据库的数据结构有关。一般情况下,业余爱好者往往都是使用ASCII即text文本结构。text格式的数据易读易懂,可以让许多国际股票软件和工具软件(比如:GET\TT\SUPERCHART\SSPS\EXECL等等)直接调用。
如果你考虑用text格式,有以下几种方法:一、比如《飞狐》,它可以直接为你输出text数据,而且在输出前你还可以按自己要求设置其数据间格式。二、运用其他网友编好的现成的数据转换软件予以转换,比如fxjtotext、ctext等,这些小软件网上都能找到。三、自己动手,麻烦是麻烦点,但可以给自己更大的灵活的空间,比如说搞个自己格式的数据。
自己动手,就要知道商品软件的数据格式,我这里给你几个常见的软件的数据格式,希望对你有点用处。当然这些数据的转换原则上是适用于盘后静态,要是动态,那就复杂多了,我只跟给你给出钱龙的,供参考。
钱龙3.0版数据存储格式
上海日线存储路径为:\ml30\data\shase\day,文件扩展名为:.day
上海周线存储路径为:\ml30\data\shase\week,文件扩展名为: .wek
上海月线存储路径为:\ml30\data\shase\month,文件扩展名为: .mnt
深圳日线存储路径为:\ml30\data\sznse\day
深圳周线存储路径为:\ml30\data\sznse\week
深圳月线存储路径为:\ml30\data\sznse\month
以深发展日线为例:
1A76:0100 D6 CD 2F 01 52 07 01 00-52 07 01 00 52 07 01 00
1A76:0110 52 07 01 00 86 0F 00 00-4D 02 00 00 00 00 00 00
1A76:0120 00 00 00 00 00 00 00 00-D7 CD 2F 01 60 03 01 00
1A76:0130 60 03 01 00 60 03 01 00-60 03 01 00 82 05 00 00
1A76:0140 D4 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
每一条记录的长度为40字节:
1-4字节为日期,D6 CD 2F 01转换为十进制是:19910102
5-8字节为开盘价*1000
9-12字节为最高价*1000
13-16字节为最低价*1000
17-20字节为收盘价*1000
21-24字节为成交量(手)
25-28字节为成交金额
其余12字节未使用
另:周线,月线格式与日线格式一致.
下面是我用C语言编的一个显示深发展日线的小程序,运行时要将0001.day拷到当前目录.
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
typedef struct {
unsigned long date;
unsigned long open;
unsigned long high;
unsigned long low;
unsigned long close;
unsigned long travl;
unsigned long traca;
char unuse[12];
} RECORD;
RECORD reco;
int readrec(FILE *);
void main()
{
FILE *fp;
if((fp = fopen("0001.day","rb")) == NULL) // 打开深发展日线
{ printf("Error: Can^t open 0001.DAY !\n");
exit(0); }
readrec(fp);
fclose(fp);
if(getch()==0) getch();
exit(0);
}
int readrec(FILE *fp)
{
float fn;
while (! feof(fp)) {
fread(&reco,sizeof(RECORD),1,fp);
printf("%10lu ",reco.date);
fn=float(reco.open)/1000;
printf("%8.2f ",fn);
fn=float(reco.high)/1000;
printf("%8.2f ",fn);
fn=float(reco.low)/1000;
printf("%8.2f ",fn);
fn=float(reco.close)/1000;
printf("%8.2f ",fn);
printf("%8lu ",reco.travl);
printf("%8lu\n",reco.traca);
}
printf("\n");
return 0;
}
分析家3.1x版数据存储格式
上海日线存储文件为:\superstk\data\sh\day.dat
深圳日线存储文件为:\superstk\data\sz\day.dat
以上海日线存储文件day.dat为例:
00000h: F4 9B 13 FC 10 02 00 00-00 00 00 00 D1 04 00 00
00000h: 81 0C 00 00 48 0C 00 00-31 41 30 30 30 31 00 FF
00020h: FF FF B0 09 00 00 16 00-17 00 18 00 19 00 1A 00
00030h: 1B 00 1C 00 1D 00 1E 00-07 0A FF FF FF FF FF FF
00040h: FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF
00050h: FF FF FF FF FF FF FF FF
......
......
41000h: 80 47 B2 2B B9 1E 25 41-CD CC 4C 41 EC 51 18 41
41010h: 9A 99 41 41 80 06 B2 47-40 1C BC 4C 00 00 00 00
41020h: 00 3C B6 2B 34 33 3F 41-AF 47 49 41 01 00 30 41
41030h: 34 33 3B 41 00 07 12 47-A4 3C 26 4C 00 00 00 00
该文件格式与磁盘文件物理存储方式类似:
起止地址 数据内容 数据含义 数据类型
00 - 03 F4 9B 13 FC 日线文件标志 Integer
04 - 07 10 02 00 00 保留 Integer
08 - 0B 00 00 00 00 保留 Integer
0C - 0F D1 04 00 00 证券总数 Integer
10 - 13 81 0C 00 00 需添加之起始块号 Integer
14 - 17 48 0C 00 00 当前最后空块号 Integer
18 - 21 31 41 30 30 30...FF 证券代码 Char[10]
22 - 25 B0 09 00 00 日线记录数 Integer
26 - 57 16 00 17 00...FF FF 记录块号 Word[25]
......
41000 - 41003 80 47 B2 2B 日期 Integer
41004 - 41007 B9 1E 25 41 开盘价 Single
41008 - 4100B CD CC 4C 41 最高价 Single
4100C - 4100F EC 51 18 41 最低价 Single
41010 - 41013 9A 99 41 41 收盘价 Single
41014 - 41017 80 06 B2 47 成交量 Single
41018 - 4101B 40 1C BC 4C 成交金额 Single
4101C - 4101D 00 00 上涨家数 Word
4101E - 4101F 00 00 下跌家数 Word
注:
1)起止地址、数据内容为十六进制,数据类型为 Delphi 下之定义。
2)从18h开始至40017h每64byte为一条股票数据分配记录,含义如上表18h - 57h所示;
3)从41000h开始每8KB为一股票数据存储块,每个股票数据存储块共存储256条日线记录,每一条记录的长度为32 byte(含义如上表;上涨家数及下跌家数只对指数有效);
4)从41000h开始的8KB为第0号数据存储块,以后类推;
5)系统对每个股票日线数据存储以存储块为单位进行分配。
6)具体应用实例分析家数据管理程序。
7) 日期字段的意义为:实际日期 = StrToDate(^1970-01-01^)+(日期字段 div 86400);即“日期字段”除以86400所得数为实际日期距1970年01月01日的天数。
胜龙的数据格式
上海日线存储路径为:\slon\data\sh\day,文件扩展名为:.day
上海周线存储路径为:\slon\data\sh\week,文件扩展名为: .wek
上海月线存储路径为:\slon\data\sh\month,文件扩展名为: .mnt
深圳日线存储路径为:\slon\data\sz\day
深圳周线存储路径为:\slon\data\sz\week
深圳月线存储路径为:\slon\data\sz\month
以深发展日线为例:
0F74:0100 29 32 D0 FE AD F8 FE FF-AD F8 FE FF AD F8 FE FF
0F74:0110 AD F8 FE FF 77 F0 FF FF-B2 FD FF FF FF FF FF FF
0F74:0120 FE FF FF FF 94 E3 FB FF-28 32 D0 FE 9F FC FE FF
0F74:0130 9F FC FE FF 9F FC FE FF-9F FC FE FF 7D FA FF FF
0F74:0140 2B FF FF FF FF FF FF FF-FE FF FF FF 94 E3 FB FF
每一条记录的长度为40字节:
1-4字节为日期(如19910102)转换为整数的反码
5-8字节为开盘价*1000 的反码
9-12字节为最高价*1000 的反码
13-16字节为最低价*1000 的反码
17-20字节为收盘价*1000 的反码
21-24字节为成交量(手) 的反码
25-28字节为成交金额(万元)的反码
29-36字节未使用
37-40字节为除权价*1000 的反码
另:周线,月线格式与日线格式一致.
下面是我用C语言编的一个显示深发展日线的小程序,运行时要将
0001.day拷到当前目录.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
typedef struct
{
unsigned long date;
unsigned long open;
unsigned long low;
unsigned long high;
unsigned long close;
unsigned long travl;
unsigned long traca;
char unuse[12];
} RECORD;
RECORD reco;
int readrec(FILE *);
void main()
{
FILE *fp;
if((fp = fopen("0001.day","rb")) == NULL)
{
printf("Error: Can^t open 0001.DAY !\n");
exit(0);
}
readrec(fp);
fclose(fp);
if(getch()==0) getch();
exit(0);
}
int readrec(FILE *fp)
{
float fn;
while (! feof(fp))
{
fread(&reco,sizeof(RECORD),1,fp);
printf("%10lu ",~reco.date);
fn=float(~reco.open)/1000;
printf("%8.2f ",fn);
fn=float(~reco.low)/1000;
printf("%8.2f ",fn);
fn=float(~reco.high)/1000;
printf("%8.2f ",fn);
fn=float(~reco.close)/1000;
printf("%8.2f ",fn);
printf("%8lu ",~reco.travl);
printf("%8lu\n",~reco.traca);
if(kbhit()) break;
}
printf("\n");
return 0;
}
上海日线存储路径为:\hjin\exe\lineday\sh,文件扩展名为:.psd
上海周线存储路径为:\hjin\exe\lineweek\sh,文件扩展名为: .psw
上海月线存储路径为:\hjin\exe\linemon\sh,文件扩展名为: .psm
深圳日线存储路径为:\hjin\exe\lineday\sz
深圳周线存储路径为:\hjin\exe\lineweek\sz
深圳月线存储路径为:\hjin\exe\linemon\sz
以深发展日线为例:
1A76:0100 D6 CD 2F 01 EC D1 86 42-EC D1 86 42 EC D1 86 42
1A76:0110 EC D1 86 42 7B F9 86 42-14 E6 00 00 20 D7 CD 2F
1A76:0120 01 CD CC 84 42 CD CC 84-42 CD CC 84 42 CD CC 84
1A76:0130 42 D5 04 85 42 D0 52 00-00 20 D8 CD 2F 01 54 23
1A76:0140 84 42 54 23 84 42 54 23-84 42 54 23 84 42 9E E7
1A76:0150 83 42 A0 41 00 00 20
每一条记录的长度为29字节:
1-4字节为日期,D6 CD 2F 01转换为十进制是:19910102
5-8字节为开盘价
9-12字节为最高价
13-16字节为最低价
17-20字节为收盘价
21-24字节为均价
25-28字节为成交量(股)
其余1字节未使用
另:周线,月线格式与日线格式一致.
下面是我用C语言编的一个显示深发展日线的小程序,运行时要将
sz0001.psd拷到当前目录.
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
typedef struct {
unsigned long date; //日期
float open; //开盘价
float high; //最高价
float low; //最低价
float close; //收盘价
float cavl; //均价
unsigned long travl; //成交量
char unuse;
} RECORD;
RECORD reco;
int readrec(FILE *);
void main()
{
FILE *fp;
if((fp = fopen("sz0001.psd","rb")) == NULL) // 打开深发展日线
{ printf("Error: Can^t open SZ0001.PSD !\n");
exit(0); }
readrec(fp);
fclose(fp);
if(getch()==0) getch();
exit(0);
}
int readrec(FILE *fp)
{
while (! feof(fp)) {
fread(&reco,sizeof(RECORD),1,fp);
printf("%10lu ",reco.date);
printf("%8.2f ",reco.open);
printf("%8.2f ",reco.high);
printf("%8.2f ",reco.low);
printf("%8.2f ",reco.close);
printf("%8.2f ",reco.cavl);
printf("%8lu\n",reco.travl);
}
printf("\n");
return 0;
}
海融动态“闪电版”日线数据格式
上海日线存储路径为:\hrdyn\shday,文件扩展名为:.day
深圳日线存储路径为:\hrdyn\szday,文件扩展名为:.day
以深发展日线(0001.day)为例:
0000h: F8 30 31 01 CD CC 88 41-AE 47 89 41 00 00 86 41
0010h: 71 3D 86 41 24 02 20 00-62 26 87 41 00 00 00 00
0020h: 00 00 00 00 00 00 00 00-F9 30 31 01 66 66 86 41
0030h: CB A1 88 41 14 AE 85 41-A4 70 87 41 9C C5 11 00
0040h: AA C3 86 41 00 00 00 00-00 00 00 00 00 00 00 00
起止地址 数据内容 数据含义 数据类型
0000 - 0003 F8 30 31 01 日 期 Integer
0004 - 0007 CD CC 88 41 开盘价 Single
0008 - 000B AE 47 89 41 最高价 Single
000C - 000F 00 00 86 41 最低价 Single
0010 - 0013 71 3D 86 41 收盘价 Single
0014 - 0017 24 02 20 00 成交量 Integer
0018 - 001B 62 26 87 41 均 价 Single
001C - 001F 00 00 00 00 前收盘 Single
0020 - 0021 00 00 竞 Word
0022 - 0023 00 00 量
Word
0024 - 0027 00 00 00 00 成交笔数 Integer
注:
1)起止地址、数据内容为十六进制,数据类型为 Delphi 下之定义。
2)从0028h开始每40byte为一条股票数据记录,含义如上表0000h - 0027h所示;
投资家数据数据结构
投资家日线文件数据结构
每28个字节为一日。
Date:LongInt; //日期(距1970.01.01的秒数)
OPen:LongInt; //开盘(元)
Close:LongInt; //收盘(元)
High:LongInt; //最高价(元)
Low:LongInt; //最低价(元)
Volume:LongInt; //成交量(股)
Money:LongInt; //成交额(元)
日期,x/86400取余后如果余数大于等于57600则加1(取整方法为如果大于16:00收盘时间则加1,否则不加1,视为昨天。)即为1970-01-01到当前的天数。分析家则不用这样都是整数。 开盘价(算法同分析家) 收盘价(算法同分析家) 最高价(算法同分析家)
最低价(算法同分析家) 成交量(股)(算法同分析家) 成交额(元)(算法同分析家)从钱龙转过来正确,但自动接收好像不对为0
天亿日线文件数据结构
沪市日线文件路径:默认在\DATA\SHASE\DAY下。
深市日线文件路径:默认在\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; //没用
天网数据数据结构
天网日线文件数据结构
沪市日线文件路径:默认在YYY\DATA\SHASE\DAY下。
深市日线文件路径:默认在YYY\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; //没用
慧眼日线文件数据结构
日线文件路径:默认在\Stkdt下。
日线文件命名规则:股票代码.DAT
每个日K线为28字节,具体如下:
Date:LongInt; //日期
OPen:LongInt; //开盘(元/100)
High:LongInt; //最高价(元/100)
Low:LongInt; //最低价(元/100)
Close:LongInt; //收盘(元/100)
App:LongInt; //涨跌(收盘价之差)
Volume:LongInt; //成交量(手)
慧眼代码表文件数据结构
慧眼98静态版的lstf.dat的数据结构(本文件是列表与日线无关)
以4位整型为单位。
第四个为日期。前100个字节为头信息。好像不能动。每个股票为60字节
为代码(ha600001) 为名称
开(分) 高(分) 低(分) 收(分)
涨跌(分) 成交量(手) ?00 00 10 16(0) ?0
?0 ?0 ?0 ----------
一个长整型的各位的含义
即与00 00 11 13异或的结果
显示值 (1-H)2^28 (1-L)2^24 (2-H)2^20 (2-L)2^16 (3-H)2^12 (3-L)2^8 (4-H)2^4 (4-L)2^0
0 268435456 16777216 1048567 65536 1*4096 1*256 1*16 3
1 1 1 1 1 0 0 0 2
2 2 2 2 2 3 3 3 1
3 3 3 3 3 2 2 2 0
4 4 4 4 4 5 5 5 7
5 5 5 5 5 4 4 4 6
6 6 6 6 6 7 7 7 5
7 7 7 7 7 6 6 6 4
8 8 8 8 8 9 9 9 11
9 9 9 9 9 8 8 8 10
a a a a a 11 11 11 9
b b b b b 10 10 10 8
c c c c c 13 13 13 15
d d d d d 12 12 12 14
e e e e e 15 15 15 13
f f f f f 14 14 14 12
如果涨跌幅是负的话,则用FF FF FF FF 减去用上面算法算出的数再减1
显示的成交量可以与内建的流通量一起由慧眼算换手率。
恒生数据数据结构
(一)恒生日线文件数据结构
沪市日线文件路径:默认在HSNEW\DATA\SHASE\DAY下。
深市日线文件路径:默认在HSNEW\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.SZN
First0: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 0x23
struct 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 upwards
struct 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 upwards
struct 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];
};
/* SLON data structure from MR.ZHAO BIAO
Lonhs.dat结构分析(QB)
位置 长度 类型 说明
1 2 INTEGER ******************
2 1 STRING 标志,FF->delete 64->ok
3 4 LONG 股票代码
4 8 STRING 股票名称
5 1 STRING 00-> ? *****************
6 2 INTEGER 64-> ? *****************
7 2 INTEGER 前收盘价
8 2 INTEGER 开盘价
9 4 LONG 五日均量
10 2 INTEGER 最高价
11 2 INTEGER 最低价
12 2 INTEGER 收盘价
|
|
|