股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 【斋主MACD通道】【斋主量交+DDX】(主副,源码,附图,zip)


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-10 20:10:58
【斋主MACD通道】【斋主量交+DDX】(主副,源码,附图,zip)介绍

【斋主MACD通道】【斋主量交+DDX】(主副,源码,附图,zip)

在此说明,【斋主MACD通道】主图本人重点是关注34号线的上下轨和支撑观察,而且本人已经在图中标明了10k线50k线的压力和支撑位,方便观察,其他用法你本人去参吧。

斋主MACD通道
{主图}

DIF:=EMA(CLOSE,60)-EMA(CLOSE,130);
DEA:=EMA(DIF,45);
MACD:=(DIF-DEA)*2,COLORSTICK;
{MACD}
RC:=DYNAINFO(3)*1.1;
DK:=MACD*2;
STICKLINE(DK<0 AND DK<REF(DK,1),DK+RC,RC,0.05,1),COLORLIBLUE;
STICKLINE(DK<0 AND DK>REF(DK,1),DK+RC,RC,0.05,1),COLORWHITE;
STICKLINE(DK>REF(DK,1) AND DK>0,DK+RC,RC,0.05,1),COLORRED;
STICKLINE(DK<REF(DK,1) AND DK>0,DK+RC,RC,0.05,1),COLOR00FF00;
VAR4S:=(2*CLOSE+HIGH+LOW)/4;
成本区:EMA(VAR4S,90)*0.995,,COLORYELLOW,POINTDOT{CIRCLEDOT};
GJZ:=(C+H+L+O)/4;
阻Z:=L+(GJZ-L)+(C-L);
支Z:=L+(C-GJZ);
NN:=100;
高点:=CONST(HHV(H,NN));
低点:=CONST(LLV(L,NN));
明日阻力:=L+(GJZ-L)+(C-L);
明日支撑:=L+(C-GJZ);
明日阻力2:=L+2*(GJZ-L)+(C-L);
明日支撑2:=L+(C-GJZ)-(GJZ-L);
今日阻力:=CONST(REF(明日阻力 , 1)),NODRAW;
今日支撑:=CONST(REF(明日支撑 , 1)),NODRAW;
今日阻力2:=CONST(REF(明日阻力2 , 1)),NODRAW;
今日支撑2:=CONST(REF(明日支撑2 , 1)),NODRAW;
STICKLINE(ISLASTBAR,今日阻力,今日阻力2,20,0),COLORGRAY;
STICKLINE(ISLASTBAR,今日支撑,今日支撑2,20,0),COLORGRAY;
MA60:=MA(CLOSE,60),COLORCYAN,LINETHICK2;
MA120:=MA(CLOSE,120),COLORCYAN,LINETHICK2;
LC:=REF(CLOSE,1);
VAR28Z:=SMA(MAX(CLOSE-LC,0),5.5,1)/SMA(ABS(CLOSE-LC),6,1)*100;
VARA00:=((AMOUNT)/(VOL))/(100);
VARAB00:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
VARAC00:=((SUM(AMOUNT,7))/(VARA00))/(100);
VARD0:=DMA(VARAB00,(VOL)/(VARAC00));
VARDE0:=((CLOSE-VARD0)/(VARD0))*(100);
VARDE0F:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
VARDE0JF:=MA(VARDE0,20)+STD(VARDE0,20);
BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
AA:=SMA(VARDE0F,3,1);
SS:=(REF(BIAS18,1)>=5) AND CROSS(VARDE0JF,VARDE0) AND (AA>79);
中轨:=MA(CLOSE,34)NODRAW;
上轨:=中轨*1.0618,CIRCLEDOT,COLORFF6600;
下轨:=中轨*0.89,CIRCLEDOT,COLOR6C6CFF;
顶轨:=中轨*1.191,COLORGREEN;
底轨:=中轨*0.809,COLORYELLOW;
DRAWBAND(中轨,RGB(250,150,0),REF(中轨,2),RGB(00,50,200));
DRAWBAND(顶轨,RGB(200,50,51),REF(顶轨*1.005,1),RGB(0,160,100));
DRAWBAND(底轨,RGB(200,50,51),REF(底轨*0.995,1),RGB(0,160,100));
DRAWBAND(上轨,RGB(60,60,0),上轨*1.005,RGB(50,100,60));
DRAWBAND(下轨,RGB(50,100,60),下轨*0.995,RGB(60,60,0));
VA1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VA2:=REF(VA1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA3:=REF(VA2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA4:=REF(VA3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA5:=REF(VA4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA6:=REF(VA5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA7:=REF(VA6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA8:=REF(VA7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA9:=REF(VA8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAA:=REF(VA9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAB:=REF(VAA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAC:=REF(VAB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(VA1 OR VA2 OR VA3 OR VA4 OR VA5 OR VA6 OR VA7 OR VA8 OR VA9 OR VAA OR VAB OR VAC,CLOSE,REF(CLOSE,1),3,0),COLORRED;
VAD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VAE:=REF(VAD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAF:=REF(VAE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA10:=REF(VAF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA11:=REF(VA10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA12:=REF(VA11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA13:=REF(VA12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA14:=REF(VA13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA15:=REF(VA14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA16:=REF(VA15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA17:=REF(VA16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA18:=REF(VA17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(VAD OR VAE OR VAF OR VA10 OR VA11 OR VA12 OR VA13 OR VA14 OR VA15 OR VA16 OR VA17 OR VA18,CLOSE,REF(CLOSE,1),3,0),COLORLIBLUE;
VA19:=REF(VAD OR VAE OR VAF OR VA10 OR VA11 OR VA12 OR VA13 OR VA14 OR VA15 OR VA16 OR VA17 OR VA18,1) AND VA1;
STICKLINE(VA19,REF(CLOSE,1),REF(CLOSE,2),3.4,0),COLORYELLOW;
VA1A:=REF(VA1 OR VA2 OR VA3 OR VA4 OR VA5 OR VA6 OR VA7 OR VA8 OR VA9 OR VAA OR VAB OR VAC,1) AND VAD;
STICKLINE(VA1A,REF(CLOSE,1),REF(CLOSE,2),3.4,0),COLORBLUE;
AA1:=3*SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1)-2*SMA(SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1),3,1);
加仓:=IF(CROSS(AA1,REF(AA1+0.01,1)) AND LLV(AA1,2)=LLV(AA1,8) AND BETWEEN(AA1,20,60),1,0);
波段底:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) -
(2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
江恩线144: EMA(CLOSE,144),COLORRED,LINETHICK2,POINTDOT;
日:=50;昨前:=3;
高1:=REF(HHV(H,10),昨前);
高2:=REF(HHV(H,日),昨前);
低:=REF(LLV(L,10),昨前);
低1:=REF(LLV(L,日),昨前);
十日压:REFDATE(高1,DATE),COLORGREEN,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,十日压,'10 K线内压力点位'),COLORGREEN;
五十日压:REFDATE(高2,DATE),COLORCYAN,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,五十日压,'50 K线内压力点位'),COLORCYAN;
十日支撑:REFDATE(低,DATE),LINETHICK1,COLORYELLOW,POINTDOT ;
DRAWTEXT(ISLASTBAR,十日支撑,'10 K线内支撑点位'),COLORYELLOW;
五十日支撑:REFDATE(低1,DATE),COLORRED,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,五十日支撑,'50 K线内支撑点位'),COLORRED;
VAR5:=IF(YEAR=2002 AND MONTH=6 AND DAY=28,1,0);
VAR6:=IF(YEAR=2002 AND MONTH=3 AND DAY=21,1,0);
VAR7:=IF(YEAR=2001 AND MONTH=12 AND DAY=5,1,0);
VAR8:=IF(YEAR=2001 AND MONTH=6 AND DAY=14,1,0);
VAR9:=IF(YEAR=2001 AND MONTH=1 AND DAY=11,1,0);
VARA:=IF(YEAR=2000 AND MONTH=11 AND DAY=23,1,0);
VARB:=IF(YEAR=2000 AND MONTH=8 AND DAY=22,1,0);
VARC:=IF(YEAR=2000 AND MONTH=4 AND DAY=21,1,0);
VARD:=IF(YEAR=1999 AND MONTH=6 AND DAY=30,1,0);
VARE:=IF(YEAR=1999 AND MONTH=4 AND DAY=9,1,0);
VARF:=IF(YEAR=1998 AND MONTH=11 AND DAY=17,1,0);
VAR10:=IF(YEAR=1998 AND MONTH=6 AND DAY=4,1,0);
VAR11:=IF(YEAR=1997 AND MONTH=5 AND DAY=12,1,0);
VAR12:=IF(YEAR=1996 AND MONTH=12 AND DAY=11,1,0);
VAR13:=IF(YEAR=1994 AND MONTH=9 AND DAY=13,1,0);
VAR14:=IF(YEAR=1993 AND MONTH=2 AND DAY=16,1,0);
VAR15:=IF(YEAR=1992 AND MONTH=5 AND DAY=26,1,0);
VAR16:=IF(YEAR=2003 AND MONTH=3 AND DAY=4,1,0);
VAR17:=IF(YEAR=2003 AND MONTH=4 AND DAY=16,1,0);
VAR18:=(CROSS(100,"KDJ.J"(9,3,3)) OR CROSS("KDJ.K"(9,3,3),"KDJ.J"(9,3,3))) AND "KDJ.D"(9,3,3)>75;
VAR19:=IF(YEAR>1990 AND YEAR<2003,0,1);
VAR1A:=IF(YEAR=2003 AND MONTH=1 AND DAY=3,1,0);
VAR1B:=IF(YEAR=2002 AND MONTH=6 AND DAY=6,1,0);
VAR1C:=IF(YEAR=2002 AND MONTH=1 AND DAY=29,1,0);
VAR1D:=IF(YEAR=2001 AND MONTH=10 AND DAY=22,1,0);
VAR1E:=IF(YEAR=2001 AND MONTH=2 AND DAY=22,1,0);
VAR1F:=IF(YEAR=2000 AND MONTH=9 AND DAY=26,1,0);
VAR20:=IF(YEAR=1999 AND MONTH=12 AND DAY=28,1,0);
VAR21:=IF(YEAR=1999 AND MONTH=5 AND DAY=17,1,0);
VAR22:=IF(YEAR=1999 AND MONTH=2 AND DAY=9,1,0);
VAR23:=IF(YEAR=1998 AND MONTH=8 AND DAY=18,1,0);
VAR24:=IF(YEAR=1998 AND MONTH=3 AND DAY=26,1,0);
VAR25:=IF(YEAR=1997 AND MONTH=2 AND DAY=20,1,0);
VAR26:=IF(YEAR=1994 AND MONTH=7 AND DAY=29,1,0);
VAR27:=IF(YEAR=2000 AND MONTH=5 AND DAY=15,1,0);
VAR28:=IF(YEAR=1996 AND MONTH=1 AND DAY=19,1,0);
VAR29:=IF(YEAR=1992 AND MONTH=11 AND DAY=20,1,0);
VAR2A:=IF(YEAR=2003 AND MONTH=3 AND DAY=26,1,0);
VAR2B:=IF(YEAR=2003 AND MONTH=5 AND DAY=13 AND CLOSE>200,1,0);
VAR2C:=MA(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),5)*VAR19;
VAR2D:=5;
VAR2E:=CROSS(VAR2C,VAR2D);
VAR2F:=VAR1A OR VAR1B OR VAR1C OR VAR1D OR VAR1E OR VAR1F OR VAR20 OR VAR21 OR VAR22 OR VAR23 OR VAR24 OR VAR25 OR VAR26 OR VAR27 OR VAR28 OR VAR29 OR VAR2A OR VAR2B OR VAR2E;
VAR30:=(VAR18 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC OR VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17){ AND CLOSE>200};
VAR24Z:=EMA(AMOUNT/VOL/100,5);
VAR25Z:=EMA(AMOUNT/VOL/100,13);
VAR26Z:=VAR24Z-VAR25Z;
VAR1Z:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR2Z:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR3Z:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2Z,MA(VAR3Z,6)) AND
CROSS(IF(1000*VAR26Z/VAR24Z>0,1000*VAR26Z/
VAR24Z,0)*0.19+1.9,IF((HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*120>100,100,
(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*120)*0.07),(LOW*0.984),'↖强牛股出现 '),COLORWHITE;
SS1:=CROSS(波段底,3);
SS2:=FILTER(买=1,5);
B1:=EMA((2*CLOSE+HIGH+LOW)/4,5);
A1:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)>REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),B1,DRAWNULL),COLOR0000FF;
A2:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)<REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),B1,DRAWNULL),COLOR00FF00;
B2:=EMA((2*CLOSE+HIGH+LOW)/4,13);
A3:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)>REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),B2,DRAWNULL),COLOR0000FF;
A4:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)<REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),B2,DRAWNULL),LINETHICK2,COLOR00FF00;
B3:=REF(EMA((LOW+CLOSE+OPEN)/3,25),1);
A5:IF(EMA((LOW+CLOSE+OPEN)/3,28)>REF(EMA((LOW+CLOSE+OPEN)/3,28),1),B3,DRAWNULL),LINETHICK3,COLOR0000FF;
A6:IF(EMA((LOW+CLOSE+OPEN)/3,28)<REF(EMA((LOW+CLOSE+OPEN)/3,28),1),B3,DRAWNULL),LINETHICK3,COLOR00FF00;
B4:=(EMA(LOW,125)+EMA((CLOSE+LOW)/2,125))/2;
A7:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2>REF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2,1),B4,DRAWNULL),COLOR0000FF;
A8:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2<REF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2,1),B4,DRAWNULL),COLOR00FF00;
LCZ:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LCZ),0),3,1) / SMA(ABS((CLOSE - LCZ)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
AAZ:=CLOSE>REF(CLOSE,1) AND REF(CLOSE,1)>REF(CLOSE,2) AND REF(CLOSE,1)<REF(CLOSE,3) AND IF(REF(CLOSE,3)<REF(CLOSE,4),1,IF(REF(CLOSE,4)<REF(CLOSE,5),REF(CLOSE,1)<REF(CLOSE,4) OR (REF(CLOSE,2)<REF(CLOSE,4) AND REF(CLOSE,3)>=REF(CLOSE,5)),IF(REF(CLOSE,5)<REF(CLOSE,6),1,REF(CLOSE,6)<REF(CLOSE,7))));
BBZ:=CLOSE<REF(CLOSE,1) AND REF(CLOSE,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,3) AND IF(REF(CLOSE,3)>REF(CLOSE,4),1,IF(REF(CLOSE,4)>REF(CLOSE,5),REF(CLOSE,1)>REF(CLOSE,4) OR (REF(CLOSE,2)>REF(CLOSE,4) AND REF(CLOSE,3)<=REF(CLOSE,5)),IF(REF(CLOSE,5)>REF(CLOSE,6),1,REF(CLOSE,6)>REF(CLOSE,7))));
DRAWTEXT(AAZ AND CLOSE>REF(OPEN,2),L*0.98,'★+三平底'),COLORYELLOW;
DRAWTEXT(BBZ AND CLOSE<REF(CLOSE,2),L*1.01,'★-三平顶'),COLORGREEN;
DRAWTEXT(CROSS(FF,MA15),L*0.99,'底背离'),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),L*1.012,'顶背离'),COLOR1880FF;
DRAWTEXT(CROSS(84,RSI) AND CROSS(76,VAR28Z),H*1.01,'卖出'),LINETHICK4,COLORGREEN;
{DRAWICON(VAR2F,LOW-LOW*1/100,1);}
DRAWICON(VAR2F AND CLOSE>江恩线144,LOW,1);
DRAWICON(VAR30,HIGH,2);
DRAWTEXT(VAR2F AND CLOSE<江恩线144,LOW,'秘密买点!'), COLORYELLOW;
DRAWTEXT(VAR2F AND CLOSE>江恩线144,LOW,'强势买点!'), COLORRED;
DRAWTEXT(VAR30,HIGH,'秘密抛点'),COLOR00FF00;
STICKLINE(SS2 AND SS1,L*0.96,L*0.98,2,0),COLORYELLOW;
DRAWTEXT(SS2 AND SS1,L*0.96,'底买合一'),COLORYELLOW;
DRAWTEXT(FILTER(买=1,5),LOW-0.03,'买入'),COLORRED;
DRAWTEXT(CROSS(波段底,3),L*0.97,'底');
DRAWTEXT(CROSS(MA60,MA120),MA60*0.99,'↑60金叉120牛势'),COLORYELLOW;
DRAWTEXT(CROSS(MA120,MA60),MA60*0.99,'↓120死叉60熊势'),COLORWHITE;

