M1:=5;M2:=10;M3:=20;M4:=60;M5:=120;M6:=250;
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
MA6:MA(CLOSE,M6);
N1:=7;
{STICKLINE(C>0,0,50,15,0),COLORBLUE;}
VAR1:=REF(C,1);
VAR2:=SMA(MAX(C-VAR1,0),N1,1)/SMA(ABS(C-VAR1),N1,1)*1000;
VAR3:=DRAWLINE(VAR2>=HHV(VAR2,N1),VAR2,VAR2<=LLV(VAR2,N1),VAR2,1);
VAR4:=VAR2=VAR3;
VAR5:=VAR2<REF(VAR2,1);
DRAWICON(VAR4 AND VAR5,L*0.98,1);
DRAWTEXT(VAR4 AND VAR5,L*0.95,'买')COLORRED;
RSV:=(C-LLV(L,25))/(HHV(HIGH,25)-LLV(L,25))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
VAR6:=(2*C+H+L)/3;{可将3该为4,信号少点}
VAR7:=EMA(EMA(EMA(VAR6,4),4),4);{可将3该为4,信号少点}
VAR8:=(VAR7-REF(VAR7,1))/REF(VAR7,1)*100;
VAR9:=MA(VAR8,3)+0.03;
VAR10:=MA(VAR8,1);
DRAWICON(CROSS(VAR9,VAR10) AND J>65,H*1.02,15),COLORGREEN;
DRAWTEXT(CROSS(VAR9,VAR10) AND J>65,H*1.05,'卖'),COLORYELLOW;
AA:=BARSCOUNT(C);
AH:=HHV(H,120);
AL:=LLV(L,120);
A0:=(AH-AL)/30;
STICKLINE((AA+0)/34=FLOOR((AA+0)/34),L*0.99,L*0.97,2,0),COLORF00FF0;
DRAWTEXT((AA+0)/34=FLOOR((AA+0)/34),L*0.97,'时间窗'),COLORF00FF0;
VAR2S:=(2*CLOSE+HIGH+LOW)/4;
VAR3S:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4S:=LLV(LOW,5); VAR5S:=HHV(HIGH,4);
散户:=EMA((VAR2S-VAR4S)/(VAR5S-VAR4S)*100,4)*VAR3S;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3S;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L*0.95,'←吸'),COLORRED;
DRAWTEXT(CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0),L*0.98,'←地量买点'),COLORLICYAN;
DRAWTEXT(LAST(MA(C,5)<MA(C,10),5,0) AND "CCI.CCI">REF("CCI.CCI",1) AND CROSS("CCI.CCI",-100),L*0.98,'CCI买点'),COLORYELLOW;
通达信精准买卖主图指标公式的选股公式如下: