通达信指标——MACD-KDJ二合一(副图)

合集下载

【股票指标公式下载】-【通达信】MACD实战(副图)

【股票指标公式下载】-【通达信】MACD实战(副图)

【通达信】MACD实战(副图)-指标公式源码中DIFF:(EMA(CLOSE,12) - EMA(CLOSE,26)),LINETHICK2,COLOR2A2AA5;中DEA:EMA(中DIFF,9),COLORFFFF00;MACD2:(2 * (中DIFF -中DEA)),LINETHICK0,COLORFFFF00;STICKLINE((MACD2>=0),0,MACD2,1,1),COLORD700FF;STICKLINE(((MACD2>=0) AND (MACD2 <REF(MACD2,1))),0,MACD2,1,0),COLOR0099FF;STICKLINE((MACD2<0),0,MACD2,1,0),COLORFFC0CB;STICKLINE(((MACD2<0) AND (MACD2 >REF(MACD2,1))),0,MACD2,1,1),COLORCYAN;DU0:=CROSS(中DIFF,0);UD0:=CROSS(0,中DIFF);TDU0:=BARSLAST(DU0);TUD0:=BARSLAST(UD0);DU3:=REF(DU0,1);UD3:=REF(UD0,1);TDU3:=BARSLAST(DU3);TUD3:=BARSLAST(UD3);UDGLINE:=IF((TDU3 < TUD3),REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3)); JDU0:=(((REF(CLOSE,1) <= REF(UDGLINE,1)) AND (CLOSE > UDGLINE)) AND (TDU0 < TUD0));JUD0:=(((REF(CLOSE,1) >= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));JDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));JUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1))); JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1))); JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1))); JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1))); BSLINE:=IF((BARSLAST(JDU2) <BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BA RSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2), REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));DEFUT:=BARSLAST(CROSS(MACD2,0));DEFDT:=BARSLAST(CROSS(0,MACD2));DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT + 1)),REF(HHV(MACD2,(DEFUT + 1)),(DEFDT + 1)));DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT + 1)),REF(LLV(MACD2,(DEFDT + 1)),(DEFUT + 1)));DEFU2L:=REF(DEFUL,(DEFUT + 1));DEFD2L:=REF(DEFDL,(DEFDT + 1));STICKLINE(中DIFF>=中DEA,中DIFF,中DEA,6,0),COLOR00FFFF;STICKLINE(中DIFF<中DEA,中DIFF,中DEA,6,0),COLORBLUE;短DIFF:(EMA(C,3)-EMA(C,10)),LINETHICK2,COLORC0C0C0;短DEA:EMA(短DIFF,9),LINETHICK2,COLOR33FF33;IF(短DIFF>=短DEA,短DIFF,DRAWNULL),COLORRED,LINETHICK2;D1:=EMA(C,3)-EMA(C,8);D2:=EMA(O,3)-EMA(O,8);D3:=EMA(H,3)-EMA(H,8);D4:=EMA(L,3)-EMA(L,8);DRAWICON(((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) >REF(MACD2,3))),MACD2,6);DRAWICON(((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) <REF(MACD2,3))),MACD2,4);DRAWICON(CROSS(中DIFF,D1) AND 中DIFF>0.1 ,D3+0.1,2);EE:=CROSS(中DIFF,中DEA) AND MACD2>REF(MACD2,1) AND 短DIFF>=REF(短DIFF,1) AND 中DEA>=REF(中DEA,1);出来:=FILTER(EE,10);DRAWICON(出来,中DEA,1);【通达信】MACD实战(副图)-指标公式效果图(文档来源:若水财经社区)。

通达信指标公式源码 MACD合并KDJ副图公式

通达信指标公式源码 MACD合并KDJ副图公式

{MACD合并KDJ}周DI:(EMA(CLOSE,60)-EMA(CLOSE,130)),NODRAW;周DE:EMA(周DI,25),NODRAW;周DIF:=20*周DI;周DEA:=20*周DE;DRAWBAND(周DIF,RGB(139,0,139),周DEA,RGB(0,100,50));XG2:=CROSS(周DEA,0);DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);MACD:(DIF-DEA)*40,COLORSTICK;DIFF:20*DIF,COLORWHITE;DEAA:20*DEA,COLORYELLOW;DRAWICON(XG2,2*DEAA,42);DRAWTEXT(XG2,2*DIFF,'周');MACD250:=REF(MACD,BARSLAST(MACD=HHV(MACD,250))),COLORA00000,DOTLINE; XG:=NOT(REF(MACD250,1)=MACD250);STICKLINE(XG,0,MACD,1,0),COLORYELLOW;周MACD:(周DIF-周DEA)*2,COLORSTICK,NODRAW;MA250:=MA(C,250);DRAWICON(周DIF>=0 AND CROSS(DIF,DEA) AND C>=MA250,2,11);{跌穿250:=CROSS(MA250,C);年线之下天数:BARSLAST(跌穿250),NODRAW;}RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1)COLORYELLOW;D:=SMA(K,3,1),COLORBLUE;J:=3*K-2*D,COLORWHITE;月N:=DAY;月HIGH:=IF(DAY=月N,HHV(H,30),0);月LOW:=IF(DAY=月N,LLV(L,30),0);月CLOSE:=IF(DAY=月N,CLOSE,0);{MACD合并KDJ}月RSV:=(月CLOSE-LLV(月LOW,72))/(HHV(月HIGH,72)-LLV(月LOW,72))*100;月K:=SMA(月RSV,3,1),COLORWHITE ;月D:=SMA(月K,3,1),COLORYELLOW ;月J:=3*月K-2*月D ;{DRAWBAND(月K,RGB(255,0,0),月D,RGB(0,0,250));}周N:=WEEKDAY;周HIGH:=IF(WEEKDAY=周N,HHV(H,4),0);周LOW:=IF(WEEKDAY=周N,LLV(L,4),0);周CLOSE:=IF(WEEKDAY=周N,CLOSE,0);周RSV:=(周CLOSE-LLV(周LOW,45))/(HHV(周HIGH,45)-LLV(周LOW,45))*100;周K:=SMA(周RSV,3,1),COLORWHITE ;周D:=SMA(周K,3,1),COLORYELLOW ;周J:=3*周K-2*周D,COLORFFFFFF ;{DRAWBAND(周K,RGB(255,255,0),周D,RGB(0,100,200));}D1:=1;{15,POINTDOT,COLOR00FF00;}B:=C-MA250;DRAWICON((B>=0 AND CROSS(J,K) AND 月D>=50 AND 周D>=20 AND DIFF>=0),0,1);。

通达信KDJ.MACD日周月共振副图指标公式

通达信KDJ.MACD日周月共振副图指标公式

通达信KDJ.MACD日周月共振副图指标公式通达信KDJ.MACD日周月共振副图指标公式DIF60:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);DEA60:=EMA(DIF60,9/2);STICKLINE(DIF60>=DEA60,42,46,5,0),COLOR00BBBB;STICKLINE(DIF60<DEA60,42,46,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,44,'★60分钟MACD★'),COLORWHITE;DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);STICKLINE(DIF>=DEA,36,40,5,0),COLOR0000BB;STICKLINE(DIF<DEA,36,40,5,1),COLOR696969;DRAWTEXT(CURRBARSCO UNT=13,38,'★MACD日线★'),COLOR00FFFF;周MD:=MACD.DIF#WEEK;周MA:=MACD.DEA#WEEK;STICKLINE(周MD>=周MA,30,34,5,0),COLORBB00BB;STICKLINE(周MD<周MA,30,34,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,32,'★MACD周线★'),COLOR00FFFF;月MD:=MACD.DIF#MONTH;月MA:=MACD.DEA#MONTH;STICKLINE(月MD>=月MA,24,28,5,0),COLORBBBB00;STICKLINE(月MD<月MA,24,28,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,26,'★月MACD★'),COLORWHITE;RSV60:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36));K60:=SMA(RSV60,3,1);D60:=SMA(K60,3,1);STICKLINE(K60>= D60,18,22,5,0),COLOR00FFFF;STICKLINE(K60 < D60,18,22,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,20,'★60分钟KDJ★ '),COLORFF00FF;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;STICKLINE(K>=D,12,16,5,0),COLOR0000FF;STICKLINE(K<D,12,16,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,14,'★KDJ日线★'),COLORFFFFFF;周K:="KDJ.K#WEEK" ;周D:="KDJ.D#WEEK" ;STICKLINE(周K>=周D,6,10,5,0),COLORFF00FF;STICKLINE(周K<周D,6,10,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,8,'★KDJ周线★'),COLORWHITE;月K:="KDJ.K#MONTH" ;月D:="KDJ.D#MONTH" ;STICKLINE(月K>=月D,0,4,5,0),COLORFF00FF;STICKLINE(月K<月D,0,4,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=13,2,'★KDJ月线★'),COLORWHITE;{原文链接:}。

