请高手将下面通达信公式改成选股条件,万分感谢!要求下趋势线是上行,跌到趋势线附近买入

2024-12-28 07:41:56
推荐回答(1个)
回答1:

帮你修改了下,主图公式:
MA1:MA(CLOSE,5);
MA2:MA(CLOSE,10);
MA3:MA(CLOSE,20);
MA4:MA(CLOSE,60);
VAR1:=(C+H+O+L)/4;
卖出:XMA(VAR1,20)*(1+80/1000),COLORGREEN,LINETHICK2;
买入:XMA(VAR1,32)*(1-100/1000),COLORMAGENTA,LINETHICK2;
幅度:100*(卖出-买入)/买入,NODRAW;
STICKLINE(卖出>LOW AND 卖出STICKLINE(卖出>MIN(C,O) AND 卖出STICKLINE(卖出>LOW AND 卖出STICKLINE(卖出STICKLINE(卖出STICKLINE(买入>LOW AND 买入STICKLINE(买入>MIN(C,O) AND 买入STICKLINE(买入>LOW AND 买入STICKLINE(买入>HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;
STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;
DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'B'),COLORRED,LINETHICK2;
DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'S'),COLORGREEN;

依据B点提示选股条件公式:
VAR1:=(C+H+O+L)/4;
卖出:=XMA(VAR1,20)*(1+80/1000);
买入:=XMA(VAR1,32)*(1-100/1000);
幅度:=100*(卖出-买入)/买入;
DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'B');

该公式有未来函数,数据会飘移,慎用!