小天KDJ主图优化
-
相关简介:C/C++ Code 复制内容到剪贴板 NN:=20;N:=2; RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=3*K-2*D; RSV12:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100; K12:=SMA(RSV12,3,1); D12:=SMA(K12,3,1);
-
文章来源:择股网作者:股海网发布时间:2009-09-21浏览次数:
C/C++ Code复制内容到剪贴板
- NN:=20;N:=2;
- RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
- K:=SMA(RSV,3,1);
- D:=SMA(K,3,1);
- J:=3*K-2*D;
- RSV12:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
- K12:=SMA(RSV12,3,1);
- D12:=SMA(K12,3,1);
- J12:=3*K12-2*D12;
- RSV24:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
- K24:=SMA(RSV24,3,1);
- D24:=SMA(K24,3,1);
- J24:=3*K24-2*D24;
- RSI1:=SMA(MAX(CLOSE-LOW,0),9,1)/SMA(ABS(CLOSE-LOW),9,1)*100;
- 上防线:IF(CROSS(J24,RSI1),H,REF(H,BARSLAST(CROSS(J24,RSI1)))),COLORBLUE;
- 支撑位:IF(CROSS(J,J24),L,REF(L,BARSLAST(CROSS(J,J24)))),COLORYELLOW;
- 压力位:IF(CROSS(J24,J),H,REF(H,BARSLAST(CROSS(J24,J)))),COLORRED;
- U2L:=IF(C>=MA(C,NN),80,50);
- L2L:=IF(C>=MA(C,NN),50,20);
- RH1:=IF(J< U2L AND REF(J,1)>=U2L,HHV(REF(H,1),BARSLAST(J>=U2L AND REF(J,1)< U2L)-1),
- REF(HHV(REF(H,1),BARSLAST(J>=U2L AND REF(J,1)< U2L)-1),BARSLAST(J< U2L AND REF(J,1))));
- RH4:=IF(H>RH1,L,REF(L,BARSLAST(H>RH1)));
- RH42:=IF(H>RH1,J,REF(J,BARSLAST(H>RH1)));
- 拦截:IF(H>RH4 AND J< RH42 AND J< J24,H,REF(H,BARSLAST(H>RH4 AND J< RH42 AND J< J24))),COLORGREEN;
- RL1:=IF(J>L2L AND REF(J,1)<=L2L,LLV(REF(L,1),BARSLAST(J<=L2L AND REF(J,1)>L2L)-1),
- REF(LLV(REF(L,1),BARSLAST(J<=L2L AND REF(J,1)>L2L)-1),BARSLAST(J>L2L AND REF(J,1))));
- RL4:=IF(L< RL1,H,REF(H,BARSLAST(L< RL1)));
- RL42:=IF(L< RL1,J,REF(J,BARSLAST(L< RL1)));
- 寻底:IF(L< RL4 AND J>RL42 AND J>J24,L,REF(L,BARSLAST(L< RL4 AND J>RL42 AND J>J24))),COLORWHITE;
- TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
- TYX4:=MA((C+L+O+H)/4,13);
- TYX5:=EMA((C+L+O+H)/4,21);
- {空心红}
- STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;
- STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;
- {深绿}
- STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;
- STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;
- STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;
- STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;
- {蓝}
- STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;
- STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;
- STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;
- STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;
- {黄}
- STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;
- STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;
- STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;
- STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;
- {粉红}
- STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;
- STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;
- STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;
- STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;
- {亮灰}
- STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;
- STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;
- STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;
- STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;
- {深红}
- STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;
- STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;
- STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;
- STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;
- {涨跌停K线}
- STICKLINE(HIGH=LOW AND CLOSE=OPEN AND (CLOSE/REF(CLOSE,1))>1.048,HIGH,LOW,3,0) ,COLORRED;
- STICKLINE(HIGH=LOW AND CLOSE=OPEN AND (REF(CLOSE,1)/CLOSE)>1.048,HIGH,LOW,3,0) ,COLOR00FF00;
- {突破}
- STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF;
- AA:=COUNT(CROSS(EMA(C,21),MA(C,8)),30)=1;
- BB:=COUNT(CROSS(EMA(C,21),MA(C,60)),30)=1;
- CC:=REF(BARSLAST(AA AND BB),1);
- DD:=CC AND CROSS(MA(C,8),EMA(C,21));
- DRAWTEXT(DD,(LOW * 0.99),'←乘风'),COLOR80FFFF;
- VARZ1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
- VARZ2:=REF(VARZ1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ3:=REF(VARZ2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ4:=REF(VARZ3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ5:=REF(VARZ4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ6:=REF(VARZ5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ7:=REF(VARZ6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ8:=REF(VARZ7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ9:=REF(VARZ8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZA:=REF(VARZ9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZB:=REF(VARZA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZC:=REF(VARZB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
- VARZE:=REF(VARZD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZF:=REF(VARZE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ10:=REF(VARZF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ11:=REF(VARZ10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ12:=REF(VARZ11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ13:=REF(VARZ12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ14:=REF(VARZ13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ15:=REF(VARZ14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ16:=REF(VARZ15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ17:=REF(VARZ16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
- VARZ18:=REF(VARZ17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
- VARZ19:=REF(VARZD OR VARZE OR VARZF OR VARZ10 OR VARZ11 OR VARZ12 OR VARZ13 OR
- VARZ14 OR VARZ15 OR VARZ16 OR VARZ17 OR VARZ18,1) AND VARZ1;
- VARZ1A:=REF(VARZ1 OR VARZ2 OR VARZ3 OR VARZ4 OR VARZ5 OR VARZ6 OR VARZ7 OR
- VARZ8 OR VARZ9 OR VARZA OR VARZB OR VARZC,1) AND VARZD;
- DRAWTEXT(FILTER(VARZ19=1,5),LOW,' ★买进'),COLORFF00FF;
- DRAWTEXT(FILTER(VARZ1A=1,5),HIGH+0.08,'◆卖出'),COLORYELLOW;
- PPA2:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
- PB1:=REF(C,PPA2+1)>C AND REF("MACD.DIF",PPA2+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
- DRAWTEXT(PB1>0,L-0.02,'★M'),COLOR00FFFF;{MACD底背离}
- A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
- PB2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
- DRAWTEXT(PB2,L-0.10,'◎K'),COLORFF00FF;{KDJ底背离}
- PA3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
- PB3:=REF(C,PA3+1)>C AND REF("RSI.RSI1",PA3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
- DRAWTEXT(PB3>0,L-0.18,'◆R'),COLOR0000FF;{RSI底背离}
- PC1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
- PD1:=REF(C,PC1+1)<C AND REF("MACD.DIF",PC1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
- DRAWTEXT(PD1>0,H+0.16,'★M'),COLOR00FF00;{MACD顶背离}
- PC2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
- PD2:=REF(C,PC2+1)<C AND REF("KDJ.K",PC2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
- DRAWTEXT(PD2>0,H+0.08,'◎K'),COLORFFFFCC;{KDJ顶背离}
- PC3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
- PD3:=REF(C,PC3+1)<C AND REF("RSI.RSI1",PC3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
- DRAWTEXT(PD3>0,H+0.04,'◆R'),COLORFF9900;{RSI顶背离};
- ABB:=DRAWLINE(V>=HHV(V,10),V,V<=LLV(V,3),HHV(V,3),1);
- DIF12:=(EMA(CLOSE,12)-EMA(CLOSE,26))/((EMA(CLOSE,12)+EMA(CLOSE,26))/2)*1000;
- DEA12:=EMA(DIF12,9);
- KDIF12:=3*(DIF12-DEA12);{KDIF12:=2*(DIF12-DEA12)};
- KDEA12:=SMA(KDIF12,5,2);
- RSVVV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
- KVV:=SMA(RSVVV,3,1);
- DVV:=SMA(KVV,3,1);
- BIAS1:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
- A1:=CROSS(KVV,DVV) AND CROSS(KVV,DVV)<16 AND BIAS1<-6;
- M1:=WINNER( MA(CLOSE,1))*200;
- M2:=WINNER(MA(CLOSE,20))*200;
- VAR1:=(CLOSE-LLV(LOW,80))/(HHV(HIGH,80)-LLV(LOW,80))*200;
- VAR2:=SMA(VAR1,3,1);
- VAR3:=SMA(VAR2,3,1);
- VAR4:=3*VAR2-2*VAR3;
- VAR5:=LLV(LOW,5);
- VAR6:=HHV(HIGH,5);
- VAR7:=EMA((CLOSE-VAR5)/(VAR6-VAR5)*100,4)*2;
- VAR8:=EMA(0.667*REF(VAR7,1)+0.333*VAR7,2);
- VAR9:=3*VAR7-2*VAR8;
- VARA:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);
- VARB:=POW(MA(LOW,5),2)+MA(LOW,5);
- VARC:=POW(MA(HIGH,5),2)+MA(HIGH,5);
- VARD:=(VARA-LLV(VARB,64))/(HHV(VARC,64)-LLV(VARB,64))*150+65-10;
- VARE:=SMA(VARD,3,1)*1.5-100;
- VARF:=SMA(VARE,3,1);
- VAR10:=3*VARE-2*VARF;
- VAR11:=(HIGH+LOW+CLOSE*2)/4;
- VAR12:=EMA(VAR11,13);
- VAR13:=STD(VAR11,13);
- VAR14:=(VAR11-VAR12)*100/VAR13;
- VAR15:=EMA(VAR14,5);
- VAR17:=EMA(VAR15,13)+200-100;
- VAR18:=EMA(VAR17,10);
- VAR19:=3*VAR17-2*VAR18;
- VAR1A:=VAR2+VAR7+VARE+VAR17;
- VAR1B:=VAR3+VAR8+VARF+VAR18;
- VAR1C:=VAR4+VAR9+VAR10+VAR19;
- VAR1D:=(HIGH+LOW+CLOSE)/3;
- VAR20:=(VAR1D-MA(VAR1D,34))/(0.015*AVEDEV(VAR1D,34));
- VAR21:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);
- VAR22:=(HIGH+LOW+CLOSE+VAR1D)/4;
- VAR23:=EMA(VAR22,24);
- VAR24:=STD(VAR22,24);
- VAR25:=(VAR22-VAR23)/VAR24*100;
- VAR26:=(VAR1D-MA(VAR1D,24))/(0.015*AVEDEV(VAR1D,24));
- VAR27:=EMA(VAR25,5);
- VAR2A:=((VAR27+VAR26+VAR20)/3+165)/4;
- VAR2B:=(EMA(EMA(EMA(VAR2A,15),10),5)-25)*2+VAR21;
- VAR2C:=(VAR1A+VAR1B+VAR1C*30)/32/5-15;
- VAR2D:=EMA(VAR2C,13);
- VAR2E:=(VAR2A+VAR2C)/2/1.1;
- VAR28:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
- VAR29:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
- VAR30:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
- VAR31:=REF(CLOSE,1);
- VAR32:=SMA(MAX(CLOSE-VAR31,0),5,1)/SMA(ABS(CLOSE-VAR31),5,1)*100;
- VAR33:=(HIGH+LOW+CLOSE)/3;
- VAR34:=(VAR33-MA(VAR33,14))/(0.015*AVEDEV(VAR33,14));
- VAR35:=(VAR28>=-15.8 AND VAR28<=-12.2 AND VAR29<=-20.8 AND VAR30<=-27.5 AND VAR32<=11.7 AND VAR34<=-145)*100;
- 超短:=EMA(VAR2E,3);
- 短线:=EMA(超短,5);
- RSV2:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
- K111:=SMA(RSV2,9,1);
- D111:=SMA(K111,3,1);
- J111:=3*K-2*D;
- DIF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
- DEA1:=EMA(DIF1,9);
- KDJ_K:="KDJ.K"(9,3,3);KDJ_D:="KDJ.D"(9,3,3);KDJ_J:="KDJ.J"(9,3,3);
- TYP:=(HIGH+LOW+CLOSE)/3;
- C1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
- C2:=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));
- VARA1A:=REF(LOW,1);
- VARB1A:=SMA(ABS(LOW-VARA1A),3,1)/SMA(MAX(LOW-VARA1A,0),3,1)*100;
- VARC1A:=EMA(IF(CLOSE*1.3,VARB1A*10,VARB1A/10),3);
- VARD1A:=LLV(LOW,30);
- VARE1A:=HHV(VARC1A,30);
- VARF1A:=IF(MA(CLOSE,58),1,0);
- VARG1A:=EMA(IF(LOW<=VARD1A,(VARC1A+VARE1A*2)/2,0),3)/618*VARF1A;
- VARH1A:=IF(VARG1A>50,50,VARG1A);
- RSV3:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
- TR:=EMA(EMA(EMA(CLOSE,13),13),3);
- TRIX:=(TR-REF(TR,1))/REF(TR,1)*100;
- MATRIX:=MA(TRIX,2.618);
- VAR101:=(2*CLOSE+HIGH+LOW)/4;
- VAR202:=EXPMA(EXPMA(EXPMA(VAR101,4),4),4);
- DIFF88:= EMA(CLOSE,2) - EMA(CLOSE,55);
- DEA88:= EMA(DIFF88,6);
- 买1:=CROSS(KDJ_J,0) OR (CROSS(KDJ_J,KDJ_K) AND KDJ_D<26);
- 买2:=CROSS("RSI.RSI1"(6,2,2),20) OR CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
- 买3:=CROSS("MACD.DIF","MACD.DEA") OR CROSS("MACD.MACD",0);
- 买4:=CROSS(DIF1,DEA1) OR CROSS(K111,D111);
- 买5:=CROSS(DIF12,DEA12) OR CROSS(KDIF12,KDEA12);
- 买6:=CROSS(K,D) OR CROSS(超短,短线);
- 买7:=CROSS(C1,-150) OR CROSS(C2,-150);
- 买8:=CROSS(TRIX,MATRIX);
- 买9:=CROSS(DIFF88,DEA88) OR CROSS(C,ABB);
- 买0:=买1+买2+买3;
- 买00:=买4+买5+买6+买7+买8+买9;
- 买10:=IF(买0>1,买0,0);
- 买11:=IF(买00>0,买00,0);
- AI:=AMOUNT/VOL/100;
- C0:=REF(C,2)*0.865;
- CB1:=REF(C,13)*0.772;
- DSY:=100*VOL/CAPITAL;
- 抄1底:=IF((C-MIN(C0,CB1))/C<0.1 AND SUM(DSY,5)/5<1.8,10, 0);
- DRAWICON(抄1底>0,L/1.02,7);
- LL:=REF(CLOSE,1);
- MM:=SMA(MAX(CLOSE-LL,0),6,1)/SMA(ABS(CLOSE-LL),6,1)*100;
- 卖:=CROSS(80,MM) OR CROSS(DEA1,DIF1) OR CROSS(D111,K111) OR CROSS(DEA12,DIF12) OR CROSS(KDEA12,KDIF12) OR CROSS(D,K) OR CROSS(短线,超短) OR CROSS(MATRIX,TRIX) OR CROSS(DEA88,DIFF88) OR CROSS(250,C1) OR CROSS(250,C2),COLORGREEN;
- DRAWICON(买10>0,L/1.001,9);
- DRAWICON(买11>0,L/1.02,23);
- DRAWICON(卖>0,H+0.06,19);
- YY1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
- VVV1:=SMA(YY1,5,1);
- GGG1:=SMA(VVV1,5,1);
- J999:=3*VVV1-2*GGG1;
- AA1:=EMA(J999,5);
- AA2:=REF(AA1,1);
- NNN2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
- K29:=SMA(NNN2,3,1);
- D29:=SMA(K29,3,1);
- J29:=3*K29-2*D29;
- BB1:=EMA(J29,5);
- BB2:=REF(BB1,1);
- DD2:=AA1>AA2 AND BB1>BB2;
- 注意买入:=DD2 AND NOT(REF(DD2,1)) AND (AA1<50 OR BB1<50) ,LINETHICK0;
- DRAWICON(注意买入,L-0.02,13);
- 注意卖出:=REF(DD2,1)=1 AND NOT(DD2),LINETHICK0;
- DRAWICON(注意卖出,H+0.02,14);
下载链接:( 说明:股海资源如需解压密码的请输入本站域名:www.guhai.com.cn请仔细输入!)
|
上一篇:小松班长的【一招鲜系列的DMI捕捉爆涨股公式】
下一篇:中线选股指标公式(附说明)