有哪位高手能夠幫忙将通達信纏論中樞公式改成KT交易師公式,謝謝了!
MA1:MA(CLOSE,M1),COLORWHITE;
MA2:MA(CLOSE,M2),COLORYELLOW;
MA3:MA(CLOSE,M3),COLORMAGENTA;
MA4:MA(CLOSE,M4),COLORGREEN;
頂底分型:=1;
MACHINETIME1:=IF(MACHINETIME>0,MACHINETIME,TDXDLL5(92,H,L,C)*10000);
DRAWTEXT_FIX((MACHINETIME1<=090000OR MACHINETIME1>=150000) AND 闆塊顯示>=1 AND ISLASTBAR,0,0.05,0,STRCAT(DYBLOCK,STRCAT(EXTERNSTR(0,88),STRCAT(IF(FGBLOCK!=DRAW,FGBLOCK,DRAWNULL),DRAWNULL)))),COLORFF00FF;
DRAWTEXT_FIX((MACHINETIME1<=090000OR MACHINETIME1>=150000) AND 闆塊顯示>=1 AND ISLASTBAR,0,0.1,0,IF(FGBLOCK!=DRAWNULL,GNBLOCK,DRAWNULL)),COLORFF00FF;
DRAWTEXT_FIX((MACHINETIME1>090000AND MACHINETIME1<150000) AND 闆塊顯示>=1 AND ISLASTBAR,0,0.0,0,STRCAT(DYBLOCK,STRCAT(EXTERNSTR(0,88),STRCAT(IF(FGBLOCK!=DRAWNULL,FGBLOCK,DRAWNULL),DRAWNULL)))),COLORFF00FF;
DRAWTEXT_FIX((MACHINETIME1>090000AND MACHINETIME1<150000) AND 闆塊顯示>=1 AND ISLASTBAR,0,0.05,0,IF(FGBLOCK!=DRAWNULL,GNBLOCK,DRAWNULL)),COLORFF00FF;
{股本市值}
總股本:=STRCAT(STRCAT('總股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'億');
流通盤:=STRCAT(STRCAT(' 流通盤: ',CON2STR(CAPITAL/1000000,2)),'億');
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'億');
{}
每股公積金:=STRCAT(' 每股公積金:',CON2STR(FINANCE(18),2));
每股未分利潤:=STRCAT(' 每股未分利潤:',CON2STR(FINANCE(32),2));
每股淨資産:=STRCAT(' 每股淨資産:',CON2STR(FINANCE(34),2));
市盈率:=STRCAT(' 市盈率: ',CON2STR(DYNAINFO(39),2));
市淨率:=STRCAT(' 市淨率: ',CON2STR(C/FINANCE(34),2));
每股收益:=STRCAT(' 每股收益: ',CON2STR(FINANCE(38),2));
每股現金流:=STRCAT(' 每股現金流: ',CON2STR(FINANCE(25)/FINANCE(1),2));
利潤同比:=STRCAT(' 利潤同比: ',CON2STR(FINANCE(43),2));
收入同比:=STRCAT(' 收入同比: ',CON2STR(FINANCE(44),2));
顯示内容:=STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(總股本,流通盤),市值),每股公積金),每股未分利潤),每股淨資産),市盈率),市淨率),每股收益),每股現金流),利潤同比),收入同比);
{滿足以上條件在左上角顯示内容}
VAR1:=TDXDLL5(1,H,L,C);
VAR2:=TDXDLL5(2,H,L,筆類型);
VAR3:=TDXDLL5(3,H,L,筆類型);
VAR4:=TDXDLL5(4,H,L,C);
ZSKSLAST:=TDXDLL5(8,H,L,C);
ZSJSLAST:=TDXDLL5(7,H,L,C);
ZSZD:=TDXDLL5(9,H,L,C);
ZSZG:=TDXDLL5(10,H,L,C);
ZSZZ:=TDXDLL5(11,H,L,0);
BILAST:=TDXDLL5(13,H,L,C);
DUANLAST:=TDXDLL5(12,H,L,C);
DUANFX:=TDXDLL5(14,H,L,C);
BLX:=IF(布林線>0,1,0);
MID :MA(CLOSE,布林參數*BLX);
UPPER: MA(MID + 2*STD(CLOSE,布林參數),BLX);
LOWER: MA(MID - 2*STD(CLOSE,布林參數),BLX);
STICKLINE(布林線=2 ,UPPER, MID,10,0),COLOR400080, LINETHICK1;
STICKLINE(布林線=2 ,LOWER, MID,10,0),COLOR804000, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=3 AND DUANFX=-1 ,ZSZG, ZSZD,0,0),COLOR000044, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=3 AND DUANFX=1 ,ZSZG, ZSZD,0,0),COLOR004400, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=2 AND DUANFX=-1 ,REF(ZSZG,1), REF(ZSZD,1),10,0),COLOR004000, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=2 AND DUANFX=1 ,REF(ZSZG,1), REF(ZSZD,1),10,0),COLOR400080, LINETHICK1;
DRAWLINE(畫筆>=1 && VAR2=1 ,H,VAR2=-1,L,0),COLORRED;
DRAWLINE(畫筆>=1 && VAR2=-1,L,VAR2=1,H,0),COLORGREEN;
DRAWLINE(筆中樞=2 && VAR2=1 ,H,VAR2=-1,L,0),COLORYELLOW;
DRAWLINE(筆中樞=2 && VAR2=-1,L,VAR2=1,H,0),COLORYELLOW;
DRAWLINE(筆中樞=3 && VAR2=1 ,H,VAR2=-1,L,0),COLORYELLOW,DOTLINE;
DRAWLINE(筆中樞=3 && VAR2=-1,L,VAR2=1,H,0),COLORYELLOW,DOTLINE;
DRAWLINE(畫段>=1 && VAR3=1 ,H,VAR3=-1,L,0),COLORBLUE,LINETHICK2;
DRAWLINE(畫段>=1 && VAR3=-1,L,VAR3=1,H,0),COLORMAGENTA,LINETHICK2;
DRAWLINE(畫段=2 && VAR3=1 ,H,VAR3=-100,L,0),COLORBLUE,LINETHICK2;
DRAWLINE(畫段=2 && VAR3=-1,L,VAR3=100,H,0),COLORMAGENTA,LINETHICK2;
DRAWLINE(畫筆=2 && VAR2=1 ,H,VAR2=-10,L,0),COLOR0080FF,DOTLINE;
DRAWLINE(畫筆=2 && VAR2=-1,L,VAR2=10,H,0),COLOR0080FF,DOTLINE;
TT:=(MA(HIGH,15)-MA(LOW,15))/200*周期位置;
S3:=TDXDLL5(19,H,L,C);
買點概率:=IF(S3>15,S3,0);
S4:=TDXDLL5(93,H,L,C);
賣點概率:=IF(S4>15,S4,0);
DRAWNUMBER(H-REF(L,BILAST)>0AND MOD(筆參數,10)=1&& CURRBARSCOUNT=1,H+TT,BARSLAST(VAR2=-1)),COLORYELLOW;
DRAWNUMBER(L-REF(H,BILAST)<0AND MOD(筆參數,10)=1&& CURRBARSCOUNT=1,L-TT,BARSLAST(VAR2=1)),COLORGREEN;
DRAWLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSKSLAST=1 AND DUANFX=1, ZSZG, MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSJSLAST=1 AND DUANFX=1, ZSZG, 0), COLORRED, LINETHICK1;
DRAWLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSKSLAST=1 AND DUANFX=1, ZSZD, MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSJSLAST=1 AND DUANFX=1, ZSZD, 0), COLORRED, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSKSLAST=1 AND DUANFX=1, ZSZG, ZSZD, 0, 0), COLORRED, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSJSLAST=1 AND DUANFX=1, ZSZG, ZSZD, 0, 0), COLORRED, LINETHICK1;
DRAWLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSKSLAST=1 AND DUANFX=-1, ZSZG, MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSJSLAST=1 AND DUANFX=-1, ZSZG, 0), COLORGREEN, LINETHICK1;
DRAWLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSKSLAST=1 AND DUANFX=-1, ZSZD, MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSJSLAST=1 AND DUANFX=-1, ZSZD, 0), COLORGREEN, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSKSLAST=1 AND DUANFX=-1, ZSZG, ZSZD, 0, 0), COLORGREEN, LINETHICK1;
STICKLINE(MOD(筆中樞,10)=1 OR MOD(筆中樞,10)=3 && ZSJSLAST=1 AND DUANFX=-1, ZSZG, ZSZD, 0,0), COLORGREEN, LINETHICK1;
{DRAWLINE(MOD(筆中樞,10)>=1 && ZSKSLAST=1, ZSZZ, ZSJSLAST=1, ZSZZ, 0), COLORYELLOW;}
VAR19:=TDXDLL5(22,H,L,C);
VAR22:=TDXDLL5(22,H,L,1);
VAR23:=TDXDLL5(23,H,L,1);
VAR24:=TDXDLL5(24,H,L,1);
VAR25:=TDXDLL5(25,H,L,1);
ZSLXZSJSLAST:=TDXDLL5(26,H,L,1);
ZSLXZSKSLAST:=TDXDLL5(27,H,L,1);
ZSLXZSZD:=TDXDLL5(28,H,L,1);
ZSLXZSZG:=TDXDLL5(29,H,L,1);
VAR30:=TDXDLL5(30,H,L,1);
DRAWLINE((PERIOD==0 OR 段中樞=1) && VAR22=1 ,H,VAR22=-1,L,0),COLORFF00FF,LINETHICK2;
DRAWLINE((PERIOD==0 OR 段中樞=1) && VAR22=-1,L,VAR22=1,H,0),COLORFF00FF,LINETHICK2;
DRAWLINE((PERIOD==0 OR 段中樞=1) && ZSLXZSKSLAST=1, ZSLXZSZG, ZSLXZSJSLAST=1, ZSLXZSZG, 0), COLORMAGENTA, LINETHICK2;
DRAWLINE((PERIOD==0 OR 段中樞=1) && ZSLXZSKSLAST=1, ZSLXZSZD, ZSLXZSJSLAST=1, ZSLXZSZD, 0), COLORMAGENTA, LINETHICK2;
STICKLINE((PERIOD==0 OR 段中樞=1) && ZSLXZSKSLAST=1, ZSLXZSZG, ZSLXZSZD, 0.2, 0), COLORMAGENTA, LINETHICK2;
STICKLINE((PERIOD==0 OR 段中樞=1) && ZSLXZSJSLAST=1, ZSLXZSZG, ZSLXZSZD, 0.2, 0), COLORMAGENTA, LINETHICK2;
DRAWKLINE(H,O,L,C);
{陽線上下影}
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,CLOSE,HIGH,0,0), COLORRED;
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,OPEN,LOW,0,0), COLORRED;
{陰線上下影}
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE STICKLINE(MOD(筆中樞,10)=2 AND CLOSE {陽K線}
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,2.8.2,0),COLOR0000A1;
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,1.9.2,0),COLOR0000B5;
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,0.9.8,0),COLOR0000C5;
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,0.4,0),COLOR0000D4;
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE>=OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF;
{陰K線}
STICKLINE(MOD(筆中樞,10)=2 AND CLOSE STICKLINE(MOD(筆中樞,10)=2 AND CLOSE STICKLINE(MOD(筆中樞,10)=2 AND CLOSE STICKLINE(MOD(筆中樞,10)=2 AND CLOSE STICKLINE(MOD(筆中樞,10)=2 AND CLOSE
ST:=NAMELIKE('ST')=1 OR NAMELIKE('*ST')=1 OR NAMELIKE('SST')=1 OR NAMELIKE('S*ST')=1 OR NAMELIKE('S ST')=1;
ZTB:=(C/REF(C,1)>1.0995 OR (C/REF(C,1)>1.0495 AND ST)) ANDCLOSE=HIGH AND PERIOD = 5;
DTB:=(REF(C,1)/C>1.0995 OR (REF(C,1)/C>1.0495 AND ST)) AND CLOSE=LOW AND PERIOD = 5;
STICKLINE(ZTB,C,O,3,0),COLORYELLOW;
STICKLINE(DTB,C,O,3,0),COLORLIGREEN;
VIP:=1;
SHORT:=12;LONG:=26;MID1:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID1);
MACD:=(DIF-DEA)*2,COLORSTICK;
筆尾日:=BARSLAST(ZSJSLAST=1);
中樞UP:=REF(ZSZG,筆尾日),COLORGREEN;
中樞MID:=ZSZZ,COLORWHITE,NODRAW;
中樞DN:=REF(ZSZD,筆尾日),COLORGREEN;
筆漲日:=BARSLAST(VAR2=-1),NODRAW;
筆跌日:=BARSLAST(VAR2=1),NODRAW;
有效紅柱:=IF(筆漲日<筆跌日 AND MACD>0,MACD,0);
有效綠柱:=IF(筆漲日>筆跌日 AND MACD<0,MACD,0);
紅面積:=SUM(有效紅柱,筆漲日),NODRAW;
綠面積:=SUM(有效綠柱,筆跌日),NODRAW;
LAST底:=IF(VAR2=-1,REF(L,REF(筆漲日,1)+1),DRAWNULL),NODRAW;
LAST頂:=IF(VAR2=1,REF(H,REF(筆跌日,1)+1),DRAWNULL),NODRAW;
創新低:=VAR2=-1 AND L 創新高:=VAR2=1 AND H>LAST頂,NODRAW;
創新低日:=BARSLAST(創新低=1),NODRAW;
創新高日:=BARSLAST(創新高=1),NODRAW;
LD底背:=L[ X底背:=L][REF(DIF,REF(創新低日,1)+1) AND 創新低,COLORMAGENTA,NODRAW;
]
Z底背:=L[REF(MACD,REF(創新低日,1)+1) AND 創新低,COLORMAGENTA,NODRAW;
]
M底背:=L[REF(綠面積,REF(創新低日,1)+1) AND 創新低,COLORMAGENTA,NODRAW;
]
大底背:=X底背 ORZ底背 ORM底背;
LD頂背:=H>REF(H,REF(創新高日,1)+1)AND 創新高,COLORCYAN,NODRAW;
X頂背:=H>REF(H,REF(創新高日,1)+1) AND DIF[ Z頂背:=H>REF(H,REF(創新高日,1)+1) AND MACD][ M頂背:=H>REF(H,REF(創新高日,1)+1) AND 紅面積][ 大頂背:=X頂背 OR Z頂背 OR M頂背;
]
X小底背:=大底背=0 AND L[REF(DIF,REF(筆漲日,1)+1) AND 創新低,COLORMAGENTA,NODRAW;
]
Z小底背:=大底背=0 AND L[REF(MACD,REF(筆漲日,1)+1) AND 創新低,COLORMAGENTA,NODRAW;
]
M小底背:=大底背=0 AND L[REF(綠面積,REF(筆漲日,1)+1) AND 創新低,COLORMAGENTA,NODRAW;
]
X小頂背:=大頂背=0 AND H>REF(H,REF(筆跌日,1)+1) AND DIF[ Z小頂背:=大頂背=0 AND H>REF(H,REF(筆跌日,1)+1) AND MACD][ M小頂背:=大頂背=0 AND H>REF(H,REF(筆跌日,1)+1) AND 紅面積][ 大底背數:=X底背+Z底背+M底背,COLORMAGENTA,NODRAW;
]
大頂背數:=X頂背+Z頂背+M頂背,COLORCYAN,NODRAW;
小底背數:=X小底背+Z小底背+M小底背,COLORMAGENTA,NODRAW;
小頂背數:=X小頂背+Z小頂背+M小頂背,COLORCYAN,NODRAW;
三買:=VAR2=-1 AND L>中樞UP AND SUM(VAR2=-1 AND L>中樞UP,筆尾日)=1,COLORMAGENTA;
三賣:=VAR2=1 AND H<中樞DNAND SUM(VAR2=1 AND H<中樞DN,筆尾日)=1,COLORCYAN;
三賣日:=BARSLAST(三賣),NODRAW;
三買日:=BARSLAST(三買),NODRAW;
一買:=三賣日<三買日 AND 創新低 AND 大底背數>0,COLORMAGENTA;
二買:=三賣日<三買日 AND VAR2=-1 AND L>LAST底 AND REF(創新低日,1)=REF(筆漲日,1),COLORMAGENTA;
一賣:=三賣日>三買日 AND 創新高 AND 大頂背數>0,COLORCYAN;
二賣:=三賣日>三買日 AND VAR2=1 AND H
DRAWICON(VAR1=1 && 頂底分型 && 分型買賣=1,H+2*TT, 2);
DRAWICON(VAR1=-1 && 頂底分型&& 分型買賣=1,L-2*TT,1);
DRAWTEXT(MOD(筆參數,10)=1 && VAR2=1 , H+TT, VAR2STR(BILAST,0)), COLORYELLOW;
DRAWTEXT(MOD(筆參數,10)=1 && VAR2=-1 , L-TT, VAR2STR(BILAST,0)), COLORYELLOW;
DRAWTEXT(MOD(筆參數,100)>=10 && VAR2=1 , H+周期位置/4*TT, VAR2STR(H,2)), COLORFFFF00;
DRAWTEXT(MOD(筆參數,100)>=10 && VAR2=-1 , L-周期位置/4*TT, VAR2STR(L,2)), COLORFFFF00;
DRAWTEXT(MOD(筆參數,1000)>=100 && VAR3=1 , H+周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
DRAWTEXT(MOD(筆參數,1000)>=100 && VAR3=-1 , L-周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
DRAWTEXT(MOD(筆參數,10)>=3 && VAR3=1 , H+周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
DRAWTEXT(MOD(筆參數,10)>=3 && VAR3=-1 , L-周期位置/2*TT, VAR2STR(DUANLAST,0)), COLORFF00FF;
{DRAWTEXT(買點概率>=20 && VAR2=-1 , L-周期位置/1.6*TT, VAR2STR(買點概率,2)), COLORRED;
DRAWTEXT(賣點概率>=20 && VAR2=1 , H+周期位置/1.6*TT, VAR2STR(賣點概率,2)), COLORRED;}
DRAWTEXT(分型買賣=2 AND 一賣 AND VIP=1,H+周期位置/1.1*TT,'一賣'),COLORCYAN;
DRAWTEXT(分型買賣=2 AND 二賣 AND 三賣=0 AND VIP=1,H+周期位置/1.2*TT,'二賣'),COLORCYAN;
DRAWTEXT(分型買賣=2 AND 三賣 AND 二賣=0 AND VIP=1,H+周期位置/1.2*TT,'三賣'),COLORCYAN;
DRAWTEXT(分型買賣=2 AND 二賣 AND 三賣 AND VIP=1,H+周期位置/1.2*TT,'二三賣'),COLORCYAN;
DRAWTEXT(分型買賣=2 AND 一買 AND VIP=1,L-周期位置/1.1*TT,'一買'),COLORYELLOW;
DRAWTEXT(分型買賣=2 AND 二買 AND VIP=1 AND 三買=0,L-周期位置/1.2*TT,'二買'),COLORYELLOW;
DRAWTEXT(分型買賣=2 AND 三買 AND VIP=1 AND 二買=0,L-周期位置/1.2*TT,'三買'),COLORYELLOW;
DRAWTEXT(分型買賣=2 AND 二買 AND VIP=1 AND 三買,L-周期位置/1.2*TT,'二三買'),COLORYELLOW;
DRAWTEXT(筆中樞>10 && ZSJSLAST=1,ZSZG,VAR2STR(ZSZG,2));
DRAWTEXT(筆中樞>10 && ZSJSLAST=1,ZSZD,VAR2STR(ZSZD,2));
DRAWTEXT(筆中樞>10 && ZSJSLAST=1,ZSZZ,VAR2STR(ZSZZ,2));
DRAWTEXT_FIX((闆塊顯示>=1 OR PERIOD=IF(闆塊顯示>=1,闆塊顯示,19)) && 闆塊顯示>=1 AND ISLASTBAR,0.01,1.2,0,顯示内容),COLORMAGENTA;
DRAWRECTREL(0,965,130,999,RGB(0,0,1)),NOFRAME;
有話要說...