通达信主图形态分析公式,
事实上是副图?
{通达信主图形态分析公式}
周期:= 15;
过滤:= 8;
抄底:= -40;
选股:= -26;
智能波段:0, POINTDOT;
VAR2:=MA(CLOSE, 5);
VAR3:=MA(CLOSE, 10);
VAR4:=MA(CLOSE, 20);
VAR5:=MA(CLOSE, 30);
VAR6:=(VAR2+VAR3+VAR4+VAR5)/4;
VAR7:=(VAR6-REF(VAR6, 周期))/REF(VAR6, 周期)*100;
VAR8:=(VAR6-REF(VAR6, 周期))/REF(VAR6, 周期)*100;
VAR9:=EMA(VAR7, 过滤);
反转:STICKLINE(VAR9>1*REF(VAR9, 1), VAR7, 0, 5, 0), COLOREE00EE;
持股:STICKLINE(VAR7>1*REF(VAR7, 1), VAR7, VAR9, 5, 0), COLORRED;
持币:STICKLINE(VAR7<1*REF(VAR7, 1), VAR7, VAR9, 5, 1), COLORGREEN;
洗盘:STICKLINE(VAR7<1*REF(VAR7, 1) AND VAR9>1*REF(VAR9, 1), VAR7, VAR9, 10, 0),
COLOR00EEFF;
VAR10:=(CLOSE-MA(CLOSE, 58))/MA(CLOSE, 58)*100;
VAR11:=(VAR10>1*REF(VAR10, 1) AND VAR10<选股 AND VAR10>抄底)*1.5;
VAR12:=VOL/CAPITAL*100;
VAR13:=LLVBARS(LOW, 50);
VAR14:=SUM(VOL, VAR13);
VAR15:=HHVBARS(HIGH, 50);
VAR16:=SUM(VOL, VAR15);
VAR17:=(CLOSE-REF(OPEN, VAR15))/REF(OPEN, VAR15)*100;
VAR18:=VAR16/CAPITAL*100;
VAR19:=(CLOSE-REF(OPEN, VAR13))/REF(OPEN, VAR13)*100;
VAR20:=VAR14/CAPITAL*100;
VAR21:=MA(CLOSE, 3);
VAR22:=REF(CLOSE, 2)*0.865;
VAR23:=REF(CLOSE, 13)*0.772;
VAR24:=MIN(VAR22, VAR23);
VAR25:=MA(CLOSE, 13);
抄底王:IF((CLOSE-VAR24)/CLOSE<0.030 AND VAR17<(-35) AND SUM(VAR12, 5)/5<1.800, 1
, 0)*10, COLORWHITE;
DRAWTEXT(抄底王, 抄底王, ' 成功率 90.22 %,共发出指示1289 次.底 追 '){,COLORFFAA
00};
VAR26:=(CLOSE-REF(CLOSE, 1))/REF(CLOSE, 1)*100;
VAR27:=(EMA(CLOSE, 12)-EMA(CLOSE, 26))*100;
VAR28:=EMA(VAR27, 9);
VAR29:=2*(VAR27-VAR28);
DRAWTEXT(VAR27<(-50) AND VAR26>7 AND VAR27<VAR28, (-10), '底'), COLORWHITE;
DRAWTEXT(VAR27<(-50) AND VAR26>7 AND VAR27>=VAR28, 5, '追'), COLORWHITE;
STICKLINE(VAR27<(-50) AND VAR26>7, 0,(-10), 5, 0), COLORFFFF66;
A1:=BARSLAST(REF(CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9)),1));
B1:=REF(C,A1+1)>C && REF("MACD.DIF"(12,26,9),A1+1)<"MACD.DIF"(12,26,9) && CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9));
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9)),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF"(12,26,9),C1+1)>"MACD.DIF"(12,26,9) AND CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9));
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
{下面是文字显示各种背离}
DRAWTEXT(B1,L-0.09,'MACD底背'),COLORFF00FF;
DRAWTEXT(B2,L-0.09,'KDJ底背'),COLORYELLOW;
DRAWTEXT(B3,L-0.09,'RSI底背'),COLORRED;
DRAWTEXT(D1,H+0.09,'MACD顶背'),COLORFFCC66;
DRAWTEXT(D2,H+0.09,'KDJ顶背'),COLORC0A8FF;
DRAWTEXT(D3,H+0.09,'RSI顶背'),COLORFFCCCC;
周K:=MA("KDJ.K#WEEK"(9,3,3) ,5);
周D:=MA("KDJ.D#WEEK"(9,3,3) ,5);
周J:=MA("KDJ.J#WEEK"(9,3,3) ,5);
周金:DRAWTEXT(CROSS("KDJ.K#WEEK"(9,3,3),"KDJ.D#WEEK"(9,3,3)) ,MACD,'金叉'),COLORYELLOW;
周死:DRAWTEXT(CROSS("KDJ.D#WEEK"(9,3,3),"KDJ.K#WEEK"(9,3,3)) ,MACD*1.5,'死叉'),COLORFFFF00; |