以下是通达信跟庄买进公式源码
通达信跟庄买进选股公式源码:
个股:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLOR1010FF;
:EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3),COLORE67010,LINETHICK2;
STICKLINE(个股 =大盘,个股,大盘,1,0),COLORRED;
STICKLINE(个股 大盘,个股,大盘,1,0),COLORBLUE;
STICKLINE(个股 =大盘,0,大盘,6,0),COLORYELLOW;
STICKLINE(个股 大盘,0,个股,6,0),COLORYELLOW;
反弹:IF(CROSS(个股,9),50,0),STICK,LINETHICK3,COLOR00FF00;
DRAWTEXT(CROSS(个股,9),40,'短线反弹!'),COLOR00FF00;
VAR1:=EMA(CLOSE,3);
VAR2:=EMA(CLOSE,21);
VAR3:=BARSLAST(CROSS(VAR2,VAR1))
VAR4:=VOL MA(VOL,5)*2ANDVOL MA(VOL,5)*5;
VAR5:=CROSS(VAR1,VAR2)ANDVAR4ANDVAR3;
:IF(VAR5,80,0),STICK,LINETHICK4,COLORF00FF0;
DRAWTEXT(VAR5,70,'黑马!'),COLORF00FF0;
MAA5:MA(C,5),COLORFF00FF,LINETHICK2;
MAA10:=MA(C,10);
MAA30:MA(C,30),COLORRED;
KS:IF(MAA10 MAA30,MAA10,MAA30),COLORBLUE;
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8 0,2)ANDCROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖跟庄买进'),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;
{跟庄买进选股}
MAA5:=MA(C,5);
MAA10:=MA(C,10);
MAA30:=MA(C,30);
KS:=IF(MAA10 MAA30,MAA10,MAA30);
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
跟庄买进:LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8 0,2)ANDCROSS(A8,MA(A8,2));
A0:=((L+H+C*2)/4);
上:EMA(A0,14)*1.1382,COLORYELLOW,LINETHICK1;
{上B:REFDATE(上,DATE),COLORYELLOW,DOTLINE;}
DRAWNUMBER(ISLASTBAR,上,上),COLORWHITE;
中:EMA(A0,14)*1.0618,COLORWHITE,LINETHICK1;
DRAWNUMBER(ISLASTBAR,中,中),COLORWHITE;
下:EMA(A0,14),COLORRED,LINETHICK1;
DRAWNUMBER(ISLASTBAR,下,下),COLORWHITE;
{A2:=EMA(A0,25)COLORLIBLUE,LINETHICK1;
A1X:=(下-REF(下,1))/REF(下,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
买:IF(A1X =0,下,DRAWNULL),COLORRED,LINETHICK1;
卖:IF(A1X 0ANDA2X 0,下,DRAWNULL)COLORGREEN3;}
多空:EMA((EMA(CLOSE,29)+EMA(CLOSE,31)+EMA(CLOSE,33))/3,3),COLORYELLOW,LINETHICK2;
做空:=REF(多空,1),COLORGREEN,NODRAW;
A2:=EMA(多空,25)COLORLIBLUE,LINETHICK3;
A1X:=(多空-REF(多空,1))/REF(多空,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
买:IF(A1X =0,多空,DRAWNULL),COLORMAGENTA,LINETHICK2;
卖:IF(A1X 0ANDA2X 0,多空,DRAWNULL),COLORGREEN,LINETHICK2;
{STICKLINE(做多 做空,做多,做空,3,0),COLORRED;
STICKLINE(做多 =做空,做多,做空,3,1),COLORGREEN;}
{表示}
LA:=BARSLAST(C REF(C,1)*1.098);
LC:=REF(CLOSE,LA);
LO:=REF(OPEN,LA);
LAL:=REF(L,LA);
LAH:=REF(H,LA);
一涨停:=EVERY(C/REF(C,1) =1.097ANDC=H,1);
双涨停:=EVERY(C/REF(C,1) =1.097ANDC=H,2);
三涨停:=EVERY(C/REF(C,1) =1.097ANDC=H,3)ANDH
策略1A:=EXIST((C/REF(C,2)-1)*100 20,2)ANDCOUNT(LC LO,3) =1ANDO REF(C,1) ANDC REF(C,1)ANDC OANDC REF(O,1)ANDREF(C,1) REF(C,2);
策略1B:=EXIST(双涨停,3)ANDCOUNT(LC LO,4) =1ANDO REF(C,1) ANDC REF(C,1)ANDC OANDC REF(O,1)ANDREF(C,1) REF(C,2);
{DRAWTEXT(策略1A,LOW,'↖①'),COLORYELLOW;
DRAWTEXT(策略1B,LOW,'↖①'),COLORYELLOW;}
DRAWTEXT(策略1A,LOW,'↖东方不败'),COLORYELLOW;
DRAWTEXT(策略1B,LOW,'↖东方不败'),COLORYELLOW;
策略2:=EXIST(三涨停,5) ANDC 中 ANDL 中*1.01618ANDC/REF(C,1) 1.05ANDHHV(H,5)/C 1.14;
{DRAWTEXT(策略2,LOW,'↖②'),COLORYELLOW;}
DRAWTEXT(策略2,LOW,'↖潜伏'),COLORYELLOW;
策略3:=EXIST(三涨停,9)ANDEXIST(一涨停,9)ANDC 下 ANDL 下*1.01618ANDC/REF(C,1) 1.05ANDHHV(H,8)/C 1.14;
{DRAWTEXT(策略3,LOW,'↖③'),COLORYELLOW;}
DRAWTEXT(策略3,LOW,'↖潜伏'),COLORYELLOW;
角度:=ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*57.3;
持有:=EXIST(一涨停,5)AND角度 75ANDC 上ANDC REF(C,1)ANDC
:=角度 75ANDC 上ANDC REF(C,1)ANDC 上{AND(H/C) 1.038};
DRAWTEXT(持有,LOW,'↖龙'),COLORYELLOW;
通达信跟庄买进选股公式截图