MACD叠加KDJ通达信指标公式源码.docx

MACD叠加KDJ通达信指标公式源码.docx

受人委托,将MACD 叠加KDJ 合二为一.合成后的特点是MACD 与KDJ 较为协调,不会产生其屮任一副图的严重压缩.KDJ 只保留了 90天的数据,这个可以根据自己需要来调节.仅是模块,任由加工.MACD 是我在传统MACD 的基础上加了一条快速线,使原来的DIF 变成DEA,快速线则变成 DIF 了,柱子还是传统MACD 柱.这些都不是什么好东西,貝提供有需要的人参考.DIF:EMA(CLOSE Z 12)-EMA(CLOSE /26),COLORFFOOFF Z NODRAW;DEA:EMA(DIF,9),COLORCCC555,NODRAW;MACD:(DIF-DEA)*2,NODRAW;DIFT: =6*DIF-5*EMA(DIF,4);DEAT:=EMA(DIFT,4);MACDT:=(DIFT-DEAT)*2;跟庄器:IF(DIFT>0 AND MACD>0,DIFT,0)Z COLOROOOOCC Z NODRAW;DIX:(DIFT+DEA)/2,COLOROOFFFF,NODRAW;K:=n KDJ.K";D:=n KDJ.D H ;J:=“KDJ.J”;红天:IF(MACD>=0,BARSLAST(CROSS(MACD z O))+l z O)z COLOROOOOFF,NODRAW;绿天:IF(MACD<O z BARSLAST(CROSS(0,MACD))+l,0),COLOROOFFOO,NODRAW;红M2:IF(红 4184 <5 T TWO” llhlllllll [llllll lh. I Al SO71 iiOii .36 旳 86・ 362,9OOeC-9 37 1400 >4417046 3<天〉0,SUM(MACD,BARSLAST(CROSS(MACD,0))+1),0),COLOROOOOFF,NODRAW;绿M2:IF(绿天〉0,SUM(MACD z BARSLAST(CROSS(0,MACD))+l)z O),COLOROOFFOO,NODRAW;界面高:=CONST(H HV(DIF, 120))* 1.1;界面低:=CONST(H HV(DIF, 120))* 1.1;界而中轴:=CONST(IF(CONST((界面高+界面低)/2)>0,(界面高•界而低)/2+界而高,界而低+(界面高■界面低)/2));叠加界面髙:=IF(CONST((HHV(DIF,10)+LLV(DIF,10))/2)>0』,MAX(ABS(界面髙),ABS(界面低)));叠加界面低:=IF(CONST((HHV(DIF,10)+LLV(DIF,10))/2)>0,-MAX(ABS(界面高),ABS(界面低)),0);最人界面比例:=MAX(叠加界而高,叠加界而低);最小界面比例:=MIN(S加界而高,叠加界而低);叠加比例中轴:=(最大界面比例+最小界面比例)/2;壳加比例差值匸最大界面比例•最小界面比例;叠加指标中轴:=(100・0)/2;叠加指标差值:=(100-0);叠加平衡基值:=0;YY100:=IF(CURRBARSCOUNT<=60,((100-ft加指标中轴)*叠加比例差值/叠加指标差值+ 叠加比例中轴)+叠加平衡基值QRAWNULL);YY80:=IF(CURRBARSCOUNTv=60,((80•叠加指标中轴)*叠加比例差值/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);YY50:=IF(CURRBARSCOUNT<=60,((50-叠加指标中轴)*叠加比例差值/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);YY20:=IF(CURRBARSCOUNTv=60,((20•叠加指标中轴)*叠加比例差值/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);YY00:=IF(CURRBARSCOUNTv=60,((0 ■叠加指标中轴)*叠加比例差值/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);DRAWBAND(YY100,RGB(75,75,75)z YY80,DRAWNULL);DRAWBAND(YY80,RGB(40z75,40),YY50,DRAWNULL);DRAWBAND(YY50,RGB(75,75,40),YY20,DRAWNULL);DRAWBAND(YY20,RGB(0z0,155),YY00z DRAWNULL);KKYY:=IF(CURRBARSCOUNT<=60,((K-叠加指标中轴)*叠加比例差值/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);DDYY:=IF(CURRBARSCOUNTv=60,((D ■叠加指标中轴)*叠加比例差值/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);JJYY:=IF(CURRBARSCOUNTv=60,((J ■叠加指标中轴)*叠加比例差侑/叠加指标差值+叠加比例中轴)+叠加平衡基值QRAWNULL);DRAWBAND(DIF z RGB(60z60z60)z DIX,RGB(85,5,0));STICKLINE(MACD>0Z MACD,0,1.2Z1),COLORD088FF;STICKLINE(MACD>0 AND MACDT>=O z MACD z O z1.2z O),COLORD088FF;STICKLINE(MACD>0 AND MACD<REF(MACD,l),MACD z O,1.2z l),COLOREEEEAA; STICKLINE(MACD>0 AND MACDvREF(MACD,l) ANDMACDT<0,MACD Z0,1.2,0\COLOREEEEAA;STICKLINE(MACD<0,0,MACD,1.2Z1),COLOR999000;STICKLINE(MACD<0 AND MACDT<0Z0Z MACD,1.2,0)Z COLOR999000;STICKLINE(MACD<0 AND MACD>=REF(MACD,1),O,MACD,1.2,1),COLOR2255CC; STICKLINE(MACD<0 AND MACD>=REF(MACD,1) ANDMACDT>=0,0,MACD,1.2,0),COLOR770066;零下TJ:=IF(CROSS(0,DEA)Z1,0);DIF 金叉:=IF(DIF>0 AND CROSS(DIF,DEA),1,0);总金叉TJ:=IF(零下TJ Z SUM(DIF 金叉,0),0);最后金叉次:=HHV(总金叉TJ,0);总金叉次:=SUM(DIF金叉,0);轴上首金:IF(总金叉次•最后金叉次=1 AND总金叉次〉REF(总金叉次,1) AND LLV(DIF z5)>0 AND LLV(DIF,5)<0.6,HHV(MACD,20),0)z COLOR0000FF;零下TJ2:=IF(CROSS(0,DEA)Z1,0);DIF 死叉:=IF(DIF>0 AND CROSS(DEA,DIF),l z O);总死叉TJ:=IF(零下TJ2,SUM(DIF 死叉,0),0);最后死叉次:=HHV(总死叉TJ,0);总死叉次:=SUM(DIF死叉,0);轴上第1次死叉:=IF(总死叉次•最后死叉次=1 AND总死叉次>REF(总死叉次,1)丄0);死叉天:=IF(MACD<0 AND DIF>0,BARSLAST(轴上第 1 次死叉)+1,0);轻装上阵:IF(MACD>REF(MACD,1) AND REF(MACD<REF(MACD, 1), 1) AND BETWEEN(死叉天,1,15) AND REF(DIF>0 AND DIF<0.6,l),HHV(DIF,30)/2,0)Z COLORFFOOFF;IF(跟庄器〉0,IF(MACD>=0,・0.05,0.05),DRAWNULL),CIRCLEDOT,COLOROOOOCC 丄INETHICK2; DEA,COLOR0011EE,LINETHICK2;IF(DEA<REF(DEA,1),DEA Z DRAWNULL)Z COLOR005900Z LINETHICK2;DIF,COLORFFOOFF 丄INETHICK2;IF(DIFvREF(DIF,l),DIF,DRAWNULL),COLORDDDDDD 丄INETHICK2;DIX,COLOROOFFFF 丄INETHICK1;IF(DIX<REF(DIX Z1),DIX,DRAWNULL),COLORCCC555,LINETHICK1;DRAWICON(CROSS(DIX Z DIF),MACD*1.06Z1);DRAWICON(CROSS(DIF,DIX),MACD*1.06Z2);JJYY,COLORFFFOOO;KKYY,COLOROOFFOO;DDYY Z COLOROOFFFF;DRAWTEXT(ISLASTBAR,YY80Z VARCAT(,K:',VAR2STR(K Z2))),COLOROOFFOO; DRAWTEXT(ISLASTBAR,YY50Z VARCAT(,D:,Z VAR2STR(D,2)))Z COLOROOFFFF; DRAWTEXT(ISLASTBAR,YY20Z VARCAT(,J:,,VAR2STR(J,2))),COLORFFFOOO;。