斋主量交+DDX
{副图}


N:=5;
M:=13;
N日内净流入:=SUM(DDX,N)*3;
万手:VOL/10000,LINETHICK0;
AA:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
预测:AA/10000;
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主买:主动买/10000,COLORRED;
主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
主卖:-主动卖/10000,COLORGREEN;
差额:=(主动买+主动卖)/10000;
STICKLINE(CLOSE=REF(CLOSE,1),0,VOL,3.5,0),COLORWHITE;
STICKLINE(CLOSE>REF(CLOSE,1),0,VOL,3.5,0),COLORRED;
STICKLINE(CLOSE<REF(CLOSE,1),0,VOL,3.5,0),COLORGREEN;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.5 , 0 ) , COLOR00FFFF ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 3.2 , 0 ) , COLOR007777 ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.7 , 0 ) , COLOR009999 ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 2.1 , 0 ) , COLOR00BBBB ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 1.5 , 0 ) , COLOR00DDEE ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.9 , 0 ) , COLOR66FFFF ;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,AA,1 , 0.2 , 0 ) , COLORFFFFFF ;
STICKLINE(主动买>=0,VOL,-主动卖,3.2,0),COLOR000033;
STICKLINE(主动买>=0,VOL,-主动卖,2.7,0),COLOR000066;
STICKLINE(主动买>=0,VOL,-主动卖,2.1,0),COLOR000099;
STICKLINE(主动买>=0,VOL,-主动卖,1.5,0),COLOR0000CC;
STICKLINE(主动买>=0,VOL,-主动卖,0.9,0),COLOR0000FF;
STICKLINE(主动买>=0,VOL,-主动卖,0.2,0),COLORCC66FF;
STICKLINE(主动卖<=0,0,-主动卖,3.2,0),COLOR990000;
STICKLINE(主动卖<=0,0,-主动卖,2.7,0),COLORCC0000;
STICKLINE(主动卖<=0,0,-主动卖,2.1,0),COLORFF4400;
STICKLINE(主动卖<=0,0,-主动卖,1.5,0),COLORFF8800;
STICKLINE(主动卖<=0,0,-主动卖,0.9,0),COLORFFCC00;
STICKLINE(主动卖<=0,0,-主动卖,0.2,0),COLORCYAN;
持币:IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORBLUE;
持股:IF(SAR(10,2,20)<=L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORRED;

WJ:=(H+L+C)/3;
V1:=IF(H=L,1,H-MAX(O,C));
V2:=IF(H=L,1,MAX(C,O)-WJ);
V3:=IF(H=L,1,MIN(O,C)-L);
V4:=IF(H=L,1,WJ-MIN(C,O));
V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5);
V7:=(V2*V5);
V8:=(V3*V5);
V9:=(V4*V5);
买盘:=(V9+V8);
卖盘:=(V6+V7);
买卖差:=买盘-卖盘;
DDX:=买卖差;
DX:=MA(买卖差,5)*20;
DDX1:SMA(DX,3,1),COLORFFFFFF;
DDX2:SMA(DDX1,3,1),COLOR00FFFF;
DDX3:(5*DDX2+4*REF(DDX2,1)+3*REF(DDX2,2)+2*REF(DDX2,3)+REF(DDX2,4))/15;
预警:DDX>0 AND MA(V,5)>MA(MA(V,5),5) AND CROSS(DDX1,DDX2),LINETHICK;
天:=COUNT(DDX>0,5),COLORRED;
DRAWTEXT(预警,DDX*1.5,'★'),LINETHICK3,COLOR00FFFF;
五日: MA(V,5)COLORLIGRAY,LINETHICK2;
十日: MA(V,10)COLORCYAN,LINETHICK2;
二十日:MA(V,20),COLORRED,LINETHICK2;
{三十日:MA(V,30)*1.2,COLORLIBLUE;}
{50_DDX}
流入:=IF(N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL);
DRAWBAND(N日内净流入,RGB(100,100,100),0,RGB(0,100,150));
{波段转向}{5天3%}
DLX1:=SMA(DX,3,1),LINETHICK,COLORWHITE;
RSV:=((C-LLV(L,6))/(HHV(H,6)-LLV(L,6)))*100;
K:=POW(SMA(RSV,2,1),5)/POW(10,8);
D:=POW(SMA(RSV,2,1),5)/POW(10,10);
J:=(K+ D)/2;
花开短买:IF(CROSS(J,1),1,0) AND DLX1>REF(DLX1,1),COLORYELLOW;
IF(花开短买,150000,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;
IF(花开短买,150000,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF;
RSI1:=N日内净流入;
AAZ:=REF(RSI1,N)=HHV(RSI1,2*N+1);
BBZ:=BACKSET(AAZ,N+1);
CC:=FILTER(BBZ,N) AND RSI1=HHV(RSI1,N+1);
A1:=BARSLAST(REF(CC,1));
{STICKLINE(DDX<0,0,DDX,4,0),COLOR006600;}
STICKLINE(DDX<0,0,DDX,3,0),COLOR009900;
STICKLINE(DDX<0,0,DDX,1.5,0),COLOR00CC00;
STICKLINE(DDX<0,0,DDX,0,0),COLOR66CCFF;
STICKLINE(DDX>0,0,DDX,3,0),{COLOR0000CC}COLORYELLOW;
STICKLINE(DDX>0,0,DDX,1.5,0),COLORYELLOW;{COLOR0000FF};
STICKLINE(DDX>0,0,DDX,0,0),COLORCC66FF;
顶背离:REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC,COLORRED;
DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORRED;
AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);
A2:=BARSLAST(REF(CC2,1));
底背离:REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)<RSI1 AND CC2,COLORCYAN;
DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORCYAN;
 


 





gd14680

回复

举报

QQ|

GMT+8, 2024-12-26 12:46

快速回复 返回顶部 返回列表