编写要求:
请老师帮把这个追涨的信号改成选股公式
源码如下:
MA2:MA(CLOSE,10);
MA3:MA(CLOSE,20);
MA4:MA(CLOSE,60);
箱底:=TROUGH(CLOSE,10,1)*1.02,COLOR008888,LINETHICK2;
价低箱底:=COUNT(L<箱底,3);
底箱:=TROUGH(CLOSE,10,1)*1.05,COLOR008888,LINETHICK1;
DRAWTEXT(价低箱底>=1 AND 箱底MA4 AND 价低箱底>=1 AND 箱底=1 AND 箱底O);
VAR1N:=MA(CLOSE,5),;
VAR2N:=MA(CLOSE,10);
VAR3N:=(VAR1N-CLOSE)/CLOSE>3/100;
VAR4N:=(VAR2N-VAR1N)/VAR1N>0.03;
VAR5N:=LLV(CLOSE,30)=LLV(CLOSE,120);
底部:=VAR3N AND VAR4N AND VAR5N;
STICKLINE(BARSLAST(底部)<=2 AND 止跌,OPEN,CLOSE,2.5,0),COLORFF0066;
短趋势线:=MA(CLOSE,13),COLORRED,LINETHICK3;
中线:=MA(CLOSE,33),LINETHICK1;
中趋势线:=MA(CLOSE,55),LINETHICK1,COLORGRAY;
上极限:=((C-REF(MA(CLOSE,20),1))/20+短趋势线)*1.20;
DRAWTEXT(CROSS(短趋势线,C) AND INDEXC>MA(INDEXC,13) AND 短趋势线>REF(短趋势线 ,1) AND V[中趋势线 ,L*0.985,'买入'),COLORRED;
箱顶:=PEAK(CLOSE,10,1)*1.001,COLORFF4400;
RESV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
KEE:=SMA(RESV,3,1);
DEE:=SMA(KEE,3,1);
JEE:=3*KEE-2*DEE;
RSV24:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K24:=SMA(RSV24,3,1);
D24:=SMA(K24,3,1);
J24:=3*K24-2*D24;
压力位:=IF(CROSS(J24,JEE),H,REF(H,BARSLAST(CROSS(J24,JEE)))),COLOR669900,LINETHICK1;
支撑位:=IF(CROSS(JEE,J24),L,REF(L,BARSLAST(CROSS(JEE,J24)))),COLORCE6700,LINETHICK2;
追涨:=压力位<箱顶 AND CROSS(C,箱顶);
DRAWTEXT(压力位<箱顶 AND CROSS(C,箱顶),L,'追涨'),COLORFF8868;
]
解答:
?箱顶:=PEAK(CLOSE,10,1)*1.001;
RESV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;