【通达信】KDJMACD二合一

【通达信】KDJMACD二合一

【通达信】KDJMACD二合一(顶底判断、大盘动向、成本突破)-指标公式源码A:=CURRBARSCOUNT;A1:=DAY!=REF(DAY,1);A2:=BARSLAST(A1)+1;A3:=MA(C,A2);A4:=SUM(AMO,A2)/SUM(VOL,A2)/100;A5:=IF(CAPITAL>0,A4,A3);均价线:=IF(A<=CONST(A2),A5,DRAWNULL);分钟有效周期:=IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,DRAW NULL))));分时价:=TFILT(CLOSE,CURRBARSCOUNT,00,CURRBARSCOUNT,00);分时判断:=IF(分时价=DRAWNULL,1,IF(分钟有效周期=DRAWNULL,DRAWNULL,1)); {-----------------------------由MACD定位顶底-------------------------------}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);KX:=BARSSINCE(CLOSE);{←首次开盘价距金的天数}HHN:=CONST(HHV(DIFF,KX));HLN:=CONST(LLV(DEA,KX));RC1:=CONST((HHN+HLN)/2);SS:=((HHN-HLN)/200);MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1),COLOR669999;MACD顶部:=(100*SS+RC1)+-(-100*SS+RC1),COLORFF0033;MACD中轴:=0+-(-100*SS+RC1);DIFF修正:=DIFF+-(-100*SS+RC1),COLOR008080;DEA修正:=DEA+-(-100*SS+RC1),COLOR00FF00;MACD修正:=2*(DIFF修正-DEA修正)+MACD中轴,COLOR0000BB,NODRAW;MACD超跌:=CONST(LLV(MACD修正,KX));MACD超跌线:=IF(MACD超跌<MACD底部,MACD超跌,MACD底部);{----------------------利用MACD趋势进行精确顶底判断------------------------}顶部:=MACD顶部+-MACD超跌线;天际:=顶部*0.809;中轴:=MACD中轴+-MACD超跌线;海面:=顶部*0.191;底部:=MACD底部;{------------------------传统KDJ指标结合MACD优化---------------------------}RSVA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*顶部;{采用21日月线优化}K:SMA(RSVA,3,1),COLORFFFFFF,NODRAW;D:SMA(K,3,1),COLOR00FFFF,NODRAW;原J值参数:=3*K-2*D;JD:=IF(原J值参数<底部,底部,原J值参数);{J值底部钝化处理}J:IF(JD>顶部,顶部,JD),COLORFF00FF,NODRAW;{底部钝化处理后再进行顶部钝化处理}{---------------------------MACD多空量能判断-------------------------------}MACD多头:DIFF修正+-MACD超跌线,COLOR339999;空头:DEA修正+-MACD超跌线,COLOR00FF00;量能柱:2*(MACD多头-空头)+中轴,COLOR0000BB,NODRAW;超前DEA:=(EMA(MACD多头,7));超前MACD:=2*(MACD多头-超前DEA)+中轴;{-----------------------------------大盘动向-------------------------------}VAR1大盘:=LLV(LOW,13);VAR2大盘:=HHV(HIGH,13);VAR3大盘:=(SMA((CLOSE-VAR1大盘)/(VAR2大盘-VAR1大盘)*顶部,5,1))-顶部/2;VAR4大盘:=SMA((VAR2大盘-CLOSE)/(VAR2大盘-VAR1大盘)*顶部,5,1)-顶部/2; 大盘散户:=IF(VAR4大盘<底部,底部,VAR4大盘),COLOR408000;大盘主力:=IF(VAR3大盘<底部,底部,VAR3大盘),COLOR330088;{---------------------------------密集成本突破-----------------------------}最高获利参数:=顶部/100;VAR1C:=(COST(89)-COST(11))*最高获利参数;VAR2C:=(COST(99.9)-COST(1))*最高获利参数;单峰:=((1-VAR1C/VAR2C))*顶部;低密:=((COST(90)-COST(60))/VAR2C)*顶部;高密:=((COST(40)-COST(1))/VAR2C)*顶部;赢利:= (SMA(WINNER(AMOUNT/VOL/99),2,1))*顶部;活跃度:顶部-顶部/(1+EXPMA(HSL,21)),COLOR774455;{←CYF公众追涨热情指标}70%成本集中度:=IF(VAR1C>顶部,顶部,VAR1C),COLORFFFFFF;90%成本集中度:=IF(VAR2C>顶部,顶部,VAR2C),COLORFF0000;套牢筹码上升:=IF((单峰-赢利)>底部,(单峰-赢利),底部);个股散户:=IF(套牢筹码上升>顶部,顶部,套牢筹码上升),COLOR408000;散户:IF(个股散户=DRAWNULL,DRAWNULL,个股散户),COLOR408000;获利筹码上升:=IF((赢利-单峰)>底部,(赢利-单峰),底部);个股主力:=IF(获利筹码上升>顶部,顶部,获利筹码上升),COLOR330088;主力:IF(个股主力=DRAWNULL,DRAWNULL,个股主力),COLOR330088;{--------------------换手率,五日换手率辅助判断个股活跃度-------------------}换手:SUM(VOL,1)/CAPITAL*100,COLOR666666,NODRAW;⑤日换:SUM(VOL,5)/CAPITAL*100,COLOR999999,NODRAW;{----------------------密集成本突破指标筹码峰画线--------------------------}金色背景修边1:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,底部,3.05,0),COLOR003333;金色背景修边2:STICKLINE(C>0 AND CURRBARSCOUNT>=2,顶部,中轴,3.05,0),COLOR003333;金色背景补充:DRAWBAND(顶部,RGB(51,51,0),中轴,RGB(51,51,0));金色背景:DRAWBAND(顶部,RGB(51,51,0),底部,RGB(128,128,128));追涨热度峰紫色:DRAWBAND(活跃度,RGB(66,52,81),底部,RGB(204,0,0));高密峰墨蓝色:=DRAWBAND(高密,RGB(0,0,51),底部,RGB(0,0,255));低密峰纯蓝色:=DRAWBAND(低密,RGB(0,0,102),底部,RGB(0,0,255));90%成本峰:DRAWBAND(90%成本集中度,RGB(0,0,153),底部,RGB(0,0,153)); 70%成本峰:DRAWBAND(70%成本集中度,RGB(0,128,0),底部,RGB(255,255,255));散户峰绿色:DRAWBAND(散户,RGB(0,64,0),底部,RGB(204,0,0));主力峰红色:DRAWBAND(主力,RGB(102,26,51),底部,RGB(0,0,255));MACD多空趋势:DRAWBAND(MACD多头,RGB(204,51,51),空头,RGB(0,179,0)); MACD多头重画:DRAWBAND(MACD多头,RGB(153,153,51),MACD多头,RGB(153,153,51));MACD空头重画:DRAWBAND(空头,RGB(0,204,0),空头,RGB(0,204,0));{-------的通达信■新宝塔线■-----原码-----------}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); 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); 三平底翻金:=(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;主力启动线:=MA(V,5),COLORFFFFFF;主力洗盘线:=MA(V,35),COLOR00FFFF;资金异动线:=MA(V,135),COLORFF0000;{----------------------------买卖参考--------------------------------------}出击:=(CROSS(主力启动线,资金异动线) OR ((主力洗盘线 > 资金异动线) AND CROSS(主力启动线,主力洗盘线))),COLORYELLOW;启动:=(主力启动线>REF(主力启动线,1) AND (CROSS(VOL,主力启动线) AND (REF(VOL,1)<REF(资金异动线,1) OR REF(VOL,2)<REF(资金异动线,2)))),COLOR45AAEE;成立:=三平底翻金 AND (出击 OR 启动);买入提示:=IF(成立=1,海面*0.5,0) AND 分时判断=1;{------------------------顶部线,天际线,海面线,底部线重画-------------------}顶部线:DRAWBAND(顶部,RGB(51,0,255),顶部,RGB(51,0,255));天际线:DRAWBAND(天际,RGB(128,64,64),天际,RGB(128,64,64));海面线:DRAWBAND(海面,RGB(0,153,153),海面,RGB(0,153,153));{------------------------超前MACD多空量能柱--------------------------------}超前MACD红柱1:STICKLINE(超前MACD>=中轴,超前MACD,中轴,1.50,0),COLOR226688;超前MACD红柱2:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.95,0),COLOR4488BB;超前MACD红柱3:STICKLINE(超前MACD>=中轴,超前MACD,中轴,0.31,0),COLOR55AADD;超前MACD兰柱1:STICKLINE(超前MACD<=中轴,超前MACD,中轴,1.50,0),COLOR006600;超前MACD兰柱2:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.95,0),COLOR007700;超前MACD兰柱3:STICKLINE(超前MACD<=中轴,超前MACD,中轴,0.31,0),COLOR008800;{--------------------------MACD多空量能柱----------------------------------}MACD红柱1:STICKLINE(量能柱>=中轴,量能柱,中轴,1.5,0),COLOR000077; MACD红柱2:STICKLINE(量能柱>=中轴,量能柱,中轴,1.1,0),COLOR000088; MACD红柱3:STICKLINE(量能柱>=中轴,量能柱,中轴,0.6,0),COLOR000099; MACD红柱4:STICKLINE(量能柱>=中轴,量能柱,中轴,0.15,0),COLOR0000AA; MACD兰柱1:STICKLINE(量能柱<=中轴,量能柱,中轴,1.5,0),COLORAA6633; MACD兰柱2:STICKLINE(量能柱<=中轴,量能柱,中轴,1.1,0),COLORBB7744; MACD兰柱3:STICKLINE(量能柱<=中轴,量能柱,中轴,0.6,0),COLORCC8855; MACD兰柱4:STICKLINE(量能柱<=中轴,量能柱,中轴,0.15,0),COLORDD9966; {---------中轴线重画及顶部线,天际线,海面线,底部线,多空线文字说明-----------}中轴线:DRAWBAND(中轴,RGB(128,128,255),中轴,RGB(128,128,255));顶部线文字:DRAWTEXT(CURRBARSCOUNT=1,顶部*0.98,' 顶部线'),COLORFF0033;天际线文字:DRAWTEXT(CURRBARSCOUNT=1,天际*0.98,' 天际线'),COLOR404080;海面线文字:DRAWTEXT(CURRBARSCOUNT=1,海面,' 海面线'),COLOR999900; 底部线文字:DRAWTEXT(CURRBARSCOUNT=1,底部,' 底部线'),COLOR669999; 中轴线文字:DRAWTEXT(CURRBARSCOUNT=1,中轴,' 多空线'),COLORFF8080; {-------------------------------传统KDJ指标线重画--------------------------}D线重画:DRAWBAND(D,RGB(255,255,0),D*0.998,RGB(255,255,0));K线重画:DRAWBAND(K,RGB(255,255,255),K,RGB(255,255,255));J线重画:DRAWBAND(J,RGB(255,0,255),J,RGB(255,0,255));【通达信】KDJMACD二合一(顶底判断、大盘动向、成本突破)-指标公式效果图(文档来源:若水财经社区)。

