導航:首頁 > 源碼編譯 > 大智慧預測市盈率公式源碼

大智慧預測市盈率公式源碼

發布時間:2023-10-02 20:21:08

『壹』 大智慧L2 F10源碼

公式如下:(在此感謝MACD提供的朋友)[/color]

VARIABLE:TT[4]=STR,持股[4]=0,比例[4]=0,變化[4]=0;
F10:=IF(F10FIND(萬國測評製作,1)>0,1,0);
QSW:=F10FIND(◆ 控盤情況 ◆,100);
QSW1:=F10FIND(出]☆,1000)+120;
JSW1:=F10FIND(紅]☆,QSW1+300)-80;
{F10數據查找}
IF F10=1 AND QSW>0 AND QSW1>0AND JSW1>0THEN{萬國測評的資料是否完整,不完整就什麼都不做}
BEGIN
{控盤情況數據欄數據提取}
f10str:=f10text(QSW,320);
WZ1:=strfind(f10str,-,0)-5;
WZ2:=strfind(f10str,-,WZ1+10)-5;
WZ3:=strfind(f10str,-,WZ2+10)-5;
WZ4:=strfind(f10str,-,WZ3+10)-5;
WZ5:=320;{查找結束位}
{取時間}
T1:= strmid(f10str,WZ1,10);
T2:= strmid(f10str,WZ2,10);
T3:=strmid(f10str,WZ3,10);
T4:= strmid(f10str,WZ4,10);
{取股東戶數}
LS:=142;
HS1:=STRTONUM(strmid(f10str,WZ1+LS,10));
HS2:=IF(WZ2
HS3:=IF(WZ3
HS4:=IF(WZ4
{取戶均持股數}
LS:=205;
RS1:=STRTONUM(strmid(f10str,WZ1+LS,10));
RS2:=IF(WZ2100,STRTONUM(strmid(f10str,WZ2+LS,10)),0);
RS3:=IF(WZ3100,STRTONUM(strmid(f10str,WZ3+LS,10)),0);
RS4:=IF(WZ4100,STRTONUM(strmid(f10str,WZ4+LS,10)),0);

{大股東數據查找}
f10str:=f10text(QSW1,JSW1-QSW1);
HJW:=0;
{for 循環很慢無法忍受,換成下面的展開

FOR i=1 to 4 DO
BEGIN
SJT:=strfind(f10str,占流通股,HJW+15);
if SJT JSW1 THEN BREAK;
TT:=strmid(f10str,SJT-(44-21),10);
HJW:=strfind(f10str,總計,SJT+300);
持股:=strtonum(strmid(f10str,HJW+6,44-12));
比例:= strtonum(strmid(f10str,HJW+6+45-12,51-45));
ABC:=HJW+80-5+36;
HJW:=ABC;
END;
}
SJT:=strfind(f10str,占流通股,HJW+15);
TT[1]:=strmid(f10str,SJT-(44-21),10);{時間}
HJW:=strfind(f10str,總計,SJT+300);
持股[1]:=strtonum(strmid(f10str,HJW+6,44-12));
比例[1]:= strtonum(strmid(f10str,HJW+6+45-12,51-45));
ABC:=HJW+80-5+36;
HJW:=ABC;
SJT:=strfind(f10str,占流通股,HJW+15);
TT[2]:=strmid(f10str,SJT-(44-21),10);{時間}
HJW:=strfind(f10str,總計,SJT+300);
持股[2]:=strtonum(strmid(f10str,HJW+6,44-12));
比例[2]:= strtonum(strmid(f10str,HJW+6+45-12,51-45));
ABC:=HJW+80-5+36;
HJW:=ABC;
SJT:=strfind(f10str,占流通股,HJW+15);
TT[3]:=strmid(f10str,SJT-(44-21),10);{時間}
HJW:=strfind(f10str,總計,SJT+300);
持股[3]:=strtonum(strmid(f10str,HJW+6,44-12));
比例[3]:= strtonum(strmid(f10str,HJW+6+45-12,51-45));
ABC:=HJW+80-5+36;
HJW:=ABC;
SJT:=strfind(f10str,占流通股,HJW+15);
TT[4]:=strmid(f10str,SJT-(44-21),10);{時間}
HJW:=strfind(f10str,總計,SJT+300);
持股[4]:=strtonum(strmid(f10str,HJW+6,44-12));
比例[4]:= strtonum(strmid(f10str,HJW+6+45-12,51-45));
ABC:=HJW+80-5+36;
HJW:=ABC;
當期:=持股[1];
當期1:=比例[1];
上期:=持股[2];
上期1:=比例[2];
±比例:=當期1-上期1;
前二:=持股[3];
前二1:=比例[3];
前三:=持股[4];
前三1:=比例[4];
{將變化持股數對應顯示在對應位置}
{排序}
股東增幅:(HS1-HS2)/HS2*100,PRECIS2,linethick2,Color008987;
持股增幅:(RS1-RS2)/RS2*100,PRECIS2,linethick2,COLORRED;
主力增幅:(當期-上期)/上期*100,PRECIS2,LINETHICK2,ColorFA7D7D;
主力流通:(當期-上期1)/當期1*100,PRECIS2,LINETHICK2,ColorFFA935;
{-------------------【圖解模板】-------------------}
A2:=0;
A3:=1000;
AG:=INTPART((A3-A2)/10);
{顯示文字}
DRAWTEXTREL(0,AG*0,戶均持股),ColorFFC800;
DRAWTEXTREL(0,AG*2,股東戶數),ColorFA7D7D;
DRAWTEXTREL(0,AG*4,主力占流通%),ColorFA7D7D;
DRAWTEXTREL(0,AG*6,主力持股數(萬)),ColorFA7D7D;
DRAWTEXTREL(0,AG*8,報表時間),COLOR00DD00;

{戶均持股}
DRAWTEXTREL(AG*8,0,NUMTOSTR(RS1 )),ALIGN2,ColorFFC800;
DRAWTEXTREL(AG*6,0,NUMTOSTR(RS2 )),ALIGN2,ColorFFC800;
DRAWTEXTREL(AG*4,0,NUMTOSTR(RS3 )),ALIGN2,ColorFFC800;
DRAWTEXTREL(AG*2,0,NUMTOSTR(RS4 )),ALIGN2,ColorFFC800;

{股東戶數}
DRAWTEXTREL(AG*8,AG*2,NUMTOSTR(HS1)),ALIGN2,ColorFA7D7D;
DRAWTEXTREL(AG*6,AG*2,NUMTOSTR(HS2)),ALIGN2,ColorFA7D7D;
DRAWTEXTREL(AG*4,AG*2,NUMTOSTR(HS3)),ALIGN2,ColorFA7D7D;
DRAWTEXTREL(AG*2,AG*2,NUMTOSTR(HS4)),ALIGN2,ColorFA7D7D;
{主力占流通比}
DRAWTEXTREL(AG*8,AG*4,NUMTOSTR(當期1)),ALIGN2,COLORMAGENTA;
DRAWTEXTREL(AG*6,AG*4,NUMTOSTR(上期1)),ALIGN2,COLORMAGENTA;
DRAWTEXTREL(AG*4,AG*4,NUMTOSTR(前二1)),ALIGN2,COLORMAGENTA;
DRAWTEXTREL(AG*2,AG*4,NUMTOSTR(前三1)),ALIGN2,COLORMAGENTA;
{10大股東持股}
DRAWTEXTREL(AG*8,AG*6,NUMTOSTR(當期)),ALIGN2,COLORRED;
DRAWTEXTREL(AG*6,AG*6,NUMTOSTR(上期)),ALIGN2,COLORRED;
DRAWTEXTREL(AG*4,AG*6,NUMTOSTR(前二)),ALIGN2,COLORRED;
DRAWTEXTREL(AG*2,AG*6,NUMTOSTR(前三)),ALIGN2,COLORRED;
{時間}
DRAWTEXTREL(AG*8,AG*8,T1),ALIGN2,COLOR00DD00;
DRAWTEXTREL(AG*6,AG*8,T2),ALIGN2,COLOR00DD00;
DRAWTEXTREL(AG*4,AG*8,T3),ALIGN2,COLOR00DD00;
DRAWTEXTREL(AG*2,AG*8,T4),ALIGN2,COLOR00DD00;
{柱線}
{持股數柱線}
{STICKLINE(BARPOS=A3-AG*1-10 AND HS1>100,0,RS1,AG*3,1),LINETHICK2,ColorFFDDFF;
STICKLINE(BARPOS=A3-AG*2-15 AND HS2>100,0,RS2,AG*3,1),LINETHICK2,ColorF1FFB5;
STICKLINE(BARPOS=A3-AG*3-20 AND HS3>100,0,RS3,AG*3,1),LINETHICK2,ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*4-25 AND HS4>100,0,RS4,AG*3,1),LINETHICK2,ColorB9FFFF;}
{10大股東畫柱線}
{STICKLINE(BARPOS=A3-AG*1-6AND 當期>0,0,當期,AG*3,0),LINETHICK2,ColorFFDDFF;
STICKLINE(BARPOS=A3-AG*2-11 AND 上期>0,0,上期,AG*3,0),LINETHICK2,ColorF1FFB5;
STICKLINE(BARPOS=A3-AG*3-16 AND 前二>0,0,前二,AG*3,0),LINETHICK2,ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*4-21 AND 前三>0,0,前三,AG*3,0),LINETHICK2,ColorB9FFFF;}
END;下載萬國的F10解壓到D:\Program Files\dzh2\data\sz\BASE D:\Program Files\dzh2\data\sh\BASE

『貳』 求專業老師把這個大智慧分時主圖公式修改成通達信可以通過的分時主圖公式,下面是公式源碼和大效果圖

KJ2:ref(D,barslast(20130125<date+19000000)),COLORf00ff0,LINETHICK1,CIRCLEDOT; {日線級別強勢線,潛力股,站在此線上,為建倉信號}
KJ4:ref(Z,barslast(20130125<date+19000000)),COLORGREEN,LINETHICK1,CIRCLEDOT; {日線級別強弱分界線,在此線之上,可以一直持倉}
KJ5:ref(Y,barslast(20130125<date+19000000)),COLORYELLOW,LINETHICK1,CIRCLEDOT;{日線級別強壓力線,注意風險和趨勢的強弱}
KJ6:ref(K,barslast(20130125<date+19000000)),COLORWHITE,LINETHICK1,CIRCLEDOT; {日線級別空頭線,破此線,堅決清倉}

DRAWTEXT(DISPSTATUS=2,KJ2,'強勢線'+NUMTOSTRN(KJ2,2)+'元'),colorwhite,LINETHICK2;
DRAWTEXT(DISPSTATUS=2,KJ4,'強弱分界線'+NUMTOSTRN(KJ4,2)+'元'),colorwhite,LINETHICK2;
DRAWTEXT(DISPSTATUS=2,KJ5,'突破線'+NUMTOSTRN(KJ5,2)+'元'),colorwhite,LINETHICK2;
DRAWTEXT(DISPSTATUS=2,KJ6,'破位線'+NUMTOSTRN(KJ6,2)+'元'),colorwhite,LINETHICK2;
DRAWTEXTABS(0,10,'板塊:'+BKNAME ),linethick5;
DRAWTEXTABS(0,50,'流通盤:'+NUMTOSTRN( CAPITAL/1000000,2 )+'億股' ),linethick5,COLORF000F0;
DRAWTEXTABS(250,50,'流通市值:'+NUMTOSTRN( CAPITAL/1000000*close,2 )+'億元' ),linethick5,COLORF000F0;
DRAWTEXTABS(550,50,'市盈率:'+NUMTOSTRN( DYNAINFO(39),0)+'倍' ),linethick5,COLORF000F0;

『叄』 求高手編個指標公式;源碼好像是大智慧的,改成通達信的,滿意另加財富值定重謝

一樓的回答很完美,只能改到這個地步。有好多是收費軟體函數,改成免費的用不了。財務函數也沒必要加入

DRAWTEXT_FIX(ISLASTBAR,0.10,0,1,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.13,0,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.19,0,0,GNBLOCK),COLORYELLOW;
EMA13:EMA(C,13),COLORRED,POINTDOT,LINETHICK4;
EMA17:EMA(C,17),COLORGRAY;
EMA34:EMA(C,34),COLOR5E5E5E;
EMA156:EMA(C,156),COLORBLUE,POINTDOT,LINETHICK4;
DRAWTEXT(C-O>=0ANDO/L>1.05ANDL<=LLV(L,30),L,'★<-絕底'),COLORMAGENTA;
一日資金流入:=AMOUNT*LARGEINTRDVOL*10000;
MA1:=MA(一日資金流入,60);
一日資金流出:=-AMOUNT*LARGEOUTTRDVOL*10000;
凈額:=一日資金流入+一日資金流出;
流通盤:=CAPITAL;
流入增減:=一日資金流入/MA1;
買入:=流入增減>3AND凈額>200;
DRAWTEXT(買入,L*0.9,'買入');
DRAWICON(買入,L*0.95,1);
BDGD:=C=HHV(C,13);
GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),2))+1;
高點:=REF(C,GDSJ),COLORFF00FF,POINTDOT;
突破:=CROSS(C,REF(高點,1)),COLOR00FFFF,POINTDOT,LINETHICK4;
STICKLINE(GDSJ<=6,高點,高點,8,0),COLORFF00FF;
DRAWTEXT(突破,LOW,'↑'),COLOR00FFFF;
BDDD:=C=LLV(C,13);
DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1;
低點:=REF(C,DDSJ),COLOR00FF00,POINTDOT,LINETHICK4;
STICKLINE(DDSJ<=6,低點,低點,8,0),COLOR00FF00;


閱讀全文

與大智慧預測市盈率公式源碼相關的資料

熱點內容
程序員為世界帶來的貢獻 瀏覽:214
程序員招聘自薦信 瀏覽:693
魔獸鍵位設置命令宏 瀏覽:645
程序員沒有目標了 瀏覽:828
搶答器c程序編程 瀏覽:703
什麼app可以自己玩 瀏覽:76
刨客app是什麼 瀏覽:963
cad輸入命令欄不見了 瀏覽:834
做故事集可以用什麼app 瀏覽:692
qq郵箱發送壓縮包 瀏覽:672
程序員桌面機器人 瀏覽:589
xjr快速開發平台源碼 瀏覽:159
java介面runnable 瀏覽:31
python怎麼運行web伺服器 瀏覽:349
notepad編程代碼 瀏覽:740
什麼安卓的毛病最少 瀏覽:611
hp的pjl設備訪問命令 瀏覽:635
googlewebp圖片壓縮技術 瀏覽:215
tbc薩滿加血宏命令 瀏覽:757
pdf閃 瀏覽:289