高抛低吸(通达信公式 分时主图 源码 测试图)
|
{M:1,30,5}
开A:=REF(V,BARSSINCE(TIME<=092945)),NODRAW;
开B:=REF(V,FROMOPEN+1),NODRAW;
开C:=REF(V,BARSSINCE(V>REF(V,1)));
LT:=CAPITAL/1000000;{亿股}
TIMEE:=IF(FROMOPEN<6,1,0);
第一单:IF(LT<0.3 AND 开B>600,开B,IF(LT<0.6 AND LT>0.3 AND 开B>800,开B,
IF(LT>0.6 AND LT<1 AND 开B>1000,开B,IF(LT>1 AND LT<2 AND 开B>1500,开B,
IF(LT>2 AND LT<4 AND 开B>2000,开B,IF(LT>4 AND LT<6 AND 开B>2500,开B,
IF(LT>6 AND LT<10 AND 开B>3000,开B,IF(LT>10 AND 开B>6000,开B,0)))))))) ,NODRAW;
A1:=(DVOL/C)/2;
A2:=SUM(IF(A1>100 AND CLOSE>REF(CLOSE,1),A1,0),0);
A3:=SUM(IF(A1>100 AND CLOSE<REF(CLOSE,1),A1,0),0);
A4:=SUM(IF(A1<100 AND CLOSE>REF(CLOSE,1),A1,0),0);
A5:=SUM(IF(A1<100 AND CLOSE<REF(CLOSE,1),A1,0),0);
A6:=A2+A3+A4+A5;
机构买盘:=(A2);
机构卖盘:=(A3);
DD1:=1;
AAA1:=STRCAT(STRCAT('买= ',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('卖= ',CON2STR((100*A3)/A6,0)),'%');
AAA3:=STRCAT(STRCAT('差= ',CON2STR((100*(A2-A3))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0,0.04,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0,0.12,0,AAA2),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0,0.20,0,AAA3),COLOR00FFFF;
DRAWTEXT_FIX(DD1=1,0,0.80,0,'蓝线后出抛再分批卖,黄线后出吸再分批买,均线柱代表多空能量,红标代表转强'),COLORYELLOW;
均价:=SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:=L1+P1*7/8;
支撑:=L1+P1*0.5/8;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:=EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
NOTEXT001:IF(趋势线<=13,C,DRAWNULL),LINETHICK2 COLORYELLOW;
NOTEXT002:IF(趋势线>=90 AND V12,C,DRAWNULL),LINETHICK2 COLORBLUE;
NOTEXT003:IF(趋势线<=13 AND V12>13,C,DRAWNULL),LINETHICK2 COLORRED;
DRAWTEXT(LONGCROSS(支撑,C,2),C,'吸'),COLORRED;
DRAWTEXT(趋势线<=13 AND V12>13 AND LONGCROSS(支撑,C,2),C,' 快吸'),COLORRED;
DRAWTEXT(LONGCROSS(C,阻力,2),C,'抛'),COLORGREEN;
TT:=BARSCOUNT(C);
均:=MA(C,TT);
上均线:=均+2*STD(C,3);
下均线:=均-2*STD(C,3);
时长:=TIME>93000;
涨幅:=C/REF(C,1)>1.02;
跌幅:=C/REF(C,1)<0.98;
横盘:=((HHV(C,TT)-LLV(C,TT))/C)<0.05;
YY:=SMA(VOL,30,1);
放量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.95;
涨跌幅:=涨幅 OR 跌幅;
横涨1:=涨跌幅=0 AND 横盘 AND 放量 AND CROSS(均价,均);
DRAWTEXT(FILTER(横涨1,10),C*0.999,'--突破'),COLORCYAN;
DRAWICON(FILTER(横涨1,10),C*0.999,1);
虎:= (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100;
主力:=EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,120)-0.0004;
散户:=EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,200);
GANSI:CROSS(EXPMA(虎,120)-0.0004,EXPMA(虎,200)),NODRAW;
DRAWICON(CROSS(EXPMA(虎,120)-0.0004,EXPMA(虎,200)),C,13);
DRAWTEXT(CROSS(EXPMA(虎,120)-0.0004,EXPMA(虎,200)),C*0.999,'-敢死'),COLORCYAN;
DRAWICON(CROSS(EXPMA(虎,200),EXPMA(虎,120)-0.0004),C,6);
DRAWTEXT(CROSS(EXPMA(虎,200),EXPMA(虎,120)-0.0004),C*0.999,'-哭'),COLORCYAN;
STICKLINE(虎>0,均价,均价+虎*10,0.01,0),COLORRED;
STICKLINE(虎<0,均价,均价+虎*10,0.01,0),COLORGREEN;
WD:=BARSLAST(MINUTE=5),NODRAW;
ZF:=(C/DYNAINFO(3)-1)*100,NODRAW;
B:=ZF/MINUTE;
五分钟涨速:REF(B,WD),NODRAW;
DRAWICON(五分钟涨速>0.214,C*0.99,23);
{字体大小控制}
KB_X:=0.004;
KB_Y:=0.05;
ZT_X:=0.01;
ZT_Y:=0.05;
DRAWTEXT_FIX(ISLASTBAR, KB_X+ZT_X*80,KB_Y+ZT_Y*7,0,'五分钟涨速 :'),COLORYELLOW,LINETHICK2;
DRAWNUMBER_FIX(ISLASTBAR,KB_X+ZT_X*85,KB_Y+ZT_Y*7,0,五分钟涨速),COLORWHITE,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR, KB_X+ZT_X*80,KB_Y+ZT_Y*8,0,'开A :'),COLORYELLOW,LINETHICK2;
DRAWNUMBER_FIX(ISLASTBAR,KB_X+ZT_X*85,KB_Y+ZT_Y*8,0,开A),COLORWHITE,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR, KB_X+ZT_X*80,KB_Y+ZT_Y*9,0,'开B :'),COLORYELLOW,LINETHICK2;
DRAWNUMBER_FIX(ISLASTBAR,KB_X+ZT_X*85,KB_Y+ZT_Y*9,0,开B),COLORWHITE,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR, KB_X+ZT_X*80,KB_Y+ZT_Y*10,0,'开C :'),COLORYELLOW,LINETHICK2;
DRAWNUMBER_FIX(ISLASTBAR,KB_X+ZT_X*85,KB_Y+ZT_Y*10,0,开C),COLORWHITE,LINETHICK2;
DRAWTEXT_FIX(ISLASTBAR, KB_X+ZT_X*80,KB_Y+ZT_Y*11,0,'第一单 :'),COLORYELLOW,LINETHICK2;
DRAWNUMBER_FIX(ISLASTBAR,KB_X+ZT_X*85,KB_Y+ZT_Y*11,0,第一单),COLORWHITE,LINETHICK2; |