通达信指标公式源码 超前MACD优化版 副图源码

通达信指标公式源码 超前MACD优化版 副图源码

DIFF:EMA(CLOSE,7) - EMA(CLOSE,19);DEA:EMA(DIFF,9);MACD:6*(DIFF-DEA),COLORSTICK;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);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(DEA,DIFF),1));D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);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));MACD底背:IF(B1>0,-0.1,0),COLORRED,POINTDOT;KDJ底背:IF(B2>0,-0.1,0),COLORCC0055,POINTDOT;RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;RSI顶背:IF(D3>0,0.1,0),COLORWHITE,POINTDOT;STICKLINE(B1>0,-0.2,0,2.5,1),COLORMAGENTA;STICKLINE(B2>0,-0.16,0,3.5,1),COLORCC0066;STICKLINE(B3>0,-0.18,0,5,1),COLORYELLOW;STICKLINE(D1>0,0.2,0,2.5,0),COLOR00FF00;STICKLINE(D2>0,0.18,0,3.5,0),COLORFFCC66;STICKLINE(D3>0,0.16,0,6,0),COLORWHITE;STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORRED; STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0,1),COLORCYAN; STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORGREEN; STICKLINE(MACD>=REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORMAGENTA; STICKLINE(C>0,0,0,50,1),COLORBLUE;DIFF,COLORGREEN;DEA,COLORYELLOW;强:IF(DIFF>MA(DIFF,2),DIFF,DRAWNULL),COLORRED;弱:IF(DEA>MA(DEA,2),DEA,DRAWNULL),COLORMAGENTA;{大盘神针}UAR1:=INDEXA/100000000;UAR2:=INDEXADV;UAR3:=INDEXDEC;UAR4:=UAR2/(UAR2+UAR3);UAR5:=UAR3/(UAR2+UAR3);UAR6:=EMA(UAR4,3);UAR7:=EMA(UAR5,3);UAR8:=EMA(UAR6,5);UAR9:=EMA(UAR7,5);进场资金: EMA(UAR8,10)/150 ;资金: EMA(UAR9,10)/150;大盘神针:=(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,3)),7,1)*100< 20ANDSMA(MAX(CLOSE-REF(CLOSE,3),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,3)),13,1)*100<25 AND MA((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45))*100,5)>-19AND (LOW>LLV(LOW,5) AND (CLOSE-HHV(CLOSE,8))/HHV(CLOSE,8)<-0.05 ANDMA(AMOUNT,125)/MA(VOL,125)/(MA(AMOUNT,5)/MA(VOL,5))>1.12))*0.75;买入:=BARSLAST(大盘神针)<15 AND CROSS(MACD.DIF,MACD.DEA);底:=BARSLAST(LLV(L,4)=LLV(L,120))<5 ;均线买:=CROSS(MA(C,5),MA(C,20));买:=(底AND 均线买AND (进场资金>资金) OR 买入);STICKLINE(买,资金-1.35,资金-1.5,2,0),COLORYELLOW;DRAWTEXT(买,资金-1.28,'买'),COLORYELLOW;安全区:STICKLINE(底,资金-0.01,资金,0.04,1),COLORRED;{黄雀}短线趋势:=(EMA(C,7) - EMA(C,13));中线趋势:=EMA(短线趋势,13);VAR4:=MA(C,7);VAR5:=MA(C,13);VAR6:=MA(C,34);VAR7:=MA(C,55);VAR10:=((0 - ((10 * (HHV(C,5) - C)) / (HHV(C,5) - LLV(L,5)))) + 10);VAR11:=((0 - ((10 * (HHV(C,13) - C)) / (HHV(C,13) - LLV(L,13)))) + 10);VAR12:=((0 - ((10 * (HHV(C,21) - C)) / (HHV(C,21) - LLV(L,21)))) + 10);VAR13:=((0 - ((10 * (HHV(C,34) - C)) / (HHV(C,34) - LLV(L,34)))) + 10);VAR14:=REF(中线趋势,1);VAR15:=中线趋势;VAR16:=(VAR15 - VAR14);VAR17:=REF(短线趋势,1);VAR18:=短线趋势;VAR19:=(VAR18 - VAR17);VARE:=(SUM(((C * VOL) * 10),34) / SUM((VOL * 200),34));VARF:=(INTPART((VARE * 10)) / 10);吃货:(((((((O<= VAR4) AND (O<= VAR5)) AND (O<= VAR6)) AND (C>= VAR4)) AND (C>= VARF)) AND (VAR16 > 0)) AND (VAR19 > 0)),LINETHICK0;DRAWBAND (0>吃货,RGB(0,0,0),0<吃货,RGB(200,0,10)),NODRAW;STICKLINE (吃货,-1.75,-1.60,5,1),COLORCC0099;{抄}STICKLINE((DMI.PDI(14,6)<5 AND DMI.ADX(14,6)>70),1.5,-1.5,0,-1),COLORRED; DRAWTEXT (抄,-1.58,'抄'),COLORRED;{一阳二阴}VAR1:=3;VAR2:=((3 * SMA((((CLOSE - LLV(LOW,89)) / (HHV(HIGH,89) - LLV(LOW,89))) * 100),5,1))- (2 * SMA(SMA((((CLOSE - LLV(LOW,89)) / (HHV(HIGH,89) - LLV(LOW,89))) * 100),5,1),3,1)));大赚小赔:1.5*IF(CROSS(VAR2,VAR1),-0.89,-1),COLORRED,LINETHICK1;{黄金坑}RR8:=MA(CLOSE,27);RR9:=(CLOSE-RR8)/RR8*100;RRA:=MA(RR9,2);RRB:=BARSLAST(CROSS(-10,RRA)=1);RRD:=RRA<-10 AND RRB>3;黄金坑:0.01*IF(RRD,-300,1),COLORYELLOW,LINETHICK2;{神秘买点}SM01:=MA((2*C+H+L)/4,5);SM02:=SM01*(200-102)/100;SM03:=(1-7/100)*DMA(C,ABS((2*C+H+L)/4-MA(C,20))/MA(C,20));SM04:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;SM05:=3*SMA(SM04,3,1)-2*SMA(SMA(SM04,3,1),3,1);SM06:=((H+L+C)/3-MA((H+L+C)/3,14))/(0.015*AVEDEV((H+L+C)/3,14));SM07:=SM02<SM03&&SM05>REF(SM05,1)&&REF(SM05,1)<REF(SM05,2)&&SM06<-100 &&SM06>REF(SM06,1);神秘买点:IF(SM07*0.35,-1.3,-1.5),COLORCC0099,LINETHICK1;{止盈}转折周期:=7;转折灵敏:=50;TTR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),转折周期,1);HD:=HIGH-REF(HIGH,1);LD:=REF(LOW,1)-LOW;DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),转折周期,1);DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),转折周期,1);正DI:=DMP*100/TTR,COLORRED;负DI:=DMM*100/TTR,COLORGREEN;转折点:SMA(ABS(负DI-正DI)/(负DI+正DI)*100,转折周期,1),NODRAW;转折点A:=FILTER(转折点<REF(转折点,1)-1.3 AND EVERY(REF(转折点,1)>=REF(转折点,2)-1.3,5) AND REF(转折点,1)>转折灵敏,5);STICKLINE(转折点A AND REF(正DI>负DI,1),1.5,-1.5,0,-1),COLORGREEN; DRAWTEXT (转折点A AND REF(正DI>负DI,1),1.45,'止'),COLORGREEN;顶:1.5*IF(LAST(MA(C,5)>MA(C,10),5,0) AND "I"<REF("I",1) AND CROSS(100,"I"),0.9,1),COLORWHITE;N:=38;N1:=5;N2:=13;WAR1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;X: SMA(WAR1,7,1),LINETHICK1,NODRAW;WAR2:=SMA(X,5,1);Y: IF(CROSS(X,WAR2) AND CROSS(MA(C,N1),MA(C,N2) AND X>50) ,WAR2*2,WAR2),COLORYELLOW,NODRAW;WAR4:= EMA(CLOSE,8);WAR5:= EMA(CLOSE,20);黑码上山:IF(CROSS(MA(CLOSE,1),MA(CLOSE,N)) AND X-Y>2 AND WAR4>WAR5 ,WAR2*2,WAR2),COLOR00FF00,NODRAW;入:=(CROSS(MA(CLOSE,1),MA(CLOSE,N)) AND X-Y>2 AND WAR4>WAR5 );排序:IF(入>0,2,0), STICK,COLORCC0099;DRAWICON(排序>0,2,1);STICKLINE(X>WAR2,X,Y,0,0), , COLORF00FF0,NODRAW;STICKLINE(X<WAR2,X,WAR2,0,0), ,COLOR00FF00,NODRAW ;。

