公式源碼:
- M1:=5;
- M2:=0;
- M3:=20;
- M4:=60;
- M5:=0;
- 財務(wù)數(shù)據(jù):=1;
- BS:=1;
- MA1:MA(CLOSE,M1)COLORWHITE,LINETHICK1;
- MA2:MA(CLOSE,M2)COLORYELLOW,LINETHICK1;
- MA3:MA(CLOSE,M3)COLORMAGENTA,LINETHICK2;
- MA4:MA(CLOSE,M4)COLORGREEN,LINETHICK2;
- MA5:MA(CLOSE,M5)COLORCYAN,LINETHICK1;
- CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLORMAGENTA;
- 止贏:1.05*CC,COLOR8000FF;
- 止損:0.97*CC,COLOR00F000;
- V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
- V2:=(1-7/100)*(DMA(CLOSE,V1));
- V3:=(1+7/100)*(DMA(CLOSE,V1));
- V5:=MA((LOW+HIGH+CLOSE)/3,5);
- 支撐:REFDATE(V2,DATE),DOTLINE,LINETHICK1,COLORFF0080;
- 阻力:REFDATE(V3,DATE),DOTLINE,LINETHICK1,COLOR676767;
- AAA:=CONST(HHV(H*0.5,90));
- AA:=(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3;
- DRAWTEXT_FIX(CURRBARSCOUNT=1,0.8,0.05,1,'今日保護價'),LINETHICK2,COLOR00FFFF;
- DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.84,0.05,1,AA);
- DRAWTEXT_FIX(CURRBARSCOUNT=1,0.86,0.05,1,'元');
- PT:=REF(H,1)-REF(L,1);
- CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
- AH:=CDP+PT;
- AL:=CDP-PT;
- NH:=CDP*2-REF(L,1);
- NL:=CDP*2-REF(H,1);
- 強:IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
- 阻:IF(NH>強,(強-CDP)*0.618+CDP,NH)NODRAW,COLORBLUE;
- M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);
- 撐:IF(NL<M,CDP-(CDP-M)*0.618,NL)NODRAW;
- 底:IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW;
- 總股本:=STRCAT(STRCAT('總股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'億')*財務(wù)數(shù)據(jù);
- 流通盤:=STRCAT(STRCAT(' 流通盤: ',CON2STR(CAPITAL/1000000,2)),'億')*財務(wù)數(shù)據(jù);
- 全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2))*財務(wù)數(shù)據(jù);
- 市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'億')*財務(wù)數(shù)據(jù);
- 上市天數(shù):=STRCAT(' 上市天數(shù): ',CON2STR(FINANCE(42),0))*財務(wù)數(shù)據(jù);
- 股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(STRCAT(總股本,流通盤),全流通),市值),上市天數(shù)))*財務(wù)數(shù)據(jù);
- 市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2))*財務(wù)數(shù)據(jù);
- 市銷率:=STRCAT(' 市銷率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2))*財務(wù)數(shù)據(jù);
- 市凈率:=STRCAT(' 市凈率: ',CON2STR(C/FINANCE(34),2))*財務(wù)數(shù)據(jù);
- 凈資收益率:=STRCAT(' 凈資收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2))*財務(wù)數(shù)據(jù);
- 毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2))*財務(wù)數(shù)據(jù);
- 凈利潤率:=STRCAT(' 凈利潤率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2))*財務(wù)數(shù)據(jù);
- 主營利潤率:=STRCAT(' 主營利潤率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2))*財務(wù)數(shù)據(jù);
- 當(dāng)前業(yè)績:=STRCAT('當(dāng)前業(yè)績: ',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市銷率),市凈率),凈資收益率),毛利率),凈利潤率),主營利潤率))*財務(wù)數(shù)據(jù);
- X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
- X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;
- X3:=FINANCE(23)/FINANCE(10)*3.3;
- X4:=FINANCE(19)/FINANCE(15)*0.6;
- X5:=FINANCE(20)/FINANCE(15)*0.999;
- Z值:=X1+X2+X3+X4+X5;
- 預(yù)警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'輕警','無警'))*財務(wù)數(shù)據(jù);
- 財務(wù)預(yù)警:=STRCAT('財務(wù)預(yù)警: ',STRCAT(預(yù)警,STRCAT('-Z值: ',CON2STR(Z值,3))))*財務(wù)數(shù)據(jù);
- 優(yōu)質(zhì)資產(chǎn)率:=STRCAT(' 優(yōu)質(zhì)資產(chǎn)率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2))*財務(wù)數(shù)據(jù);
- 現(xiàn)金負(fù)債比:=STRCAT(' 現(xiàn)金負(fù)債比: ',CON2STR(FINANCE(25)/FINANCE(15),3))*財務(wù)數(shù)據(jù);
- 財務(wù)系數(shù):=STRCAT('風(fēng)險系數(shù): ',STRCAT(STRCAT(財務(wù)預(yù)警,優(yōu)質(zhì)資產(chǎn)率),現(xiàn)金負(fù)債比))*財務(wù)數(shù)據(jù);
- DRAWTEXT_FIX(ISLASTBAR,0.00,0.12,0,股本市值),COLORGREEN;
- DRAWTEXT_FIX(ISLASTBAR,0.00,0.18,0,當(dāng)前業(yè)績),COLORGREEN;
- DRAWTEXT_FIX(ISLASTBAR,0.00,0.24,0,財務(wù)系數(shù)),COLORGREEN;
- DRAWTEXT_FIX(1,0.00,0,0,'所屬地區(qū):')COLOR00FFFF;
- DRAWTEXT_FIX(1,0.07,0,0,DYBLOCK)COLOR00FFFF;
- DRAWTEXT_FIX(1,0.00,0.06,0,'所屬行業(yè):')COLORFF00FF;
- DRAWTEXT_FIX(1,0.07,0.06,0,HYBLOCK)COLORFF00FF;
- 今日保護價:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299,NODRAW;
- 頂點:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;
- 低點:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;
- DRAWTEXT(ISLASTBAR,頂點,'頂點'),COLORRED;
- DRAWTEXT(ISLASTBAR,低點,'低點'),COLORMAGENTA;
- MA7:=MA(CLOSE,BS);
- 轉(zhuǎn)強:=(6*H+5*REF(H,1)+4*REF(H,2)+3*REF(H,3)+2*REF(H,4)+1*REF(H,5))/(6+5+4+3+2+1);
- 轉(zhuǎn)弱:=(6*L+5*REF(L,1)+4*REF(L,2)+3*REF(L,3)+2*REF(L,4)+1*REF(L,5))/(6+5+4+3+2+1);
- BB2:=IF(C>REF(轉(zhuǎn)強,1),1,IF(C<REF(轉(zhuǎn)弱,1),-1,0));
- DD2:=BARSLAST(NOT(BB2=0));
- B:=IF(BB2=0,REF(BB2,DD2),BB2);
- 中短:=IF(B=-1,MA(HIGH,6),MA(LOW,6));
- STICKLINE(MA7<中短,LOW,HIGH,0,1),COLORCYAN;
- STICKLINE(MA7>中短,LOW,HIGH,0,1),COLORRED;
- STICKLINE(((OPEN>CLOSE)AND(MA7<中短)),(CLOSE-0.003),OPEN,3.1,0),COLORLIBLUE;
- STICKLINE(((OPEN<CLOSE)AND(MA7<中短)),CLOSE,OPEN,3.1,1),COLORCYAN;
- STICKLINE(((OPEN>CLOSE)AND(MA7>中短)),OPEN,(CLOSE-0.003),3.1,0),COLORRED;
- STICKLINE(((OPEN<CLOSE)AND(MA7>中短)),OPEN,CLOSE,3.1,1),COLORRED;
- B點:CROSS(MA7,中短),COLORRED,NODRAW;
- 持股:MA7>中短,COLORRED,NODRAW;
- DRAWICON(CROSS(MA7,中短),L,7);
- DRAWICON(CROSS(中短,MA7),H,8);
- 超B:=L2_AMO(0,2)/10000.0;
- 大B:=L2_AMO(1,2)/10000.0;
- 中B:=L2_AMO(2,2)/10000.0;
- 小B:=L2_AMO(3,2)/10000.0;
- 超S:=L2_AMO(0,3)/10000.0;
- 大S:=L2_AMO(1,3)/10000.0;
- 中S:=L2_AMO(2,3)/10000.0;
- 小S:=L2_AMO(3,3)/10000.0;
- TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
- 大宗進:=(超B)+(大B),NODRAW;
- 大宗出:=(超S)+(大S),NODRAW;
- 非大宗進:=(中B)+(小B),NODRAW;
- 非大宗出:=(中S)+(小S),NODRAW;
- DAZHIV:=CONST(MAX(ABS(大宗進),MAX(ABS(大宗出),MAX(ABS(非大宗進),ABS(非大宗出))))),NODRAW;
- DRAWRECTREL(0,CONST(950-(ABS(大宗進)*250/DAZHIV))-20,30,950,IF(CONST(大宗進>0),RGB(255,0,0),RGB(23,125,255)));
- DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));
- DRAWRECTREL(92,CONST(950-(ABS(非大宗進)*250/DAZHIV))-20,122,950,IF(CONST(非大宗進>0),RGB(255,0,0),RGB(23,125,255)));
- DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));
- DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力進出'),COLORMAGENTA;
- DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散戶進出'),COLORCYAN;
- DRAWTEXT_FIX(C>O,0.85,0.001,0,'明陽程序化CXH110.COM'),COLORFF7F00;
轉(zhuǎn)載請注明原文鏈接:【通達信】波段決策主圖指標(biāo)公式