组合主图-精品通达信指标公式源码分享
M1:=5; M2:=10; M3:=20;
MA5:MA(CLOSE,M1),LINETHICK2;
MA10:MA(CLOSE,M2),LINETHICK2;
MA20:MA(CLOSE,M3),LINETHICK2,COLOR00FF00;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,6,0),COLORRED;
STICKLINE(ZDF<-9.8,O,C,6,0),COLORBLUE;
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1}
VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR
VAR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,0),COLORYELLOW;
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),4,1),COLOR00FF00{98FD};
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORRED;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;
IF(MA5>=REF(MA5,1) AND MA5>=MA10,MA5,DRAWNULL),COLORRED,LINETHICK3;
SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+CLOSE)/3,5),1) AND
REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CLOSE)/3,5),2);
SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND
H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;
MR:=SC AND COUNT(SS,2);
买:=MR AND NOT(REF(MR,1)),COLORYELLOW;
STICKLINE(买,L,L*0.95,1,0),COLORRED;
DRAWTEXT(买,L*0.95, '必涨'),COLORRED;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND
IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L,L*0.92,1,0),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
AA:=CROSS(VAR2,-100);
BB:=BARSLAST(AA)+2;
CC:=FINANCE(40)<40000000000;
DRAWICON(AA AND CC,L*0.99,1);
DRAWTEXT(AA AND CC,REF(L,2),'------买入');
K:=(C+H+L)/3;
D:=MA(K,4);
操作:D,COLORWHITE,LINETHICK2;
拉升:HHV(D,13),COLORRED,LINETHICK2;
阻力:HHV(D,55),COLORRED;
买卖:LLV(D,8),COLORYELLOW,LINETHICK2;
顶部:HHV(H*0.98,55),COLORYELLOW;
DRAWTEXT(REF(C,1)>D AND C<D AND D>REF(D,1),H*1.02, '←卖出');
DRAWTEXT(REF(C,1)<D AND C>D AND D<REF(D,1),L*0.98, '←次日买'),COLORWHITE;
十字星:=CLOSE=OPEN;
多方炮:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN;
出水芙蓉:=(OPEN<EMA(C,20) OR OPEN<EMA(C,40) OR OPEN<EMA(C,60)) AND (C>MAX(EMA(C,20),MAX(EMA(C,40),EMA(C,60))))AND (V/MA(V,30)>1.2 AND C/REF(C,1)>1.049);
上升三部曲:=REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND
REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND
REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4);
曙光初现:=REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03 AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(十字星 ,HIGH,'←十字星'),LINETHICK2, COLORYELLOW;
DRAWTEXT(多方炮 ,HIGH,'←多见顶'),LINETHICK2, COLORYELLOW;
DRAWTEXT(出水芙蓉 ,HIGH,'←芙蓉'),LINETHICK2, COLORYELLOW;
DRAWTEXT(上升三部曲 ,HIGH,'←上升三部曲'),LINETHICK2, COLORYELLOW;
DRAWTEXT(曙光初现 ,HIGH,'←曙光'),LINETHICK2, COLORYELLOW;
LL:=REF(L,1);
HH:=REF(H,1);
SQK:=L>HH;
XQK:=H<LL;
向上跳几元钱:IF(SQK=1,L-HH,DRAWNULL),COLORGREEN,CROSSDOT,LINETHICK3,NODRAW;
逃命跳空元:IF(XQK=1,H-LL,DRAWNULL),COLORYELLOW,CROSSDOT,LINETHICK3,NODRAW;
DRAWTEXT(SQK,L*0.92,' 向上跳空'),COLORGREEN;
DRAWTEXT(XQK,H*1.08,' 逃命跳空'),COLORYELLOW;
A001:=CLOSE-REF(CLOSE,6);
A002:=MA(A001,6);
A003:=((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100;
A004:=SMA(A003,3,1);
A005:=SMA(A004,3,1);
A006:=EMA((3*A004-2*A005),2);
A007:=(HIGH+LOW+CLOSE)/3;
A008:=((A007-MA(A007,14))/(0.015*AVEDEV(A007,14)))/2;
A009:=(A008+(EMA(((0-(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))))+100)/100,3)*200-100))/2;
A010:=A009-REF(A009,14);
A011:=A009-REF(A009,26);
A012:=(A009+A010+A011)/3;
KKM:=EMA(A012,4);
A013:=HHV(HIGH,34);
A014:=(2*CLOSE+HIGH+LOW)/4;
A015:=LLV(LOW,34);
A016:=EMA(((A014-A015)/(A013-A015))*100,13);
A017:=EMA(0.667*REF(A016,1)+0.333*A016,2);
KKMD:=A016-A017>1 AND A016<30 AND A017<30;
KKML:=A016-A017<0 AND A016>80 AND A017>80 AND REF(A016-A017,1)>0;
KKMQ:=COUNT(A016-A017>0,2)=2;
KKAL:=(A016-A017)<0;
生命线:MA(CLOSE,20),COLOR0000FF;
取舍线:MA(CLOSE,10);
DRAWTEXT(FILTER(KKMD,30),L,'最佳买入时机★'),COLOR00FFFF;
DRAWTEXT(FILTER(KKML,30),H,'最佳卖出时机'),COLORFFFF00;
DRAWTEXT(FILTER(KKMQ,30),C,'持仓区'),COLOR00FF00;
DRAWTEXT(FILTER(KKAL,30),H,'空仓区'),COLORFF8080;
DRAWTEXT(FILTER(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),30),L*0.95,'该股强于大盘'),COLORFF00FF;
DRAWTEXT(CROSS(MA(CLOSE,5),MA(CLOSE,10)),L*0.92,'可出手'),COLORFF00FF;
DRAWTEXT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),H*1.08,'收手了'),COLORFF0000;
DRAWTEXT(FILTER(KKM>EMA(KKM,4) AND KKM>REF(KKM,1),30),L*0.98,'快速介入');
DRAWTEXT(FILTER(KKM<EMA(KKM,4) AND KKM<REF(KKM,1),30),H*1.02,'风险较大');
DRAWTEXT(FILTER(KKM>EMA(KKM,4) AND KKM<REF(KKM,1),30),H,'休息观望~'),COLORAA8800;
DRAWTEXT(FILTER(KKM<EMA(KKM,4) AND KKM>REF(KKM,1),30),L,'有防御能力'),COLORAA00AA;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!