MACD和KDJ四周期叠加通达信指标公式源码

MACD和KDJ四周期叠加通达信指标公式源码

MACD和KDJ四周期叠加(副图指标)周期叠加副图:是MACD和KDJ四周期叠加(有未来函数)的一个副图工具,尤其到熊市是最好的的炒股利器,本人也是理想网下载的,用的很好,至于(有未来函数),仁者见仁,智者见智。

DIF60:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);DEA60:=EMA(DIF60,9/2);STICKLINE(DIF60>=DEA60,42,46,5,0),COLOR9A5CE4;STICKLINE(DIF60<DEA60,42,46,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,44,'☆60分钟MACD☆'),COLOR00FFFF;DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);STICKLINE(DIF>=DEA,36,40,5,0),COLOR8840DF;STICKLINE(DIF<DEA,36,40,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,38,'☆MACD日线☆'),COLOR00FFFF;周MD:=MACD.DIF#WEEK;周MA:=MACD.DEA#WEEK;STICKLINE(周MD>=周MA,30,34,5,0),COLOR7523D8;STICKLINE(周MD<周MA,30,34,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,32,'☆MACD周线☆'),COLOR00FFFF;月MD:=MACD.DIF#MONTH;月MA:=MACD.DEA#MONTH;STICKLINE(月MD>=月MA,24,28,5,0),COLOR5E1DAD;STICKLINE(月MD<月MA,24,28,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,26,'☆MACD月线☆'),COLOR00FFFF;RSV60:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36));K60:=SMA(RSV60,3,1);D60:=SMA(K60,3,1);STICKLINE(K60>= D60,18,22,5,0),COLORE927AE;STICKLINE(K60 < D60,18,22,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,20,'☆60分钟KDJ☆'),COLOR00FFFF;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;STICKLINE(K>=D,12,16,5,0),COLORD3169B;STICKLINE(K<D,12,16,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,14,'☆KDJ日线☆'),COLOR00FFFF;周K:="KDJ.K#WEEK" ;周D:="KDJ.D#WEEK" ;STICKLINE(周K>=周D,6,10,5,0),COLORC0148C;STICKLINE(周K<周D,6,10,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,8,'☆KDJ周线☆'),COLOR00FFFF;月K:="KDJ.K#MONTH" ;月D:="KDJ.D#MONTH" ;STICKLINE(月K>=月D,0,4,5,0),COLORA61179;STICKLINE(月K<月D,0,4,5,1),COLOR696969;DRAWTEXT(CURRBARSCOUNT=16,2,'☆KDJ月线☆'),COLOR00FFFF;。

通达信指标公式源码 超前MACD优化版 副图源码

通达信指标公式源码 超前MACD优化版 副图源码

