欢迎来到天天文库
浏览记录
ID:1208847
大小:131.50 KB
页数:12页
时间:2017-11-08
《悟多公式dll部分源码》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、悟多公式DLL部分源码这个已经超出了证券软件自带编程函数外的东东如果这里有计算机软件编程专业的应该一看就懂但如果会计算机编程如果对缠师的文章理解不了或着说千人千缠用计算机编程语言去写也就不一定是原味了1处理kxian顶底的源代码23functionkxian(pData:pTagCALCINFO):integer;stdcall;export;4constquekou:single=0.005;5var6i,j,k,m,n:integer;7h,h1,h2,h3,h4,h5,h6,h7:single;8tj1,tj2,tj3,tj4:boolean;9begin1011if(@pData.m
2、_pfParam1<>nil)and(@pData.m_pfParam2<>nil)then12begin13adjustkline(pdata);//处理包含关系;14firstduan:=true;15prtype:=pdata^.m_dataType;1617caseprtypeof18MIN1_DATA://119biquekou:=quekou;20MIN5_DATA://521biquekou:=quekou*3;22MIN15_DATA://1523biquekou:=Quekou*6;24MIN30_DATA://3025biquekou:=quekou*9;26MIN60_
3、DATA://6027biquekou:=quekou*18;28DAY_DATA://day29biquekou:=quekou*30;30WEEK_DATA://周线31biquekou:=quekou*90;32MONTH_DATA:33biquekou:=quekou*250;34YEAR_DATA:35biquekou:=quekou*1000;36MULTIday_DATA:37biquekou:=quekou*500;38MULTmin_DATA:39biquekou:=quekou*20;1else2biquekou:=quekou*500;34end;5//标出顶和底6pr
4、[0].flag:=0;7pr[prnum-1].flag:=0;8fori:=1toprnum-2do9begin1011h:=pr.hprice;12j:=i-1;13h1:=pr[j].hprice;14while(h=h1)and(j>0)do//取前一个不同的高值15begin16j:=j-1;17h1:=pr[j].hprice;18end;19m:=j;20ifj>0thenj:=j-1;21h2:=pr[j].hprice;2223while(h1=h2)and(j>0)do//最前2个不同的值24begin25j:=j-1;26h2:=pr[j].hprice;27end;
5、28ifj>0thenj:=j-1;29h3:=pr[j].hprice;30while(h2=h3)and(j>0)do//取前3个不同的值31begin32j:=j-1;33h3:=pr[j].hprice;34end;353637k:=i+1;38h4:=pr[k].hprice;39while(h=h4)and(k6、)do//后2个不同高值4begin5k:=k+1;6h5:=pr[k].hprice;7end;8if(k=prnum)or(n+3>=prnum)thenbreak;1617tj1:=false;tj2:=false;18tj3:=false;tj4:=false;19if(h>=h1)and(h>=h2)and(h>=h3)and(h>=h7、4)20and(h>=h5)and(h>=h6)then//判断顶底21tj1:=true;2223ifm>=3thenh7:=pr[m-3].hpriceelseh7:=pr[0].hprice;2425if(h>=h1)and(h>=h2)and26(h>=h3)and(h>=h7)and27(h>=pr[n].hprice)and(h>=pr[n+1].hprice)and28(h>=pr[n+2].h
6、)do//后2个不同高值4begin5k:=k+1;6h5:=pr[k].hprice;7end;8if(k=prnum)or(n+3>=prnum)thenbreak;1617tj1:=false;tj2:=false;18tj3:=false;tj4:=false;19if(h>=h1)and(h>=h2)and(h>=h3)and(h>=h
7、4)20and(h>=h5)and(h>=h6)then//判断顶底21tj1:=true;2223ifm>=3thenh7:=pr[m-3].hpriceelseh7:=pr[0].hprice;2425if(h>=h1)and(h>=h2)and26(h>=h3)and(h>=h7)and27(h>=pr[n].hprice)and(h>=pr[n+1].hprice)and28(h>=pr[n+2].h
此文档下载收益归作者所有