量价知买卖副图公式源码
VAR1:=(C-EMA(C,7))/EMA(C,7);
VAR2:=EMA(EMA(VAR1,3),3);
VAR3:=EMA(EMA(VAR1,3),2);
VAR4:=100*( VAR2+ VAR3);
VAR5:=EMA(VAR4,2.5);
BI:=100*(H+L)/2/EMA(C,17)-100;
BUY1:=VAR4>REF(VAR4,1) AND REF(VAR4,1)<REF(VAR4,2) AND REF(VAR4,2)<REF(VAR4,3);
BUY2:=REF(BI,1)>0 AND BUY1 AND VAR4<-2;
BUY3:=REF(BI,1)<0 AND BUY1 AND REF(VAR4,1)<-3;
BUY4:=VAR4<0 AND CROSS(VAR4,VAR5) AND BUY1;
BUY:=(BUY2 OR BUY3 OR BUY4) AND (EMA(INDEXC,5)>REF(EMA(INDEXC,5),1) OR VAR4>=REF(VAR4,1));
DRAWICON(BUY,-130,38);
100;
主力:EMA( (CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*480,2)*5,COLORGREEN,LINETHICK1;
散户:=EMA( (CLOSE-MA(CLOSE,11))/MA(CLOSE,11)*480,7)*5;
BT2:=CROSS(主力,散户) AND 主力<-10;
DRAWICON(CROSS(主力,散户) AND 主力<-10,主力,13);
IF(主力>=REF(主力,1),主力,DRAWNULL),COLORRED,LINETHICK1;
IF(主力<=REF(主力,1),主力,DRAWNULL),COLORGREEN,LINETHICK1;
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,10);
STICKLINE(((CROSS(BIAS,乖离)AND 乖离<-3)),108,100,1,0),COLORWHITE;
DRAWTEXT((CROSS(BIAS,乖离)AND 乖离<-3),130,'←变'),COLORWHITE;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
顶部:=CROSS(80,RSI)*35;
逃顶:=顶部;
顶:=IF(逃顶>REF(逃顶,1),35,0);
DRAWTEXT(顶=35,170,'←顶'),COLOR00FF00;
STICKLINE(顶部,110,100,1,0),COLORGREEN;
VOLUME:=VOL;
主力启动线:=MA(VOLUME,5);
主力洗盘线:=MA(VOLUME,35);
资金异动线:=MA(VOLUME,135);
诱多:STICKLINE(CROSS(主力启动线,资金异动线) OR ((主力洗盘线 > 资金异动线) AND CROSS(主力启动线,主力洗盘线)),108,100,0.5,0),COLORFFFF00;
{ _通达信股票指标公式}
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
DRAWTEXT(CROSS(82,VARR1),150,'←逃'),COLORYELLOW;
DRAWTEXT(诱多,147,'←诱'),COLORFFFF00;
BIASW:=(CLOSE-MA(CLOSE,10))/MA(CLOSE,10)*10;
Q:=(REF(DOWNNDAY(CLOSE,3),1) AND C>REF(C,1) AND BIASW>=REF(BIASW,1));
DRAWTEXT(Q,170,'←机会'),COLORYELLOW;
STICKLINE(Q,110,100,0.5,0),COLORYELLOW;
AAWW:=C-MA(C,6);
注:=0;
DRAWICON(CROSS(AAWW,注),90,41);
TJ1:=COUNT((C<O),5)>=3;
TJ2:=(MIN(C,O)-L)/(H-L)>=0.5;
TJ3:=L/MIN(C,O)<=0.97;
TJ4:=(C-MA(C,30))/MA(C,30)*100<-10;
长下影买:=TJ1 AND TJ2 AND TJ3 AND TJ4;
STICKLINE(长下影买,-120,-100,0.1,2),COLORWHITE;
DRAWTEXT(长下影买>0,-120,'长下影买'),COLORF8FFFF;
DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEAP:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEAP)*2;
A1:=BARSLAST(REF(CROSS(DIFF,DEAP),1));
AR1:=REF(CLOSE,1);
AR2:=SMA(MAX(CLOSE-AR1,0),7,1)/SMA(ABS(CLOSE-AR1),7,1)*100;
特准:STICKLINE(FILTER(REF(AR2,1)<20 AND AR2>REF(AR2,1),5),40,0,1,1),COLOR0066FF;
DRAWTEXT(特准,35,'←绝杀'),COLOR0066FF;
增减力度:=(MA(CLOSE,34.000) - CLOSE) / MA(CLOSE, 34.000) * 10.000;
STICKLINE(CROSS( 1.700,增减力度), 51,10,0.1,0),COLORWHITE;
DRAWTEXT(CROSS( 1.700,增减力度), 63,'←底'),COLORWHITE;
STICKLINE(FILTER(CROSS(0.019100,增减力度),21),106,100,0.5,0),COLORGREEN;
DRAWTEXT(FILTER(CROSS(0.019100,增减力度),21), 120,'←小心'),COLORGREEN;
AA:=EMA(C,5)-EMA(C,13);
BBP:=EMA(AA,3);
X:=AA>REF(AA,1); Y:=REF(AA,3)>=REF(AA,2);Z:=REF(AA,2)>=REF(AA,1);Z1:=AA<BBP;
注意:=X AND Y AND Z AND Z1 ;
DRAWTEXT(注意,1,'启动'),COLORLIMAGENTA;
DRAWICON(注意,10,1);
OSC:=100*(CLOSE-MA(CLOSE,20));
MAOSC:=EXPMEMA(OSC,6);
BIASWP:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100;
BIASMA:=MA(BIASWP,6);
F:=100*(C-REF(C,1))/REF(C,1);
P1:=IF(C<REF(O,1) AND F<0,1,0);
P2:=IF(C<REF(O,2) AND F<0,1,0);
LIN:=IF(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,1,0);
SS1:=CROSS(OSC,MAOSC) AND LIN;
DRAWTEXT(SS1,-20,'←反弹'),COLOR00FFFF;
STICKLINE(SS1,-60,-20,1,1),COLOR00FFFF;
SS:=CROSS(OSC,MAOSC) AND CROSS(BIASWP,BIASMA) AND LIN;
DRAWTEXT(SS,-60,'←激进'),COLORRED;
STICKLINE(SS,-70,-30,0.2,0),COLORRED;
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));
STICKLINE(B2>0,-146,-134,1,0),COLOR00FFFF;
DRAWTEXT(B2>0,-138,'←启动'),COLORYELLOW;
STICKLINE(B3>0,-94,-82,1,0),COLORFF00FF;
DRAWTEXT(B3>0,-86,'←走强'),COLORFF00FF;
FL:=V>REF(V,1) OR V>MA(V,5);
SZ:=(CROSS(C,MA(C,3)) OR CROSS(C,MA(C,5))) AND C>=O;
放量:=IF(FL AND SZ,1,0);
STICKLINE(放量,-120,-108,1,0),COLORLIRED;
DRAWTEXT(放量,-112,'←放量'),COLORLIRED;
弱转强:=CROSS(CCI,-200) AND CCI>REF(CCI,1);
STICKLINE(弱转强,108,100,0.5,0),COLORRED;
DRAWTEXT(弱转强,125,'←出击'),COLORRED;
638488499.jpg
|