DIFF:EMA(CLOSE,7) - EMA(CLOSE,19);DEA:EMA(DIFF,9);MACD:6*(DIFF-DEA),COLORSTICK;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);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(DEA,DIFF),1));D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);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));MACD底背:IF(B1>0,-0.1,0),COLORRED,POINTDOT;KDJ底背:IF(B2>0,-0.1,0),COLORCC0055,POINTDOT;RSI底背:IF(B3>0,-0.1,0),COLORYELLOW,POINTDOT;MACD顶背:IF(D1>0,0.1,0),COLOR00FF00,POINTDOT;KDJ顶背:IF(D2>0,0.1,0),COLORFFCC66,POINTDOT;RSI顶背:IF(D3>0,0.1,0),COLORWHITE,POINTDOT;STICKLINE(B1>0,-0.2,0,2.5,1),COLORMAGENTA;STICKLINE(B2>0,-0.16,0,3.5,1),COLORCC0066;STICKLINE(B3>0,-0.18,0,5,1),COLORYELLOW;STICKLINE(D1>0,0.2,0,2.5,0),COLOR00FF00;STICKLINE(D2>0,0.18,0,3.5,0),COLORFFCC66;STICKLINE(D3>0,0.16,0,6,0),COLORWHITE;STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORRED; STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0,1),COLORCYAN; STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORGREEN; STICKLINE(MACD>=REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORMAGENTA; STICKLINE(C>0,0,0,50,1),COLORBLUE;DIFF,COLORGREEN;DEA,COLORYELLOW;强:IF(DIFF>MA(DIFF,2),DIFF,DRAWNULL),COLORRED;弱:IF(DEA>MA(DEA,2),DEA,DRAWNULL),COLORMAGENTA;{大盘神针}UAR1:=INDEXA/100000000;UAR2:=INDEXADV;UAR3:=INDEXDEC;UAR4:=UAR2/(UAR2+UAR3);UAR5:=UAR3/(UAR2+UAR3);UAR6:=EMA(UAR4,3);UAR7:=EMA(UAR5,3);UAR8:=EMA(UAR6,5);UAR9:=EMA(UAR7,5);进场资金: EMA(UAR8,10)/150 ;资金: EMA(UAR9,10)/150;大盘神针:=(SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,3)),7,1)*100< 20ANDSMA(MAX(CLOSE-REF(CLOSE,3),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,3)),13,1)*100<25 AND MA((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45))*100,5)>-19AND (LOW>LLV(LOW,5) AND (CLOSE-HHV(CLOSE,8))/HHV(CLOSE,8)<-0.05 ANDMA(AMOUNT,125)/MA(VOL,125)/(MA(AMOUNT,5)/MA(VOL,5))>1.12))*0.75;买入:=BARSLAST(大盘神针)<15 AND CROSS(MACD.DIF,MACD.DEA);底:=BARSLAST(LLV(L,4)=LLV(L,120))<5 ;均线买:=CROSS(MA(C,5),MA(C,20));买:=(底AND 均线买AND (进场资金>资金) OR 买入);STICKLINE(买,资金-1.35,资金-1.5,2,0),COLORYELLOW;DRAWTEXT(买,资金-1.28,'买'),COLORYELLOW;安全区:STICKLINE(底,资金-0.01,资金,0.04,1),COLORRED;{黄雀}短线趋势:=(EMA(C,7) - EMA(C,13));中线趋势:=EMA(短线趋势,13);VAR4:=MA(C,7);VAR5:=MA(C,13);VAR6:=MA(C,34);VAR7:=MA(C,55);VAR10:=((0 - ((10 * (HHV(C,5) - C)) / (HHV(C,5) - LLV(L,5)))) + 10);VAR11:=((0 - ((10 * (HHV(C,13) - C)) / (HHV(C,13) - LLV(L,13)))) + 10);VAR12:=((0 - ((10 * (HHV(C,21) - C)) / (HHV(C,21) - LLV(L,21)))) + 10);VAR13:=((0 - ((10 * (HHV(C,34) - C)) / (HHV(C,34) - LLV(L,34)))) + 10);VAR14:=REF(中线趋势,1);VAR15:=中线趋势;VAR16:=(VAR15 - VAR14);VAR17:=REF(短线趋势,1);VAR18:=短线趋势;VAR19:=(VAR18 - VAR17);VARE:=(SUM(((C * VOL) * 10),34) / SUM((VOL * 200),34));VARF:=(INTPART((VARE * 10)) / 10);吃货:(((((((O<= VAR4) AND (O<= VAR5)) AND (O<= VAR6)) AND (C>= VAR4)) AND (C>= VARF)) AND (VAR16 > 0)) AND (VAR19 > 0)),LINETHICK0;DRAWBAND (0>吃货,RGB(0,0,0),0<吃货,RGB(200,0,10)),NODRAW;STICKLINE (吃货,-1.75,-1.60,5,1),COLORCC0099;{抄}STICKLINE((DMI.PDI(14,6)<5 AND DMI.ADX(14,6)>70),1.5,-1.5,0,-1),COLORRED; DRAWTEXT (抄,-1.58,'抄'),COLORRED;{一阳二阴}VAR1:=3;VAR2:=((3 * SMA((((CLOSE - LLV(LOW,89)) / (HHV(HIGH,89) - LLV(LOW,89))) * 100),5,1))- (2 * SMA(SMA((((CLOSE - LLV(LOW,89)) / (HHV(HIGH,89) - LLV(LOW,89))) * 100),5,1),3,1)));大赚小赔:1.5*IF(CROSS(VAR2,VAR1),-0.89,-1),COLORRED,LINETHICK1;{黄金坑}RR8:=MA(CLOSE,27);RR9:=(CLOSE-RR8)/RR8*100;RRA:=MA(RR9,2);RRB:=BARSLAST(CROSS(-10,RRA)=1);RRD:=RRA<-10 AND RRB>3;黄金坑:0.01*IF(RRD,-300,1),COLORYELLOW,LINETHICK2;{神秘买点}SM01:=MA((2*C+H+L)/4,5);SM02:=SM01*(200-102)/100;SM03:=(1-7/100)*DMA(C,ABS((2*C+H+L)/4-MA(C,20))/MA(C,20));SM04:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;SM05:=3*SMA(SM04,3,1)-2*SMA(SMA(SM04,3,1),3,1);SM06:=((H+L+C)/3-MA((H+L+C)/3,14))/(0.015*AVEDEV((H+L+C)/3,14));SM07:=SM02<SM03&&SM05>REF(SM05,1)&&REF(SM05,1)<REF(SM05,2)&&SM06<-100 &&SM06>REF(SM06,1);神秘买点:IF(SM07*0.35,-1.3,-1.5),COLORCC0099,LINETHICK1;{止盈}转折周期:=7;转折灵敏:=50;TTR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),转折周期,1);HD:=HIGH-REF(HIGH,1);LD:=REF(LOW,1)-LOW;DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),转折周期,1);DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),转折周期,1);正DI:=DMP*100/TTR,COLORRED;负DI:=DMM*100/TTR,COLORGREEN;转折点:SMA(ABS(负DI-正DI)/(负DI+正DI)*100,转折周期,1),NODRAW;转折点A:=FILTER(转折点<REF(转折点,1)-1.3 AND EVERY(REF(转折点,1)>=REF(转折点,2)-1.3,5) AND REF(转折点,1)>转折灵敏,5);STICKLINE(转折点A AND REF(正DI>负DI,1),1.5,-1.5,0,-1),COLORGREEN; DRAWTEXT (转折点A AND REF(正DI>负DI,1),1.45,'止'),COLORGREEN;顶:1.5*IF(LAST(MA(C,5)>MA(C,10),5,0) AND "I"<REF("I",1) AND CROSS(100,"I"),0.9,1),COLORWHITE;N:=38;N1:=5;N2:=13;WAR1:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*80;X: SMA(WAR1,7,1),LINETHICK1,NODRAW;WAR2:=SMA(X,5,1);Y: IF(CROSS(X,WAR2) AND CROSS(MA(C,N1),MA(C,N2) AND X>50) ,WAR2*2,WAR2),COLORYELLOW,NODRAW;WAR4:= EMA(CLOSE,8);WAR5:= EMA(CLOSE,20);黑码上山:IF(CROSS(MA(CLOSE,1),MA(CLOSE,N)) AND X-Y>2 AND WAR4>WAR5 ,WAR2*2,WAR2),COLOR00FF00,NODRAW;入:=(CROSS(MA(CLOSE,1),MA(CLOSE,N)) AND X-Y>2 AND WAR4>WAR5 );排序:IF(入>0,2,0), STICK,COLORCC0099;DRAWICON(排序>0,2,1);STICKLINE(X>WAR2,X,Y,0,0), , COLORF00FF0,NODRAW;STICKLINE(X<WAR2,X,WAR2,0,0), ,COLOR00FF00,NODRAW ;。

