将买入卖出主图修改为股价低于和向上突破买入线的选股
2020/2/18 18:54:17
公式编写说明:
请老师把下面的源码修改成两个选股公式:1、买入线上升斜率角度大于7度,股价低于买入线的选股公式2、买入线上升斜率角度大于7度,股价向上突破买入线的选股公式再表谢谢----------!!!!!!!N:=20;M:=32;P1:=80;P2:=100;VAR1:=(C+H+O+L)/4;卖出:XMA(VAR1,N)*(1+P1/1000),COLORGREEN,LINETHICK2;买入:XMA(VAR1,M)*(1-P2/1000),COLORMAGENTA,LINETHICK2;幅度:100*(卖出-买入)/买入,NODRAW;MA1:=MA(VAR1,3);STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;STICKLINE(卖出>MIN(C,O) AND 卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,HIGH,0,0),COLORGREEN;STICKLINE(卖出<LOW,OPEN,CLOSE,3,0),COLORGREEN;STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;STICKLINE(买入>LOW AND 买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;STICKLINE(买入>MIN(C,O) AND 买入<MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;STICKLINE(买入>LOW AND 买入<HIGH,买入,LOW,0,0),COLORMAGENTA;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;
公式源码回答:
【1】
M:=32;P2:=100;
VAR1:=(C+H+O+L)/4;
买入:=XMA(VAR1,M)*(1-P2/1000);
ATAN((买入/REF(买入,1)-1)*100)*57.3>7
AND
C<买入;
【2】
M:=32;P2:=100;
VAR1:=(C+H+O+L)/4;
买入:=XMA(VAR1,M)*(1-P2/1000);
ATAN((买入/REF(买入,1)-1)*100)*57.3>7
AND CROSS(C>买入,0.5);
投股 票网 www.tou18 .cn
股市公式下载推荐