同花顺跟庄买入公式
有未来函数,不准,不要下,会漂移,学习用的。
源码
VARA:=REF(LOW,1);
VARB:=SMA(ABS(LOW-VARA),3,1)/SMA(MAX(LOW-VARA,0),3,1)*100;
VARC:=EMA(IF(CLOSE*1.3,VARB*10,VARB/10),3);
VARD:=LLV(LOW,30);
VARE:=HHV(VARC,30);
VARF:=IF(MA(CLOSE,58),1,0);
VARG:=EMA(IF(LOW<=VARD,(VARC+VARE*2)/2,0),3)/618*VARF;
VARH:=IF(VARG>28,28,VARG);
{吸筹:STICKLINE(VARH>-120,0,VARH,6,1),COLOR0FFFFF;}
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
X:=LLV(J,2)=LLV(J,8);
跟庄买入: IF(CROSS(J,3),50,0),colorred,LINETHICK3;
VA:=(2*C+H+L)/4;
VB:=LLV(L,5);
VC:=HHV(H,5);
红线上穿买:EMA((VA-VB)/(VC-VB)*100,5),colorred;
红线下穿卖:EMA(红线上穿买,3),COLORFFFF00;
JL:=EMA(VOL,13);
JE:=EMA(AMOUNT,13);
JX:=((JE / JL) / 100);
RGL:=(((CLOSE - JX) / JX) * 100);
STICKLINE((RGL < (0 - 6)),0,20,2,0),COLORFF00CC;
V1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
V2:=2*ABS(V1);
A:=V*100/CAPITAL;
小快牛:=MA(A,180);
DIFF0:=(EMA(DCLOSE,6)-EMA(DCLOSE,9))*100;
DEA0:=EMA(DIFF0,3);
MACD0:=2*(DIFF0-DEA0);
快牛: (MACD0>REF(MACD0,1)*2.5 AND MACD0>5),COLORFF00FF;
STICKLINE(快牛,00,1,1.2,0),colormagenta;
DRAWTEXT(快牛,0.5,'←漂'),colormagenta;
尖顶买入:ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2),colorred,LINETHICK1;
尖顶卖出:ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2),colorgreen,LINETHICK1;
DRAWTEXT(尖顶买入=1,1,'敬'),colorred;
DRAWTEXT(尖顶卖出=1,1,'明'),colorgreen;