通达信主图叠加MACD和KDJ主图公式源码

通达信主图叠加MACD和KDJ主图公式源码

通达信主图叠加MACD和KDJ主图公式源码DE:=CONST(LLV(L,90));JI:=CONST(HHV(H,90))-DE;DE_K:=DE+JI/3*2;JI_K:=JI/2;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;DE_A:=CONST(LLV(RSV,90));DD_A:=CONST(HHV(RSV,90))-DE_A;R:=(RSV-DE_A)/DD_A;RSV1:=R*JI_K+DE_K;K:SMA(RSV1,3,1);D:SMA(K,3,1);J:3*K-2*D;DE_M:=DE+JI/3;JI_M:=JI/2;KDL:=CONST(LLV(EMA(C,26),90));KDH:=CONST(HHV(EMA(C,26),90))-KDL;R_K1:=(EMA(C,12)-KDL)/KDH;R_K2:=(EMA(C,26)-KDL)/KDH;DIF~:(R_K1-R_K2)*JI*1.5+DE_M;DEA~:EMA(DIF~,9);MACD~:=(DIF~-DEA~)*2+DE_M;STICKLINE(MACD~>=DE_M,MACD~,DE_M,0,0),COLORLIBLU E;D_1:=MACD~>H AND H>=DE_M AND DE_M>=L;D_2:=MACD~>H AND H>=L AND L>DE_M;D_3:=H>MACD~ AND MACD~>=L AND L>DE_M;D_4:=H>MACD~ AND MACD~>DE_M AND DE_M>=L;STICKLINE(D_1>0,H,DE_M,0,0),COLORYELLOW;STICKLINE(D_2,H,L,0,0),COLORYELLOW;STICKLINE(D_3,MACD~,L,0,0),COLORYELLOW;STICKLINE(D_4,MACD~,DE_M,0,0),COLORYELLOW;D_5:=MACD~<L AND L<=DE_M AND DE_M<=H;D_6:=MACD~<L AND H<DE_M;D_7:=L<MACD~ AND MACD~<=H AND H<DE_M;D_8:=L<MACD~ AND MACD~<DE_M AND DE_M<=H;STICKLINE(MACD~<DE_M,DE_M,MACD~,0,0),COLORAA00A A;STICKLINE(D_5,DE_M,L,0,0),COLORYELLOW;STICKLINE(D_6,H,L,0,0),COLORYELLOW;STICKLINE(D_7,H,MACD~,0,0),COLORYELLOW;STICKLINE(D_8,DE_M,MACD~,0,0),COLORYELLOW;L_00:DE_K;L_20:JI_K/5+DE_K;L_80:JI_K*4/5+DE_K;L_100:JI_K+DE_K;{拐点}Z:ZIG(3,50/5),DOTLINE,COLORD2691E;G:MA(Z,5),DOTLINE,COLOR4B0082;S:=CROSS(Z,G);W:=CROSS(G,Z);DRAWTEXT(W=1,Z*1.01,'∩S∩');DRAWTEXT(S=1,Z*0.99,'∪B∪');使用说明:拐点指标趋势线向上时,每次回调都是介入时机,拐点指标趋势线向下时,每次反弹都是卖出时机,配合KDJ指标,哪是反弹哪是回调就更加清楚;拐点指标B,G两条趋势线只要有角度上升不变,就可根据KDJ指标买卖或选股。

通达信指标公式源码彩色MACD指标副图源码

通达信指标公式源码彩色MACD指标副图源码

通达信指标公式源码彩色MACD指标副图源码[object Object]彩色MACD指标是一种技术分析指标,用于判断股票或其他金融资产价格的趋势和买卖信号。

它是在传统的MACD指标基础上进行改进,通过在MACD指标的柱状图上添加颜色来增加指标的可读性和直观性。

下面是通达信软件中彩色MACD指标的源码:```python#定义彩色MACD指标函数def Colorful_MACD(ema1, ema2, dea, color1, color2):DIFF = ema1 - ema2DEA = deaMACD=2*(DIFF-DEA)color = [color1 if diff >= 0 else color2 for diff in DIFF]return MACD, DIFF, DEA, color#使用彩色MACD指标函数计算指标数值MACD, DIFF, DEA, color = Colorful_MACD(EMA(CLOSE, 12),EMA(CLOSE, 26), EMA(MACD, 9), COLORRED, COLORGREEN)#绘制彩色MACD指标副图PlotBar(MACD, DIFF, DEA, 0, color, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)```上述代码中,Colorful_MACD函数用于计算彩色MACD指标的数值。

函数的输入参数分别为短期指数移动平均(EMA)和长期EMA的数值,以及MACD的DEA数值。

函数根据DIFF(短期EMA减去长期EMA)的正负来确定颜色,如果DIFF大于等于0,则使用color1(例如COLORRED)作为颜色,否则使用color2(例如COLORGREEN)作为颜色。

函数的输出为MACD、DIFF、DEA和color四个变量。

通达信指标公式源码 macd副图指标,逃顶抄底,买卖利器

通达信指标公式源码 macd副图指标,逃顶抄底,买卖利器

