以下是通达信康龙双彩图指标公式源码和使用说明

通达信康龙双彩图指标公式源码:

   N:=9;M:=9;

   VAR1:=(C-MA(C,6))/MA(C,6)*100;

   VAR2:=(C-MA(C,24))/MA(C,24)*100;

   VAR3:=(C-MA(C,32))/MA(C,32)*100;

   VAR4:=(VAR1+VAR2+VAR3)/3;

   VAR5:=EMA(VAR4,5);

   VAR6:=MA(100*(C-LLV(C,34))/(HHV(H,34)-LLV(L,34)),5)-20;

   VAR7:=SMA(SMA(100-3*(C-LLV(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1)+SMA(2*(C-LLV(C,75))/(HHV(H,75)-LLV(L,75))*100,20,1),15,1);

   VAR8:=VAR7<REF(VAR7,1)ANDV>REF(V,1)ANDC>REF(C,1);

   A:=PERIOD;

   BL:=IF(A=0,150,IF(A=1,50,IF(A=2,30,IF(A=3,17,IF(A=4,15,IF(A=5,8,IF(A=6,3,IF(A=7,2,IF(A=8,50,IF(A=9,3,1.3))))))))));

   FM:=(EMA(CLOSE,1.414*N+1));

   FCL:=IF(FM<=0.05,Abs(FM)+0.1,0);

   DIF:=(EMA(CLOSE,N)-EMA(CLOSE,2*N+2))/(FCL+FM)*100*BL,COLORLIRED,LINETHICK2;

   DEA:=EMA(DIF,N*0.75),COLORGREEN,LINETHICK2;

   DRAWBAND(DEA,RGB(55,250,96),DIF,RGB(155,50,196));

   ED:=(-0.4*REF(C,4)-0.4*REF(C,3)-1.1*REF(C,2)+0.9*REF(C,1)+2*C);

   VARR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;

   VARR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;

   VARR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;

   VARR6:=(VARR3+VARR4+VARR5)/3;

   VARR7:=EMA(VARR6,5);

   指标:=EMA(EMA(VARR3,5),5)*3,COLORSTICK;

   VARR8:=IF(VARR6<=-20,10,0);

   VAR9:=HHV(VARR8,10);

   STICKLINE(VARR8=10,20,10,5,0),COLOR6666FF;

   VARA:=IF(VAR9ANDcrOSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);

   RSV:=(SMA(ED,4,1)-LLV(L,M))/(HHV(H,M)-LLV(L,M))*100;

   K:SMA(RSV,3,1),COLORWHITE,LINETHICK1;

   D:SMA(K,3,1),COLORYELLOW,LINETHICK1;

   J:2*K-1*D,COLORGREEN,LINETHICK1;

   DRAWBAND(K,RGB(240,50,50),D,RGB(50,98,240));

   macd:2*(DIF-DEA),COLORRED,COLORSTICK;

   黄色转强买:(MacD<0ANDMACD>REF(MACD,1),MACD),COLOR00FFFF,NODRAW;

   STICKLINE(MACD>0ANDMACD<REF(MACD,1),0,MACD,0.1,0)COLOR00FF00;

   STICKLINE(MACD>0ANDMACD>REF(MACD,1),0,MACD,0.1,0)COLORRED;

   STICKLINE(MACD<0ANDMACD<REF(MACD,1),0,MACD,0.1,0),COLORCYAN;

   STICKLINE(MACD<0ANDMACD>REF(MACD,1),0,MACD,0.1,0),COLOR00FFFF;

   看多:IF(LLV(VAR6,3)<VAR6,-60,DRAWNULL),LINETHICK2,COLORRED;

   看空:IF(VAR6=LLV(VAR6,3),-60,DRAWNULL),LINETHICK2,COLORGREEN;

   中短:IF(J>D,-50,DRAWNULL),LINETHICK2,COLORCC66FF;

   超短:IF(VAR8>0,-40,DRAWNULL),LINETHICK2,COLORYELLOW;

   观望:IF(J<D,-50,DRAWNULL),LINETHICK1,COLORFF9900;

   战区:IF(VAR8=0,-40,DRAWNULL),LINETHICK1,COLOR6B8E23;

   金叉:=CROSS(DIF,DEA)ANDDIF<0.3;

   STICKLINE(金叉,0,8,3,0),COLORYELLOW;

   危险:STICKLINE(VAR2ANDCROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR1+10,0,1,0);

   注意止损:STICKLINE(VAR2ANDFILTER(VAR1<REF(VAR1,1),3)

   ANDCROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR1+6,0,3,0);

   DRAWTEXT(VAR2ANDCROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR1+10,’危’),COLORBLUE;

   DRAWTEXT(VAR2ANDFILTER(VAR1<REF(VAR1,1),6)ANDCROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR1+6,’损’),COLORBLUE;

   TYP:=(HIGH+LOW+CLOSE)/3;

   cci:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));

   转点:=IF(K>DANDCCI>0ANDDIF>DEAANDMACD>0,1,0);

   STICKLINE(转点=1,50,50,2,0),COLORYELLOW;

   STICKLINE(转点=0,50,50,2,0),COLORCYAN;

   STICKLINE(C,90,90,1,0),COLORYELLOW;

   STICKLINE(C,10,10,1,0),COLORCYAN;

   STICKLINE(C,-90,-90,1,0),COLORCYAN;

   SHORT:=6;

   LONG:=13;

   MID:=4;

   DIFJ:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);

   DEAJ:=EMA(DIFJ,MID);

   MACDK:=(DIFJ-DEAJ)*2,COLORSTICK;

   MACDJC:CROSS(DIFJ,DEAJ);

   STICKLINE(MACDJC,-100,-80,1,1),COLORWHITE;

   STICKLINE(MACDJC,-100,-80,0,0),COLOR000099;

   STICKLINE(MACDJC,-100,-80,2,0),COLOR0000BB;

   STICKLINE(MACDJC,-100,-80,1,0),COLOR0000DD;

   STICKLINE(MACDJC,-100,-80,0.1,0),COLOR0000FF;

   {MACD金叉}

   NK:=9;

   MK1:=3;

   MK2:=3;

   RSV1:=(CLOSE-LLV(LOW,NK))/(HHV(HIGH,NK)-LLV(LOW,NK))*100;

   K1:=SMA(RSV1,MK1,1);

   D1:=SMA(K1,MK2,1);

   J1:=3*K1-2*D1;

   kdjC:CROSS(K1,D1);

   {STICKLINE(kdJC,-60,-40,1,1),COLORYELLOW;}

   STICKLINE(KDJC,-60,-40,0,0),COLOR330099;

   STICKLINE(KDJC,-60,-40,2,0),COLOR9900BB;

   STICKLINE(KDJC,-60,-40,1,0),COLORBB00DD;

   STICKLINE(KDJC,-60,-40,0.1,0),COLORFF00FF;

   {DRAWBAND(DIF,RGB(155,50,50),DEAC,RGB(0,100,50));}

   {KDJ金叉}

   NN1:=5;NN2:=10;NN3:=20;NN4:=30;

   bbi:=(MA(CLOSE,NN1)+MA(CLOSE,NN2)+MA(CLOSE,NN3)+MA(CLOSE,NN4))/4,COLORRED,LINETHICK1;

   BBIJC:CROSS(C,BBI),COLORRED;

   {STICKLINE(BBIJC,-30,-10,1,1),COLORRED;}

   STICKLINE(BBIJC,-30,-10,2.8,0),COLOR555555;

   STICKLINE(BBIJC,-30,-10,2,0),COLOR888888;

   STICKLINE(BBIJC,-30,-10,1.5,0),COLORAAAAAA;

   STICKLINE(BBIJC,-30,-10,1,0),COLORCCCCCC;

   STICKLINE(BBIJC,-30,-10,0.5,0),COLOREEEEEE;

   {BBI金叉}

   N5:=6;

   LCK:=REF(CLOSE,1);

   AA:=ABS(HIGH-LCK);

   BB:=ABS(LOW-LCK);

   CCK:=ABS(HIGH-REF(LOW,1));

   DDK:=ABS(LCK-REF(OPEN,1));

   R:=IF(AA>BBANDAA>CCK,AA+BB/2+DDK/4,IF(BB>CCKANDBB>AA,BB+AA/2+DDK/4,CCK+DDK/4));

   X:=(CLOSE-LCK+(CLOSE-OPEN)/2+LCK-REF(OPEN,1));

   SI:=16*X/R*MAX(AA,BB);

   asi:=SUM(SI,0);

   MASI:=(ASI,N5);

   ASIJC:CROSS(ASI,MASI),COLORBLUE;

   STICKLINE(ASIJC,20,40,1,1),COLORBLUE;

   {ASI金叉};

   mtm:=CLOSE-REF(CLOSE,12);

   MTMJC:=CROSS(MTM,0),COLORBROWN;

   STICKLINE(MTMJC,50,70,1,1),COLORBROWN;

   STICKLINE(MTMJC,50,70,2.8,0),COLOR555500;

   STICKLINE(MTMJC,50,70,2,0),COLOR888800;

   STICKLINE(MTMJC,50,70,1.5,0),COLORAAAA00;

   STICKLINE(MTMJC,50,70,1,0),COLORCCCC00;

   STICKLINE(MTMJC,50,70,0.5,0),COLOREEEE00;

   XG:=MACDJCANDKDJCANDBBIJCANDASIJCANDMTMJC;

   {STICKLINE(XG,-100,100,1,0);}

   {DRAWTEXT_FIX(XG>-1,0,0,0,’共振次数越多成功率越高’);}

   三指标共振:=MACDJC+KDJC+BBIJC+ASIJC+MTMJC=3;

   STICKLINE(三指标共振,50,70,2.8,0),COLOR335555;

   STICKLINE(三指标共振,50,70,2,0),COLOR338888;

   STICKLINE(三指标共振,50,70,1.5,0),COLOR33AAAA;

   STICKLINE(三指标共振,50,70,1,0),COLOR33CCCC;

   STICKLINE(三指标共振,50,70,0,0),COLOR33EEEE;

   DIFF:EMA(CLOSE,6)-EMA(CLOSE,13),LINESTICK,COLORYELLOW;

   IF(DIFF>=REF(DIFF,1),DIFF,DRAWNULL),COLORRED,LINETHICK3;

   DEA:EMA(DIFF,5);

   A:=MACD;

   G:=MA(MACD,2);

   J:=MA(MACD,3);

   J1:=MA(MACD,5);

   STICKLINE(CROSS(MA(A,1),G),0.07,0,2,0),COLORLIMAGENTA,LINETHICK2;

   STICKLINE(CROSS(MA(A,1),G),0.09,0,1,0),COLORYELLOW;

   VAR13:=IF(YEAR>=2018ANDMONTH>=11ANDDAY>=1,0,1);

   AA:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;

   BB:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;

   CC:=EMA(AA,2);

   DD:=EMA(BB,5);

   VAR14:=MAX(EMA(AA,2)-EMA(BB,5),0)*1.2;

   VAR15:=EMA(VAR14,5);

   SS:=EMA(VAR15,2);

   风险系数:=(VAR15-SS)/10*VAR13;

   STICKLINE(VAR15>REF(VAR15,1)ANDVAR13,VAR15,0,2,0),COLOR0099FF;

   STICKLINE(VAR15>REF(VAR15,1)ANDVAR13,VAR15,SS,3.5,0),COLORYELLOW;

   STICKLINE(VAR15<REF(VAR15,1)ANDVAR13,0,VAR15,2,0),COLORGREEN;

   STICKLINE(VAR15<REF(VAR15,1)ANDVAR13,VAR15,SS,3.5,0),COLORFFCC33;

   WB:=CROSS(DIFF,DEA);{=号前的符号可根据需要改}

   WS:=CROSS(DEA,DIFF);

   DRAWICON(WB,(DEA*1.02),23);

   DRAWICON(WS,(DEA*1.01),17);

   四指标共振:=MACDJC+KDJC+BBIJC+ASIJC+MTMJC=4;

   五指标共振:=MACDJC+KDJC+BBIJC+ASIJC+MTMJC=5;

   {DRAWTEXT(三指标共振,85,’三指标共振’);}

   DRAWTEXT(四指标共振,0,’四指标共振’);

   DRAWTEXT(五指标共振,0,’五指标共振’);

   DRAWGBK(O>C,RGB(160,32,240),RGB(56,94,15),0,’背景图’,0);

   A01:=(WINNER((CLOSE*1))*100.000);

   A02:=(WINNER((CLOSE*1.1))*100.000);

   A03:=(WINNER((CLOSE*0.9))*100.000);

   A04:=ma(A03,5);

   A06:=(100-MA(A02,5));

   {stICKLINE(1,A06,MA(A02,5),2,1),COLORGREEN;}

   A08:=(MA(A02,5)-MA(A03,5));

   {STICKLINE(1,A04,MA(A02,5),2,1),COLORYELLOW;}

   A0A:=(((((HHV(A04,15)-A03)/A03)*100)>30)AND(HHV(A04,15)>50));

   STICKLINE(A0A,(0-2),2,2,1);

   STICKLINE(NOT(A0A),(0-2),2,2,1),COLORBLUE;

   STICKLINE(A03>REF(A03,1),0,A03,2,0),COLORRED;

   STICKLINE(A03<REF(A03,1),0,A03,2,1),COLORRED;

   获利:=MA(A03,1),COLORMAGENTA,DOTLINE;

   主力:MA(A03,10),COLORMAGENTA,LINETHICK2;

   套牢:=100-A02,COLORLIBLUE,DOTLINE;

   散户:(100.000-MA(A02,10)),COLORLIBLUE,LINETHICK2;

   浮动:=A02-A03,COLORLIRED,DOTLINE;

   游资:(MA(A02,10)-MA(A03,10)),COLORLIRED,LINETHICK2;

   STICKLINE(1,100,100,5,1),COLORGREEN;

通达信康龙双彩图指标公式截图

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。