1
M5:MA(CLOSE,5),COLORWHITE;
M1:MA(CLOSE,10),COLORYELLOW;
M2:=MA(CLOSE,20),COLORLIGREEN;
M3:MA(CLOSE,30),COLORMAGENTA;
M4:=MA(CLOSE,40),COLORRED;
M6:MA(CLOSE,60),COLORCYAN;
M12:MA(CLOSE,120),COLORLIRED;
M25:=MA(CLOSE,250),COLORLIMAGENTA;
市场成本:=DMA(AMOUNT/V/100,V/CAPITAL),COLORCYAN;
VAR21:=(C+H+O+L)/4;
卖出:=XMA(VAR21,20)*(1+80/1000);
买入:=XMA(VAR21,32)*(1-100/1000);
抛:卖出,COLORGREEN,LINETHICK2;
吸:买入,COLORLICYAN,LINETHICK2;
中:XMA(VAR21,26)*(1-10/1000),POINTDOT,LINETHICK2;
DRAWICON(CROSS(买入,LOW),L,1);
DRAWICON(CROSS(HIGH,卖出),卖出,2);
2
DIF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:2*(DIF-DEA),COLORSTICK;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD+0,2,0),COLOR0000AA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD+0,0.5,0),COLOR0055FF;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD+0,2,0),COLORAA00BB;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD+0,0.5,0),COLORCC22BB;
{黄}
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),0,MACD+0,2,0),COLOR00AAFF;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),0,MACD+0,0.5,0),COLOR00FFFF;
{蓝}
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),0,MACD+0,2,0),COLORFF7700;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),0,MACD+0,0.5,0),COLORFFAA22;
DRAWICON(MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND MACD<0,MACD,1);
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWTEXT(二次金叉,DEA,' 二次金叉'),COLORWHITE;
DIFF3:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA3:=EMA(DIFF3,9),COLORYELLOW;
MACD3:=(DIFF3-DEA3)*2,LINETHICK0;
多转空:=((((LLV(MACD3,4)>0) AND (MACD3<REF(MACD3,1))) AND (REF(MACD3,1)>REF(MACD3,2))) AND (REF(MACD3,2)>REF(MACD3,3)));
空转多:=((((HHV(MACD3,4)<0) AND (MACD3>REF(MACD3,1))) AND (REF(MACD3,1)<REF(MACD3,2))) AND (REF(MACD3,2)<REF(MACD3,3)));
XG2:=MACD3<0 AND REF(MACD3<0,1) AND REF(MACD3,1)<REF(MACD3,2) AND DIFF3>REF(DIFF3,1) AND MA(C,5)<REF(MA(C,5),1) ;
DRAWTEXT(XG2,0.03,'金3'),COLORYELLOW;
JCCOUNT3:=COUNT(CROSS(DIFF3,DEA3),BARSLAST(DEA3>=0));
二次金叉3:=CROSS(DIFF3,DEA3) AND DEA3<0 AND COUNT(JCCOUNT3=2,21)=1;
DRAWTEXT(二次金叉3,DEA3*1.06,'二次金叉3'),COLORCYAN;
VI:DIF,LINETHICK2,COLORWHITE;
V2:DEA,LINETHICK2,COLORYELLOW;
3预测量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,预测量,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
突变:=V+REF(V,1)>=(REF(V,2)+REF(V,3)+REF(V,4)+REF(V,5)+REF(V,6))/5*3 AND V<2*REF(V,1) AND C>O AND C>MA(C,21),COLORGREEN;
STICKLINE(突变,2*V/3,V,2,0),COLORGREEN;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
增仓:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),STICK,COLORRED;
减仓:=IF(CLOSE>OPEN,0+AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0+AA*(HIGH-LOW),0+VOL/2)),STICK,COLORGREEN;
{蓝}
STICKLINE(减仓>0 AND 减仓<=REF(减仓,1),0,减仓+0,2,0),COLORFF7700;
STICKLINE(减仓>0 AND 减仓<=REF(减仓,1),0,减仓+0,0.5,0),COLORFFAA22;
STICKLINE(减仓>0 AND 减仓>REF(减仓,1),0,减仓+0,2,0),COLORAA00BB;
STICKLINE(减仓>0 AND 减仓>REF(减仓,1),0,减仓+0,0.5,0),COLORLICYAN;
STICKLINE(增仓>0 AND 增仓>REF(增仓,1),0,增仓+0,2,0),COLOR0000AA;
STICKLINE(增仓>0 AND 增仓>REF(增仓,1),0,增仓+0,0.5,0),COLOR0055FF;
{黄}
STICKLINE(增仓>0 AND 增仓<=REF(增仓,1),0,增仓+0,2,0),COLOR00AAFF;
STICKLINE(增仓>0 AND 增仓<=REF(增仓,1),0,增仓+0,0.5,0),COLOR00FFFF;
VOL1:MA(VOLUME,5),COLORWHITE,LINETHICK2;
VOL2:MA(VOLUME,10),COLORYELLOW,LINETHICK2;
VOL3:MA(VOLUME,123),COLORLICYAN,LINETHICK2;
4
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
KK:=INTPART(K1);
DD:=INTPART(D1);
TFXXS:=KK+DD;{变异KD风险系数}
TGLXS:=(TFXXS-REF(TFXXS,1)),LINETHICK;{变异KD乖离系数:资金流向}
DIFF3:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA3:=EMA(DIFF3,9),COLORYELLOW;
MACD3:=(DIFF3-DEA3)*2,LINETHICK0;
空转多:=((((HHV(MACD3,4)<0) AND (MACD3>REF(MACD3,1))) AND (REF(MACD3,1)<REF(MACD3,2))) AND (REF(MACD3,2)<REF(MACD3,3)));
顺势:(空转多 AND TGLXS>REF(TGLXS,1) AND C<MA(C,5))*9;
5
VAR21:=(C+H+O+L)/4;
卖出:=XMA(VAR21,20)*(1+80/1000);
买入:=XMA(VAR21,32)*(1-100/1000);
XG:LOW<=买入;
6
DIF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
DRAWICON(MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND MACD<0,MACD,1);
7
DIF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWTEXT(二次金叉,DEA,' 二次金叉'),COLORWHITE;
8
DYNAINFO(7)>6 AND DYNAINFO(7)<16 AND FINANCE(1)<830000000;
9
Y:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
LD:=FILTER(C2,10);
Z:=REF(L,BARSLAST(LD));
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
波谷:=IF(T2,Z,Z),COLORWHITE;
DRAWTEXT(L<=波谷 ,L*0.96,'支撑'),COLORYELLOW;
10
趋势F:=XMA(((CLOSE-LLV(LOW,48))/(HHV(HIGH,48)-LLV(LOW,48))*30),17)+9,COLORFFFFFF;
趋势8:=XMA(((CLOSE-LLV(LOW,53))/(HHV(HIGH,53)-LLV(LOW,53))*30),17)+9,COLOR3377DD;
散户:=EMA(((CLOSE-LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*30),17)+18,COLORGREEN,LINETHICK2;
机构:=XMA(趋势F,7)*1.372,COLORRED,LINETHICK2;
WR2:=机构*1.0887;
机构持仓1:=2.93*(机构-散户),LINETHICK2,COLORRED;
VAR1:=(EMA(C,12)-EMA(C,26))*100+50;
VAR2:=EMA(VAR1,9);
VAR3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;
VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR5:=SMA(VAR4,13,8);
VAR6:=SMA(VAR3,21,8);
VAR7:=MA(C,80)-MA(C,10)/7;
VAR8:=EMA(C,5);
VAR9:=MA((LLV(C,9))*1.1,14);
VAR10:=2*VAR9-VAR8-C*0.1;
VAR11:=IF(((VAR8-VAR10)*5>0),(POW((VAR8-VAR10)*5,2))/10,(-1*(POW((VAR8-VAR10)*(5),2)))/(10));
VAR12:=IF((VAR11>0),VAR11-0,12);
VAR13:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
趋势线:=CEILING(SMA(VAR5,13,8)),LINETHICK2,COLORYELLOW;
操盘线:=MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*
SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK2,COLORCYAN;
底部:IF((趋势线-VAR6<(-65)),-12,0),COLORLIGREEN;
顶部:IF((趋势线-VAR6>85),95,100),COLORLICYAN;
机构持仓3:=1.3*(趋势线-操盘线);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
机构持仓:=2.3*(K-D);
STICKLINE(机构持仓>=0 AND 机构持仓>REF(机构持仓,1),39,机构持仓+39,2,0),COLOR0000AA;
STICKLINE(机构持仓>=0 AND 机构持仓>REF(机构持仓,1),39,机构持仓+39,0.5,0),COLOR0055FF;
STICKLINE(机构持仓<=0 AND 机构持仓>REF(机构持仓,1),39,机构持仓+39,2,0),COLORAA00BB;
STICKLINE(机构持仓<=0 AND 机构持仓>REF(机构持仓,1),39,机构持仓+39,0.5,0),COLORCC22BB;
{黄}
STICKLINE(机构持仓>=0 AND 机构持仓<=REF(机构持仓,1),39,机构持仓+39,2,0),COLOR00AAFF;
STICKLINE(机构持仓>=0 AND 机构持仓<=REF(机构持仓,1),39,机构持仓+ |