RSV:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*100;DIF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIF,9);MACD:(DIF-DEA)*2,COLORSTICK;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);DEA1:=EMA(DIFF,9);MACD1:=2*(DIFF-DEA1),COLORSTICK,LINETHICK2;趋势:=MA(MACD,1);DRAWICON(MACD1>REF(MACD1,1) AND 趋势>0 ,趋势,1);低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=(3*K-2*D);DRAWTEXT(二次金叉,DEA*1,'低二叉'),COLORYELLOW;周DIF:="MACD.DIF#WEEK"(12,26,9);周DEA:="MACD.DEA#WEEK"(12,26,9);周MACD:="MACD.MACD#WEEK"(12,26,9);DIF周金叉:=CROSS(周DIF,周DEA);DRAWTEXT(DIF周金叉,0,'周叉'),COLORYELLOW;DRAWTEXT(CROSS(周DEA,周DIF),0,'周死'),COLORGREEN;MACD周金叉:=CROSS(周MACD,周DIF) AND 周MACD>=(0-0.05) AND 周MACD<=0.02; VARR:=EMA(EMA(CLOSE,13),13);控盘:=(VARR-REF(VARR,1))/REF(VARR,1)*1000;A10:=CROSS(控盘,0);控盘B:=FILTER(IF(A10,1,0),5);JJ:=DYNAINFO(11);P:=55;S:=8;M1:=3;刘:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10;剑:=EMA(刘,M1);BTJ11:=(C-JJ)/JJ<-0.03;BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;BTJ3:=CROSS(刘,剑) AND 刘<-0.3;BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);庄:= BTJ11 AND BTJ2 AND BTJ3;有庄:=FILTER(庄,55),COLORWHITE;DRAWTEXT(BTJ811,-0.2,'★有庄'),COLORYELLOW;DRAWTEXT(CROSS(J,-3),DIF,'出击'),COLORWHITE;A1:=BARSLAST(REF(CROSS(EMA(CLOSE,12)-EMA(CLOSE,26),EMA(EMA(CLOSE,12)-EMA( CLOSE,26),9)),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND EMA(CLOSE,12)-EMA(CLOSE,26)>REF(EMA(CLOSE,12)-EMA(CLOSE,26),A1+1) AND CROSS(EMA(CLOSE,12)-EMA(CLOSE,26),EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9));底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORMAGENTA,LINETHICK2;A2:=BARSLAST(REF(CROSS(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),EMA(CLOSE,12)-E MA(CLOSE,26)),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(EMA(CLOSE,12)-EMA(CLOSE,26),A2+1)>EMA(CLOSE,12)-EMA(CLOSE,26) AND CROSS(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),EMA(CLOSE,12)-EMA(CLOSE,26));顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;。

通达信指标公式源码 组合智能KDJ 副图源码

通达信指标公式源码 组合智能KDJ 副图源码

源码:VAR1:=REF(LOW,1);VAR2:=SMA(ABS(LOW-VAR1),3,1)/SMA(MAX(LOW-VAR1,0),3,1)*100; VAR3:=EMA(IF(CLOSE*1.2,VAR2*10,VAR2/10),3);VAR4:=LLV(LOW,38);VAR5:=HHV(VAR3,38);VAR6:=IF(LLV(LOW,90),1,0);VAR7:=EMA(IF(LOW<=VAR4,(VAR3+VAR5*2)/2,0),3)/618*VAR6; VAR8:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;VAR9:=SMA(VAR8,13,8);底线:0,COLOR00FFFF;主力吸货:VAR7,COLOR0000FF;吸筹1:STICKLINE(VAR7,0,VAR7,6,0),COLOR0000FF;吸筹2:STICKLINE(VAR7,0,VAR7,5,0),COLOR6600FF;吸筹3:STICKLINE(VAR7,0,VAR7,4,0),COLORBB00FF;吸筹4:STICKLINE(VAR7,0,VAR7,3,0),COLORFF00FF;吸筹5:STICKLINE(VAR7,0,VAR7,2,0),COLORFF33FF;吸筹6:STICKLINE(VAR7,0,VAR7,1,0),COLORFF66FF;吸筹7:STICKLINE(VAR7,0,VAR7,0,0),COLORFF99FF;BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;乖离:=MA(BIAS,3);抄底:IF(乖离<-12 AND 乖离>=-18,-4,0), COLORCYAN,LINETHICK1; STICKLINE(乖离<-12 AND 乖离>=-18,2,0,6,0) , COLORCYAN;抄底二:IF(乖离<-18,3,0),COLORFF35FF,LINETHICK1;STICKLINE(乖离<-18,3,0,6,0),COLORFF35FF;抄底三:IF(乖离<-6,5,0),COLORRED,LINETHICK1;STICKLINE(乖离<-6,5,3,2,1),COLORRED;抄底四:IF(乖离<-4.5,0,0),COLOR00FFFF,LINETHICK1;STICKLINE(乖离<-4.5,0,1,3,1),COLOR00FFFF;VARA1:=DMA(CLOSE,VOL/MA(VOL,4)/4);VARA2:=DMA(CLOSE,VOL/MA(VOL,31)/31);VARA3:=(CLOSE-VARA1)/VARA1*100<-10;VARA4:=(VARA1-VARA2)/VARA2*100<-16;VARA5:=(CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100<-23;VARA6:=SMA(MAX(CLOSE-REF(CLOSE,1),0),3,1)/SMA(ABS(CLOSE-REF(CLOS E,1)),3,1)*100>16;VARA7:=100*(HHV(HIGH,27)-CLOSE)/(HHV(HIGH,27)-LLV(LOW,27)); VARA8:=INDEXC;VARA9:=MA(VARA8,6);VARA:=MA(VARA8,24);VARB:=MA(VARA8,32);VARC:=VARB>VARA9*1.11 AND VARA>VARA9*1.095;SSS:=(VARA3 AND VARA4 AND (OPEN-REF(CLOSE,1))/REF(CLOSE,1)>-0.07 OR VARA5 AND VARA6 AND CROSS(VARA7,79) OR VARC ANDCLOSE/COST(8)<=0.8)*100;抄底王:SSS>0,COLORWHITE,LINETHICK1;STICKLINE(SSS>0,0,6,6,0),COLORWHITE;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:SMA(RSV,3,1),COLORWHITE;D:SMA(K,3,1),COLORYELLOW;J:3*K-2*D,COLORMAGENTA;底: 20,LINETHICK1 ,POINTDOT, COLOR77AA1A;入顶: 80,LINETHICK2 ,POINTDOT , COLOR9966FF;大顶: 100,LINETHICK2 ,POINTDOT ,COLOR22A6E6;顶轴:105, POINTDOT,LINETHICK2;上轴:90, POINTDOT,LINETHICK2;下轴:10, POINTDOT,LINETHICK2;底轴:0, POINTDOT,LINETHICK2;抢钱轴:-10, POINTDOT,LINETHICK2;DRAWTEXT(CROSS(J,顶轴) ,100,'大出'), COLORYELLOW;DRAWTEXT(CROSS(J,上轴) ,90,'小出'), COLOR99FFCC;DRAWTEXT(CROSS(下轴,J) ,10,'小进'), COLORBLUE;DRAWTEXT(CROSS(底轴,J) ,0,'大进'), COLORRED;DRAWTEXT(CROSS(抢钱轴,J) ,-5,'狂进'), COLORWHITE;A01:=DYNAINFO(5); IF(K<REF(K,1),K,DRAWNULL),COLORGREEN,LINETHICK1;IF(D<REF(D,1),D,DRAWNULL),COLORCYAN,LINETHICK1;IF(J<REF(J,1),J,DRAWNULL),COLORFFFF00,LINETHICK1;IF(K>REF(K,1),K,DRAWNULL),COLORRED,LINETHICK1;IF(D>REF(D,1),D,DRAWNULL),COLORYELLOW,LINETHICK1;IF(J>REF(J,1),J,DRAWNULL),COLORFF00FF,LINETHICK1;小底:REF(IF((MA(C,5)-C)/C>0.04 AND(MA(C,10)-MA(C,5))/MA(C,5)>0.04,5,0),1),COLORYELLOW;A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19)+100 ;B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))+100;D1:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+1 00;大底:=(A<15 AND REF(A,1)<15 AND D1<18 AND B>REF(B,1) AND CROSS(B,A) AND B>D1AND (REF(B,1)<5 OR REF(B,2)<5 ) AND (D1>=A OR REF( B,1)<1 )); STICKLINE( 大底,0,10,11,0 ),COLORRED;DRAWTEXT(大底,11,'大底')COLORFF00FF;VARFN:=LOW*0.9;VAR11N:=EMA(VARFN,30);VAR12N:=CLOSE-REF(CLOSE,1);VAR13N:=MAX(VAR12N,0);VAR14N:=ABS(VAR12N);VAR15N:=SMA(VAR13N,7,1)/SMA(VAR14N,7,1)*100;VAR16N:=SMA(VAR13N,13,1)/SMA(VAR14N,13,1)*100;VAR17N:=BARSCOUNT(CLOSE);VAR18N:=SMA(MAX(VAR12N,0),6,1)/SMA(ABS(VAR12N),6,1)*100;VAR19N:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+10 0;VAR1AN:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1BN:=SMA((SMA(VAR1AN,4,1)-50)*2,3,1);VAR1CN:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*10 0;VAR1DN:=SMA(VAR1CN,4,1);VAR1EN:=SMA(VAR1DN,3,1);VAR1FN:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR20N:=VAR18N<=25 AND VAR19N<-95 AND VAR1FN>20 ANDVAR1BN<-30 AND VAR1EN<30AND VAR11N-CLOSE>=-0.25 AND VAR15N<22 AND VAR16N<28 ANDVAR17N>50;STICKLINE(VAR20N,0,70,1,0),COLORBLUE,LINETHICK3 ;DRAWTEXT(VAR20N,80,'★青龙出海!'),COLORBLUE; HP:=HHV(H,9);LP:=LLV(L,9);R:=(C-LP)/(HP-LP)*100;M:=MA(R,40);S:=STD(R,40);高:=M+2*S;中:=M;低:=M-2*S;【高】: 高,COLOR0099FF;【中】: 中,POINTDOT,COLORWHITE;【低】: 低,COLOR00FF00;。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档